 |
|
Oracle Tips by Burleson |
DROP_BY_CAT
The drop_by_cat procedure drops all outlines that belong to a
specific category. The procedure drop_by_cat has one input variable,
cat, a VARCHAR 2 that corresponds to the name of the category you
want to drop.
SQL> create outline test_outline for category test on
2 select a.table_name, b.tablespace_name, c.file_name from
3 dba_tables a, dba_tablespaces b, dba_data_files c
4 where
5 a.tablespace_name=b.tablespace_name
6 and b.tablespace_name=c.tablespace_name
7 and c.file_id = (select min(d.file_id) from dba_data_files d
8 where c.tablespace_name=d.tablespace_name)
9 ;
Operation 180 succeeded.
SQL> select * from dba_outlines where category='TEST';
NAME OWNER CATEGORY USED TIMESTAMP VERSION SQL_TEXT
------------ ------ -------- ------ --------- ----------
-------------------------
TEST_OUTLINE SYSTEM TEST UNUSED 08-MAY-99 8.1.3.0.0 select
a.table_name, b.ta
blespace_name, c.file_nam
e from
dba_tables
a, dba_tablesp
aces b,
dba_data_files c
where
a.tablespace_name=b.table
space_name
and
b.tablespace_name=c.t
ablespace_name
and
c.file_id = (select m
in(d.file_id) from dba_da
ta_files
d
where
c.tablespace_name=d
.tablespace_name)
1 row selected.
SQL> execute sys.outln_pkg.drop_by_cat('TEST');
PL/SQL procedure successfully completed.
SQL> select * from dba_outlines where category='TEST';
no rows selected
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|