-- Description : Creates the DDL for the specified synonym, or all synonyms.
-- -----------------------------------------------------------------------------
------
owner_ddl.sql
-- Author : aws-senior.com
-- Description : Creates the DDL for the specified synonym, or all synonyms.
-- Search based on owner of the object, not the synonym.
-- Call Syntax : @synonym_by_object_owner_ddl (schema-name) (synonym-name or al
l)
-- -----------------------------------------------------------------------------
------
SET LONG 20000 LONGCHUNKSIZE 20000 PAGESIZE 0 LINESIZE 1000 FEEDBACK OFF VERIFY
OFF TRIMSPOOL ON
BEGIN
DBMS_METADATA.set_transform_param (DBMS_METADATA.session_transform, 'SQLTERMI
NATOR', true);
DBMS_METADATA.set_transform_param (DBMS_METADATA.session_transform, 'PRETTY',
true);
END;
/
SELECT DBMS_METADATA.get_ddl ('SYNONYM', synonym_name, owner)
FROM all_synonyms
WHERE table_owner = UPPER('&1')
AND synonym_name = DECODE(UPPER('&2'), 'ALL', synonym_name, UPPER('&2'));
SET PAGESIZE 14 FEEDBACK ON VERIFY ON
--------------------------------------------------------------------------------------
-- File Name : https://github.com/Zaalouni/OracleDba
-- Author : Zaalouni
-- website : www.aws-senior.com
-- Github : https://github.com/Zaalouni/OracleDba
--------------------------------------------------------------------------------------
aws-senior.com
www.aws-senior.comVisite out website www.aws-senior.com
http://www.aws-senior.com
www.aws-senior.com -- Description : Creates the DDL for the specified synonym, or all synonyms.
-- Description : Creates the DDL for the specified synonym, or all synonyms.
-- Description : Creates the DDL for the specified synonym, or all synonyms.
Aucun commentaire:
Enregistrer un commentaire