Ask the Expert

Creating a dblink without using tns_alias

If we can't update the tnsnames.ora file, is there a way to create a dblink without using the tns_alias? What is the format that adds in the port number, etc.?

    Requires Free Membership to View

Oracle 10g does let you use the "hostname:port/service_name" convention instead of a TNS alias when connecting to a remote database with SQL*Plus. However, a quick test of a database link using this convention results in a ORA-12154 error. You'll have to configure your TNSNAMES.ORA config file with the alias you want to use. Your DBA should be able to help you with this.

This was first published in November 2005

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: