Re: Dblink in Oracle10g

From: David Ballester <ballester.david_at_gmail.com>
Date: Tue, 18 Nov 2008 16:54:33 +0100
Message-ID: <6a29f8b0811180754l7182daa4yb99f6bba6bd0ef1b@mail.gmail.com>


2008/11/18 Nagaraj S <nagaraj.chk_at_gmail.com>

> Hi Gurus,
>
>
>
> I have a requirement. I need to drop all the DB links in the Development
> database and recreate them as of Production database. How can i do
> that...
>
> Am aware on oracle 9i we can use dynamic script to create dblink by
> querying sys.link$. How can I over come this in 10g
>
>
> Regards,
> Nagaraj
>

from 9i you can use dbms_metadata.get_ddl to retrive the 'command' to create the object

*DBMS_METADATA*.*GET_DDL*('OBJECT_TYPE','OBJECT_NAME',OWNER) from dual;

For example

set long 200000
select dbms_metadata.get_ddl('DB_LINK','PRODLINK',SCHEMA) from dual;

D.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 18 2008 - 09:54:33 CST

Original text of this message