Monday, April 18, 2011

Get DBlinks information

In Oracle you can connect to and query other databases with DBlinks, and that's almost like having the data in your local database ... Until you have problems like latency or shutting down instances needed to work with your local instance; if you didn't install or design your local database chances are you have DBlinks and you don't know.

Therefore, if you want to know information about DBlinks in your database, you can issue this SQL sentences:

SQL> column DB_LINK format a30
SQL> column name format a30
SQL> column value format a50

SQL> select name, value from v$parameter where name like '%dblink%';

NAME VALUE
------------------------------ --------------------------------
dblink_encrypt_login FALSE

SQL> select OWNER, DB_LINK, HOST, CREATED from dba_db_links;

OWNER DB_LINK HOST CREATED
--------------- -------------------- -------------------- ---------
PUBLIC DBLINK1 MYHOST01 25-MAY-08
PUBLIC DBLINK2 MYHOST02 25-MAY-08
PUBLIC DBLINK3 MYHOST03 25-MAY-08
PUBLIC DBLINK4 MYHOST04 25-MAY-08

No comments:

Post a Comment