Re: Dblink in Oracle10g

2008/11/18 Nagaraj S <nagaraj.chk@xxxxxxxxx>

> 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.

Other related posts: