Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection string to Oracle

Status
Not open for further replies.

BeckD

Programmer
Apr 16, 2002
53
0
0
GB
Hi

I want to create a connection string to a remote oracle server. Anyone got any examples? All the connection strings I've found are for local oracle databases and I don't think this will work. I want to be able to connect via IP address. I know you can do it for SQL Server - surely it's possible for Oracle?

Thanks in advance,
Beck
 
Thanks mrDrive but I've already looked on that site and couldn't find anything about remotely connecting to Oracle using IP address. Maybe I missed it - if you see it on there let me know!

Cheers,
Beck
 
Hi, Not sure what you mean by ( by IP address )..
Oracle uses an entry in the tnsnames.ora file to locate any particular database instance, so it is in that file you specify the server/port info for that database..
In the connection string you specify the alias used in the tnsnames.ora file to connect.
Like:
myConnString="Provider=MSDAORA;Password=password;User ID=username;Data Source=TNSENTRY;"

There are 'thin client' Java style connection strings
that use the server:port:SID construct to connect but
they only work inside an appropriate Java application .

[profile]
 
Oh I see... thanks for that Turkbear. I was assuming that it would be similar to how it works in SQL Server where you put the IP address in the connection string (I'm new to Oracle if you hadn't guessed!)...

Cheers,
Beck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top