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

 
Output of file : BRENTABS.SQL contained in archive : UTIL91.ZIP
rem BRENTABS.SQL - This SQL*Plus script builds a SQL*Plus script
rem that may be run to rename all tables in the
rem specified account with the prefix OLD.
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 @BRENTABS OWNER_NAME
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 rentabs.sql
rem
rem SQL statements
rem

select 'rename '||table_name||' to OLD_'||table_name||';'
from dba_tables
where owner like upper('&ownername')
order by table_name;

spool off
exit


  3 Responses to “Category : Databases and related files
Archive   : UTIL91.ZIP
Filename : BRENTABS.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/