| 
	
 | 
 Posted by a_dba_used_to_oracle on 08/21/06 18:14 
Greetings, all! 
 
 
  I've searched the MS SQL Server Books Online and this group. 
 
  I've been doing Oracle on UNIX for 12+ years, and now I have some SQL 
Server databases. 
 
  I've discovered the INFORMATION_SCHEMA tables (just like the good ol' 
dba_* views in 
  Oracle) 
 
  I've figured out how to use SQL2005 Management Studio. 
 
  What'd I'd like to know is - can SQL Server be used to write SQL like 
Oracle can; e.g: 
 
spool csyn.sql 
set heading off 
set pagesize 6000 
 
select 'CREATE PUBLIC SYNONYM '||table_name||' FOR 
SYSADM.'||TABLE_NAME||';' 
from dba_tables where owner='SYSADM'; 
 
spool off 
 
In SQL*Plus, the above will create a script to create public synonyms 
for tables in a PeopleSoft database (tables in PeopleSoft multiply like 
Tribbles in a storage bin of quadrotriticale...). 
 
Yah, GUI's are fine....until you have thousands and thousands of tables 
to deal with! 
 
Thanks ever so much
 
  
Navigation:
[Reply to this message] 
 |