-
Recent Posts
Categories
Archives
- April 2024
- May 2023
- April 2023
- March 2023
- May 2022
- April 2022
- March 2022
- January 2022
- May 2019
- November 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- November 2017
- October 2017
- November 2016
- October 2016
- August 2016
- July 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- August 2015
- July 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- October 2014
- September 2014
- August 2014
- July 2014
- April 2014
- March 2014
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
Meta
Monthly Archives: July 2016
find_rman_backup_piece.sql
alter session set nls_date_format=’dd-mon-yy hh:mi’; /* — archive logs select r.sequence#, p.handle, p.start_time from v$backup_piece p, v$backup_redolog r where r.set_stamp = p.set_stamp and r.set_count = p.set_count — and r.sequence# = 63 order by r.sequence# ; */ — data files select … Continue reading
Posted in Uncategorized
Leave a comment
rman duplicate command
export NLS_DATE_FORMAT=’YYYY-MM-DD:HH24:MI:SS’ rman target / nocatalog auxiliary sys/syspwd@TARGET log=dup_target.log run { set until time “to_date(’10-JAN-2010 23:05:25′, ‘DD-MON-YYYY HH24:MI:SS’)”; allocate auxiliary channel c1 type disk; allocate auxiliary channel c2 type disk; duplicate target database to TARGET; }
Posted in Uncategorized
Leave a comment
TWO_TASK
TWO_TASK lets you silently support a tns network connect string, that is, instead of: sqlplus scott/tiger@tnsname you can: export TWO_TASK=tnsname sqlplus scott/tiger <<<== that has an implied @tnsname oracle_sid is used for a local connection – direct to the server … Continue reading
Posted in Uncategorized
Leave a comment
Find objects and rows causing deadlocks
Trace file info: Rows waited on: Session 335: obj – rowid = 000BAC75 – AAC6x1AAIAAClO9AAF (dictionary objn – 765045, file – 8, block – 676797, slot – 5) Session 92: obj – rowid = 000BAC75 – AAC6x1AAGAACZaUAAE (dictionary objn – … Continue reading
Posted in Uncategorized
Leave a comment
printtbl.sql
Credit for this goes to Tom Kyte @ asktom.oracle.com — printtbl.sql — Ex. @printtbl.sql ‘select * from dba_users where username = “E9811012″‘ set serveroutput on set verify off declare l_theCursor integer default dbms_sql.open_cursor; l_columnValue varchar2(4000); l_status integer; l_descTbl dbms_sql.desc_tab; l_colCnt number; … Continue reading
Posted in Uncategorized
Leave a comment
SQL Profiles
Query to show sql_ids related to SQL Profiles COLUMN category FORMAT a10 COLUMN sql_text FORMAT a88 col name for a33 col last_modified for a12 SELECT NAME, SQL_TEXT, CATEGORY, STATUS, trunc(last_modified) FROM DBA_SQL_PROFILES; select distinct p.name sql_profile_name, s.sql_id from dba_sql_profiles p, DBA_HIST_SQLSTAT … Continue reading
Posted in Uncategorized
Leave a comment