Print Thread
Create Oracle alias
#1347 12/05/00 07:06 PM
Joined: Oct 2000
Posts: 15
Wilmington, DE, USA
D
dgsmith Offline OP
Member
OP Offline
Member
D
Joined: Oct 2000
Posts: 15
Wilmington, DE, USA
Is there a way to create an Oracle alias at runtime, other than to write directly to TNSNames.ora? Or, is there a way to connect to a database for which no alias is defined?

David Smith


David Smith
Re: Create Oracle alias
#1348 12/05/00 08:34 PM
Joined: Dec 2000
Posts: 31
MA, USA
B
Member
Offline
Member
B
Joined: Dec 2000
Posts: 31
MA, USA
Actually you can use the "right side" of the alias from tnsnames.ora instead of an alias itself. So for example I can enter

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=BENTHIC)))

as the alias/database and it will work without using tnsnames.ora. Note that Oracle says that this is unsupported and may stop working in a future version of OCI, but it works so far. Good luck!


------------------
Mark Ford
Benthic Software
Quality Oracle Tools


Mark Ford
Benthic Software
Re: Create Oracle alias
#1349 12/05/00 10:37 PM
Joined: Oct 2000
Posts: 15
Wilmington, DE, USA
D
dgsmith Offline OP
Member
OP Offline
Member
D
Joined: Oct 2000
Posts: 15
Wilmington, DE, USA
That seems to work for us too. Thanks!

David


David Smith

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.035s Queries: 13 (0.010s) Memory: 2.5032 MB (Peak: 3.0420 MB) Data Comp: Off Server Time: 2024-05-18 12:11:51 UTC
Valid HTML 5 and Valid CSS