For Programmers: Free Programming Magazines  


Home > Archive > Tcl > April 2005 > ORATCL and dsnless connections









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ORATCL and dsnless connections
Patrick Dunnigan

2005-04-25, 3:59 pm

There does not appear to be support in ORATCL for dsnless connections. In
other words if I want to connect to a remote database without using a sid in
tnsnames, could I provide the server, dbname, and port in the connection
string to ORATCL and by pass the tnsnames? I have not found an example of
this yet.

This is supported in DBD:Oracle and I'd like to mirror this.

If the answer is no, then has anyone worked on a mod to ORATCL for dsn-less
connections?


bs

2005-04-25, 4:00 pm

There was a similiar question a few ws ago. Does this help:

http://groups-beta.google.com/group...ee264c7a37d39b2

Patrick Dunnigan

2005-04-25, 4:00 pm

Thanks, but the results of that thread aren't what I'm looking for.

I am trying to bypass the tnsnames.ora file completely by providing the host
and sid, and maybe the port if it's not 1521 or 1526 (rare but I have to
account for it) in the connection string.

The reason for this is that the number and configuration of the target
databases is stored in a database elsewhere and we don't want to have to
manage the tnsnames.ora file whereever this software is installed.

This works beautifully using DBD:Oracle (which for the past three years I
have happened to use from my TCL script using the dbttotcl extension).
However I'd like to now cut out all DBD/DBI software and go straight to OCI
through ORATCL.


"bs" <brett.schwarz@gmail.com> wrote in message
news:1114449505.280918.306300@z14g2000cwz.googlegroups.com...
> There was a similiar question a few ws ago. Does this help:
>
> http://groups-beta.google.com/group...ee264c7a37d39b2
>



Patrick Dunnigan

2005-04-25, 8:58 pm

I found the proper syntax for skipping the tnsnames.ora file by passing the
entire name-value pair string in place of the service name. The following
syntax works and also works as the dblink parameter to OCIServerAttach().

oralogon
scott/ tiger@(DESCRIPTION=(ADDRESS_LIST=(ADDRES
S=(PROTOCOL=TCP)(HOST=localhost. localdomain)(PORT=1521)))(CONNECT_DATA=(
SERVICE_NAME=test)))


Maybe the ORATCL docs could note this in the future?


"Patrick Dunnigan" <pdunnigan@adelphia.net> wrote in message
news:dsCdncEc87aat_DfRVn-2Q@adelphia.com...
Thanks, but the results of that thread aren't what I'm looking for.

I am trying to bypass the tnsnames.ora file completely by providing the host
and sid, and maybe the port if it's not 1521 or 1526 (rare but I have to
account for it) in the connection string.

The reason for this is that the number and configuration of the target
databases is stored in a database elsewhere and we don't want to have to
manage the tnsnames.ora file whereever this software is installed.

This works beautifully using DBD:Oracle (which for the past three years I
have happened to use from my TCL script using the dbttotcl extension).
However I'd like to now cut out all DBD/DBI software and go straight to OCI
through ORATCL.


"bs" <brett.schwarz@gmail.com> wrote in message
news:1114449505.280918.306300@z14g2000cwz.googlegroups.com...
> There was a similiar question a few ws ago. Does this help:
>
> http://groups-beta.google.com/group...ee264c7a37d39b2
>




sigzero@gmail.com

2005-04-26, 4:02 am

Cool...

I noted it here: http://wiki.tcl.tk/12147

Robert

Don Libes

2005-04-26, 4:02 pm

What's the "SERVICE_NAME=test" part?

Don

"Patrick Dunnigan" <pdunnigan@adelphia.net> writes:
[color=darkred]
> I found the proper syntax for skipping the tnsnames.ora file by passing the
> entire name-value pair string in place of the service name. The following
> syntax works and also works as the dblink parameter to OCIServerAttach().
>
> oralogon
> scott/ tiger@(DESCRIPTION=(ADDRESS_LIST=(ADDRES
S=(PROTOCOL=TCP)(HOST=localhost. localdomain)(PORT=1521)))(CONNECT_DATA=(
SERVICE_NAME=test)))
>
>
> Maybe the ORATCL docs could note this in the future?
>
>
> "Patrick Dunnigan" <pdunnigan@adelphia.net> wrote in message
> news:dsCdncEc87aat_DfRVn-2Q@adelphia.com...
> Thanks, but the results of that thread aren't what I'm looking for.
>
> I am trying to bypass the tnsnames.ora file completely by providing the host
> and sid, and maybe the port if it's not 1521 or 1526 (rare but I have to
> account for it) in the connection string.
>
> The reason for this is that the number and configuration of the target
> databases is stored in a database elsewhere and we don't want to have to
> manage the tnsnames.ora file whereever this software is installed.
>
> This works beautifully using DBD:Oracle (which for the past three years I
> have happened to use from my TCL script using the dbttotcl extension).
> However I'd like to now cut out all DBD/DBI software and go straight to OCI
> through ORATCL.
>
>
> "bs" <brett.schwarz@gmail.com> wrote in message
> news:1114449505.280918.306300@z14g2000cwz.googlegroups.com...
ramesh venk

2005-04-26, 4:02 pm

Don Libes wrote:
> What's the "SERVICE_NAME=test" part?


I believe that it's the database instance. When using the 'traditional'
Oratcl syntax, that would be "user/password@test"

--Ramesh

sigzero@gmail.com

2005-04-26, 4:02 pm

That is the actual db name itself...in the tnsnames.ora file.

Robert

thelfter@gmail.com

2005-04-28, 4:04 am

I will update the oratcl docs as you requested.

-Todd

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com