2010-11-08

Inline Database link

Database links it's a feature that I normally use but I'm not used to create them.
When I created them I relayed the connection to the tnsnames file


CREATE DATABASE LINK to_prod
CONNECT TO user_prod
IDENTIFIED BY password_user_prod
USING 'connection_name';


Today I found out that it's possible to specify the connect string inline

CREATE DATABASE LINK to_prod
CONNECT TO user_prod
IDENTIFIED BY password_user_prod
USING '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.50.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PROD)
)
)';


Great feature!
We are always learning!

No comments:

Post a Comment

Os comentários são moderados.
The comments are moderated.