findobj.sql
select * from user_objects where object_name = upper(‘&objnm’);
select * from user_objects where object_name = upper(‘&objnm’);
set pagesize 300 set linesize 130 set head on set echo off accept tab prompt “Enter The Table Name -> ” select b.constraint_name “Cons Name”, b.status, decode(b.constraint_type, ‘P’, ‘PRIMARY’, ‘C’, ‘CHECK’, ‘U’, ‘UNIQUE’, ‘R’, ‘FOREIGN KEY’) “Cons Type”, substr(a.column_name, 1, 20) “Column Name”, decode(b.constraint_type, ‘C’, ‘ MUST NOT BE NULL’ , ‘ Position : ‘)…
set markup html preformat on Rem Rem Use the display table function from the dbms_xplan package to display the last Rem explain plan. Force serial option for backward compatibility Rem select plan_table_output from table(dbms_xplan.display(‘plan_table’,null,’serial’));
set markup html preformat on Rem Rem Use the display table function from the dbms_xplan package to display the last Rem explain plan. Use default mode which will display only relevant information Rem select * from table(dbms_xplan.display());
create table PLAN_TABLE ( statement_id varchar2(30), plan_id number, timestamp date, remarks varchar2(4000), operation varchar2(30), options varchar2(255), object_node varchar2(128), object_owner varchar2(30), object_name varchar2(30), object_alias varchar2(65), object_instance numeric, object_type varchar2(30), optimizer varchar2(255), search_columns number, id numeric, parent_id numeric, depth numeric, position numeric, cost numeric, cardinality numeric, bytes numeric, other_tag varchar2(255), partition_start varchar2(255), partition_stop varchar2(255), partition_id numeric, other…
Oracle Internals http://www.ixora.com.au/notes/ http://www.stormloader.com/yonghuang/computer/x$table.html http://www.adp-gmbh.ch/ora/misc/x.html http://www.oracle-training.cc/oracle_tips.htm
**exporting only structure** exp userid=username/password@conn_str file=expdat.dmp tables= table1, table2, table3, table4, table5, table6, table7, table8 rows=n statistics=none **exp command help** exp help=y
Explaination about X$tables http://www.stormloader.com/yonghuang/computer/x$table.html
set linesize 132 select owner, substr(object_name,1,30) objname , object_type from dba_objects where owner not in (‘SYS’, ‘SYSTEM’) and status = ‘INVALID’ order by owner, object_type, object_name;
**************************************************** File Name : a.sql **************************************************** create or replace view ats_dba_waiters as select /*+ all_rows */ w.session_id waiting_session, h.session_id holding_session, w.lock_type, h.mode_held, w.mode_requested, w.lock_id1, w.lock_id2 from ats_dba_lock w, ats_dba_lock h where h.blocking_others = ‘Blocking’ and h.mode_held != ‘None’ and h.mode_held != ‘Null’ and w.mode_requested != ‘None’ and w.lock_type = h.lock_type and w.lock_id1 = h.lock_id1 and…