Oracle Tips
  1. In and Exists
  2. rman snippet
  3. rman Backup&Restore
  4. RMAN Clone Instance
  5. PX Deq Credit:send blkd
SELECT t.SQL_TEXT
  FROM V$SESSION s, V$SQLAREA t, V$STREAMS_APPLY_SERVER a
  WHERE a.APPLY_NAME = 'STRM01_APPLY' AND a.SERVER_ID = 2
    AND s.SID = a.SID
    AND s.SQL_ADDRESS = t.ADDRESS
    AND s.SQL_HASH_VALUE = t.HASH_VALUE;
  1. Find Lock Objects
  2. Tune SGA&PGAburlonson,eygle,asktom
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE tempts2;
ALTER SYSTEM KILL SESSION '7,15';
SELECT SQL_TEXT, SADDR 
    FROM V$SQLAREA,V$SESSION
    WHERE V$SQLAREA.ADDRESS = V$SESSION.SQL_ADDRESS    
        AND SQL_TEXT LIKE 'alter tablespace%';
  1. export data to a csv file using sqlplus
set echo off
set feedback off
set linesize 100
set pagesize 0
set sqlprompt ''
set trimspool on
spool emp.csv

select empno||','||
  ename||','||
  job||','||
  hiredate
from   emp;

spool off

#sqlplus -S [username]/[password]@[SID] @emp_export.sql

http://www.matrise.net/index.php/Export_SQL_data_to_a_.csv_file_using_Sqlplus
  1. 续行符一览
- sqlplus
\ c++
&_ vb
_ ??
  1. adminASSM
  1. useShell
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License