You can create a database link without having a SQL*NET string in your tnsnames.ora file. This is beneficial when...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
you use a remote database for one time only or you have a different client (eg, 8.0 vs. 7.3). This tip has been tested on Oracle 8.0.5. It may also work with 8i or other versions that use SQL*NET.
create database link disali connect to dis identified by dis using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ) <--- DB Server IP (PORT = 1521))) (CONNECT_DATA = (SID = DIS)))' <---- SID OF DB
For More Information
- Feedback: E-mail the editor with your thoughts about this tip.
- More tips: Hundreds of free Oracle tips and scripts.
- Tip contest: Have an Oracle tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize -- submit your tip today!
- Ask the Experts: Our SQL, database design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.
- Forums: Ask your technical Oracle questions--or help out your peers by answering them--in our active forums.
- Best Web Links: Oracle tips, tutorials, and scripts from around the Web.