Gerard,

 

Many thanks for your input.  As I’m running under Windows XP do you think there may be a work around at all?

 

Regards Paul…

 


From: Gerard Horan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 11 July 2006 4:12 AM
To: Paul Griffin
Subject: Re: DBI:ORACLE with Oracle XE

 

Paul, I just confirmed my simple OCI test program works fine when I compile/linki with 64 bit mode ( -xarch=amd64) and fails with the TNS Names error under 32 bit mode.

 

My guess is the 32 bit oracel support is busted !!!

 

ger

 

On 7/10/06, Gerard Horan <[EMAIL PROTECTED]> wrote:

I have also connected that way..... I am runing on SOl 10 X64 and built Perl DBI/DBD:oracle myself. There were some issues when I did the build and had to remove -xarch=amd64 from the linker line.

 

Intersting in that I have also created a simple OCI (Oracel C Interfac) C program and it has athe same error. The weird thing is that when I truss the programs  they nevr look on tnsnames.ora.

 

I am suspciious of the Oracle libs on my box when used from a 32 bit exectuable.

 

ger

 

On 7/9/06, Paul Griffin <[EMAIL PROTECTED] > wrote:

Gerard,

Tnsping does work.

I have also managed to connect using the code below.  But I'm unable to
connect any other way.  I'm missing something obvious so if any one can tell
me what this is it would really be appreciated

$dbh = DBI->connect('dbi:Oracle:', q{uid/pwd@(DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = LDPM2001AUS)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = XE)
   )
)},"") or die DBI::errstr;

@tables = $dbh->tables();

foreach $table (@tables) {
  print "Table : $table\n";
}


Regards Paul...

-----Original Message-----
From: Gerard [mailto:[EMAIL PROTECTED] ]
Sent: Monday, 10 July 2006 12:59 PM
To: Paul Griffin
Subject: Re: DBI:ORACLE with Oracle XE

Does tnsping work?

What OS are you on?

gerard
Paul Griffin wrote:
> I can connect to an Oracle XE database with dbi:ODBC using :
>
>
>
> $dbh = DBI->connect("dbi:ODBC:PSTORA01", "uid", "pwd") or die DBI::errstr;
>
>
>
> But am unable to connect with dbi:ORACLE using :
>
>
>
> $dbh = DBI->connect("dbi:Oracle:PSTORA01", "uid", "pwd") or die
DBI::errstr;
>
>
>
> Each time I get the following error :
>
>
>
> DBI connect('PSTORA01','system',...) failed: ORA-12154: TNS:could not
> resolve the connect identifier specified (DBD ERROR: OCIServerAttach) at
> C:\Projects\PST-Repository\Perl\oracle_01.pl line 10
>
> ORA-12154: TNS:could not resolve the connect identifier specified (DBD
> ERROR: OCIServerAttach) at C:\Projects\PST-Repository\Perl\oracle_01.pl
line
> 10.
>
> *** Process "C:\Perl\bin\perl.exe" terminated. Return code=255
>
> med>
>
>
>
>
>
> I'm using XP SP2 with Perl v5.8.8 and DBD-Oracle v1.17.
>
>
>
> Any suggestions/help appreciated.
>
>
>
> Regards Paul...
>
>
> ------_=_NextPart_001_01C69FB3.69C5A240
> Content-Type: text/html; charset=utf-8
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 4849
>
> <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
> xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
> xmlns=3D" http://www.w3.org/TR/REC-html40">
>
> <head>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> charset=3Dus-ascii">
>
>
> <meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
> <style>
> <!--
>  /* Style Definitions */
>  p.MsoNormal, li.MsoNormal, div.MsoNormal
>       {margin:0cm;
>       margin-bottom:.0001pt;
>       font-size:12.0pt;
>       font-family:"Times New Roman";}
> a:link, span.MsoHyperlink
>       {color:blue;
>       text-decoration:underline;}
> a:visited, span.MsoHyperlinkFollowed
>       {color:purple;
>       text-decoration:underline;}
> span.EmailStyle17
>       {mso-style-type:personal-compose;
>       font-family:Arial;
>       color:windowtext;}
> @page Section1
>       {size: 612.0pt 792.0pt;
>       margin:72.0pt 90.0pt 72.0pt 90.0pt;}
> div.Section1
>       {page:Section1;}
> -->
> </style>
>
> </head>
>
> <body lang=3DEN-US link=3Dblue vlink=3Dpurple>
>
> <div class=3DSection1>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>I can connect to an Oracle XE database with dbi:ODBC =
> using :<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>$dbh =3D =
> DBI-&gt;connect(&quot;dbi:ODBC:PSTORA01&quot;, &quot;uid&quot;,
> &quot;pwd&quot;) or die DBI::errstr;<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size: 10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size: 10.0pt;
> font-family:Arial'>But am unable to connect with dbi:ORACLE using =
> :<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>$dbh =3D =
> DBI-&gt;connect(&quot;dbi:Oracle:PSTORA01&quot;,
> &quot;uid&quot;, &quot;pwd&quot;) or die =
> DBI::errstr;<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>Each time I get the following error =
> :<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>DBI connect('PSTORA01','system',...) failed: =
> ORA-12154:
> TNS:could not resolve the connect identifier specified (DBD ERROR:
> OCIServerAttach) at C:\Projects\PST-Repository\Perl\oracle_01.pl line =
> 10<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>ORA-12154: TNS:could not resolve the connect =
> identifier specified
> (DBD ERROR: OCIServerAttach) at =
> C:\Projects\PST-Repository\Perl\oracle_01.pl
> line 10.<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>*** Process &quot;C:\Perl\bin\perl.exe&quot; =
> terminated.
> Return code=3D255<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>med&gt;<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>I&#8217;m using XP SP2 with Perl v5.8.8 and =
> DBD-Oracle v1.17.<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>Any suggestions/help =
> appreciated.<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>
> <p class=3DMsoNormal =
> style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
> size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;font-family:Arial'>Regards
> Paul&#8230;<o:p></o:p></span></font></p>
>
> </div>
>
> <u1:PersonName u2:st=3D"on">
> </body>
>
> </html>
>
> ------_=_NextPart_001_01C69FB3.69C5A240--



 

Reply via email to