Category : Databases and related files
Archive   : UTIL91.ZIP
Filename : BDROPPUB.SQL

 
Output of file : BDROPPUB.SQL contained in archive : UTIL91.ZIP
rem BDROPPUB.SQL - This SQL*Plus script builds a SQL*Plus
rem script that may be run to drop all
rem PUBLIC synonyms in specified account.
rem You must have DBA privilege to run this
rem script and have the DBA synonyms created in
rem your account.
rem
rem Syntax:
rem $ SQLPLUS-S USERNAME/PASSWORD @BDROPPUB TABLE_OWNER
rem
rem Set up the SQL*Plus controls
rem
set echo off
set termout off
set feedback off
set verify off
set pause off
set linesize 80
set pagesize 0
rem
define ownername = "&1"
rem
spool droppub.sql
rem
rem SQL statements
rem

select 'drop PUBLIC synonym '||synonym_name||';'
from dba_synonyms
where table_owner like upper('&ownername')
and owner = 'PUBLIC'
order by synonym_name;

spool off
exit


  3 Responses to “Category : Databases and related files
Archive   : UTIL91.ZIP
Filename : BDROPPUB.SQL

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/