Home » RDBMS Server » Server Administration » Synonm Creation Script
Synonm Creation Script [message #374357] Thu, 07 June 2001 12:42 Go to next message
jeff g
Messages: 5
Registered: June 2001
Junior Member
Anyone have a script that will build synonms for all tables in a tablespace?
Re: Synonm Creation Script [message #374361 is a reply to message #374357] Thu, 07 June 2001 17:49 Go to previous message
Bala
Messages: 205
Registered: November 1999
Senior Member
Hi,

For tablespace or Schema?

this will create synonym for a schema..
set verify off
set echo off
set pagesize 0
set linesize 200

spool cre_syn.sql
accept owner_name prompt 'Enter the objectowner name:'
select 'create synonym ' || table_name || ' for &owner_name' || '.' || table_name
||';' from all_tables where owner = upper('&owner_name')
/

spool off
@cre_syn.sql

Bala.
Previous Topic: LONG type problem - ORA-01704: string literal too long
Next Topic: truncate and delete
Goto Forum:
  


Current Time: Mon Jul 01 04:03:41 CDT 2024