Sorry - schema ? I dont see such a column
SQL> desc ALL_DB_LINKS
Name Null? Type
----------------------------- -------- --------------------
OWNER NOT NULL VARCHAR2(128)
DB_LINK NOT NULL VARCHAR2(128)
USERNAME VARCHAR2(128)
HOST VARCHAR2(2000)
CREATED NOT NULL DATE
OWNER is self explanatory - PUBLIC or whoever *created* the link in *this* database.
DB_LINK - any meaningful name (lets call it ABC)
USERNAME - who you connect to in the *remote* database
HOST - *how* you get to the *remote* database
So HOST could be (for example) "MY_REMOTE_DB" where MY_REMOTE_DB is an entry in the tnsnames.ora file. Or it could be the full description, eg
"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=db122)))"
So when I do
select * from some_table@abc
I will do:
- lookup link ABC
- find that it connect to a username called (say) scott
- I use scott and either the password I specified when I created the link, or if not, the password I currently have in this local session
- I connect to the host indicated by HOST