Re: [cx-oracle-users] makedsn SID vs SERVICE_NAME
Brought to you by:
atuining
From: jo <jos...@sf...> - 2011-12-17 07:33:45
|
Great! thanks a lot, Anthony. j Anthony Tuininga wrote: > Yes, the latest version adds service_name as an optional parameter. > > makedsn('myhost', '1521', service_name = 'mydb') > > or if you prefer to use all keywords > > makedsn(host = 'myhost', port = 1521, service_name = 'mydb') > > Hope that helps! > > Anthony > > On Fri, Dec 16, 2011 at 9:24 AM, jo <jos...@sf...> wrote: > >> Hi all, >> >> I'm trying to access to an oracle service name but makedsn compile the >> dsn string with a SID, like this: >> >> >> dsn = cx_Oracle.makedsn('myhost',1521,'mydb') >> print dsn >> (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1521)))(CONNECT_DATA=(SID=mydb))) >> >> >> >> I'm using this ugly workaround by replacing 'SID' with 'SERVICE_NAME': >> >> >> dsn = cx.makedsn('myhost',1521,'mydb').replace('SID','SERVICE_NAME') >> print dsn >> (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=mydb))) >> >> >> >> It works but I don't like it. Is there another way to do that? >> Thanks for any help. >> >> j >> >> >> >> ------------------------------------------------------------------------------ >> Learn Windows Azure Live! Tuesday, Dec 13, 2011 >> Microsoft is holding a special Learn Windows Azure training event for >> developers. It will provide a great way to learn Windows Azure and what it >> provides. You can attend the event by watching it streamed LIVE online. >> Learn more at http://p.sf.net/sfu/ms-windowsazure >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > ------------------------------------------------------------------------------ > Learn Windows Azure Live! Tuesday, Dec 13, 2011 > Microsoft is holding a special Learn Windows Azure training event for > developers. It will provide a great way to learn Windows Azure and what it > provides. You can attend the event by watching it streamed LIVE online. > Learn more at http://p.sf.net/sfu/ms-windowsazure > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- Jose Soares Sferacarta Net Via Bazzanese 69 40033 Casalecchio di Reno Bologna - Italy Ph +39051591054 fax +390516131537 web:www.sferacarta.com Le informazioni contenute nella presente mail ed in ogni eventuale file allegato sono riservate e, comunque, destinate esclusivamente alla persona o ente sopraindicati, ai sensi del decreto legislativo 30 giugno 2003, n. 196. La diffusione, distribuzione e/o copiatura della mail trasmessa, da parte di qualsiasi soggetto diverso dal destinatario, sono vietate. La correttezza, l’integrità e la sicurezza della presente mail non possono essere garantite. Se avete ricevuto questa mail per errore, Vi preghiamo di contattarci immediatamente e di eliminarla. Grazie. This communication is intended only for use by the addressee, pursuant to legislative decree 30 June 2003, n. 196. It may contain confidential or privileged information. You should not copy or use it to disclose its contents to any other person. Transmission cannot be guaranteed to be error-free, complete and secure. If you are not the intended recipient and receive this communication unintentionally, please inform us immediately and then delete this message from your system. Thank you. |