![]() Order by name,qcsid,server_group,server_set,server# Select /*+ ordered */ name,value,sid,serial#,qcsid,server_group,server_set,server#,degree,req_degreeĪnd name in ('physical reads direct','session logical reads') Order by qcsid,server_group,server_set,server# Select sw.sid,event,p1text,p1,p2text,p2,p3text,p3,server_set (SELECT id1, id2, type FROM V$LOCK WHERE request>0) Select owner,object_type,object_name,last_ddl_time from dba_objects where status='INVALID' Select GROUP_NUMBER,DISK_NUMBER,TOTAL_MB,FREE_MB,STATE,PATH,NAME from v$asm_disk Select NAME,STATE,TOTAL_MB,FREE_MB from v$ASM_DISKGROUP V$session s,v$process p, v$sesstat l, v$sesstat m ![]() L.value "CPU",m.value "READS",to_char(s.logon_time, 'YY-MM-DD:HH24:MI:SS') logon_time from S.process C_pid,substr(p.spid,1,5) "S_pid", s.machine 0, s.program, client_program, Select to_char(sysdate,'YY-MM-DD:HH24-MI-SS') stime from dual Ĭolumn Sid_sn# format a13 Heading "'SID,SNO#'" Will drop a log file in the directory specified, and bomb out whenever any SQL error is raised by the upgrade script. WHENEVER SQLERROR EXIT SQL.CODE ROLLBACK SPOOL $MY_APP_UPGRADE_DIR/my_giant_log_file Missed the error comment initially: SET ECHO ON But that's not an easy fix, especially on *nix where sed can handle that. You can, of course, define a full path using environment variables to execute from, like: course, the flip side of that if the script is built for *nix, it won't work on Windows because of the / v \ issue. On windows, it tends to look in $ORACLE_HOME/bin, but I'm pretty sure that behavior's controllable on both platforms through the SQLPATH environment variable. A SQL*Plus script can call other scripts.įor example, a SQL*Plus script like: execute foo.sql, bar.sql, and baz.sql all from the directory where sqlplus was executed from - at least in *nix.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |