Sunday, 17 April 2016

How To Take Backup Database Link In Oracle




For All DBlinks backup:
-------------------------------
SQL> set pages 0
SQL> set long 90000
SQL> set trimspool on
SQL> SELECT u.OWNER,DBMS_METADATA.GET_DDL('DB_LINK',u.DB_LINK,u.OWNER) FROM dba_db_links u;


For a specific DBlink backup:
--------------------------------------
SQL> set pages 0
SQL> set long 90000
SQL> set trimspool on
SQL> SELECT DBMS_METADATA.GET_DDL('DB_LINK','&DB_LINK_NAME','&USER_NAME') FROM dba_db_links


No comments:

Post a Comment