>> Edit article
이름
제목
패스워드
Title : Oracle/DBI connect error(12154) O/S : N/A Author : Meh Type : N/A Date : May 24, 1999 01:07 PT POST :REPLY (W/QUOTE) -- Hi; I'm trying to connect to Oracle via DBI interface,by a simple script like this: use DBI; $dbh = DBI->connect( 'dbi:Oracle:database=1234;host=my.home.adrs;port=1521','dba_name','dba_passwd'); if ( ! defined $dbh){ die " can not connect to server :$DBI::errstr "; } $sth= $dbh->prepare( " SELECT table_name FROM user_tables "); $sth->execute; while( @varList = $sth->fetchrow_array){ print " @varList "; } $sth->finish; $dbh->disconnect; Then I get this error message: ORA-12154: TNS:could not resolve service name (DBD ERROR: OCIServerAttach) at /home/test/dbitest.pl line 4 can not connect to server :ORA-12154: TNS:could not resolve service name (DBD ERROR: OCIServerAttach) Listener.ora file looks OK,and I don't get what OCIServiceAttach is referring to .Any help?Thanks. Meh null Title : Oracle/DBI connect error(12154) O/S : N/A Author : Rahul Sen Gupta Type : N/A Date : May 24, 1999 17:08 PT POST :REPLY (W/QUOTE) -- I have faced the same problem with this OCIserverAttach when I made DBD::Oracle with perl MakeFile.pl. However my message id was ORA-12224 not ORA-12154. Then I remade DBD with perl MakeFile.pl -8. But now I am getting DBI->Connect failed: ORA-12224: TNS no listner (DBD:login failed) Can I get some help? Rahul Meh (guest) wrote: : Hi; : I'm trying to connect to Oracle via DBI interface,by a simple : script like this: : use DBI; : $dbh = DBI->connect( : 'dbi:Oracle:database=1234;host=my.home.adrs;port=1521','dba_name ','dba_passwd'); : if ( ! defined $dbh){ : die " can not connect to server :$DBI::errstr "; : } : $sth= $dbh->prepare( " SELECT table_name FROM user_tables "); : $sth->execute; : while( @varList = $sth->fetchrow_array){ : print " @varList "; : } : $sth->finish; : $dbh->disconnect; : Then I get this error message: : ORA-12154: TNS:could not resolve service name (DBD ERROR: : OCIServerAttach) at /home/test/dbitest.pl line 4 : can not connect to server :ORA-12154: TNS:could not resolve : service name (DBD ERROR: OCIServerAttach) : Listener.ora file looks OK,and I don't get what OCIServiceAttach : is referring to .Any help?Thanks. : Meh null Title : Oracle/DBI connect error(12154) O/S : N/A Author : Rx Type : N/A Date : May 24, 1999 18:48 PT POST :REPLY (W/QUOTE) -- Maybe you both should check whether the listener is REALLY up or not. Use "lsnrctl status" to get the info. Robert Xu Rahul Sen Gupta (guest) wrote: : I have faced the same problem with this OCIserverAttach when I : made DBD::Oracle with perl MakeFile.pl. However my message id : was ORA-12224 not ORA-12154. Then I remade DBD with perl : MakeFile.pl -8. But now I am getting : DBI->Connect failed: ORA-12224: TNS no listner (DBD:login : failed) : Can I get some help? : Rahul : Meh (guest) wrote: : : Hi; : : I'm trying to connect to Oracle via DBI interface,by a simple : : script like this: : : use DBI; : : $dbh = DBI->connect( : : : 'dbi:Oracle:database=1234;host=my.home.adrs;port=1521','dba_name : ','dba_passwd'); : : if ( ! defined $dbh){ : : die " can not connect to server :$DBI::errstr "; : : } : : $sth= $dbh->prepare( " SELECT table_name FROM user_tables "); : : $sth->execute; : : while( @varList = $sth->fetchrow_array){ : : print " @varList "; : : } : : $sth->finish; : : $dbh->disconnect; : : Then I get this error message: : : ORA-12154: TNS:could not resolve service name (DBD ERROR: : : OCIServerAttach) at /home/test/dbitest.pl line 4 : : can not connect to server :ORA-12154: TNS:could not resolve : : service name (DBD ERROR: OCIServerAttach) : : Listener.ora file looks OK,and I don't get what : OCIServiceAttach : : is referring to .Any help?Thanks. : : Meh null Title : Oracle/DBI connect error(12154) O/S : N/A Author : Me Type : N/A Date : May 24, 1999 22:40 PT POST :REPLY (W/QUOTE) -- Good help. But listener was connected properly.Then I found there was an error in (oracle generated file)Listener.ora: Global_dbname was assigned an invalid address. I corrected that and now DBD is connected and working. Thanks Rx (guest) wrote: : Maybe you both should check whether the listener is REALLY up or : not. Use "lsnrctl status" to get the info. : Robert Xu : Rahul Sen Gupta (guest) wrote: : : I have faced the same problem with this OCIserverAttach when I : : made DBD::Oracle with perl MakeFile.pl. However my message id : : was ORA-12224 not ORA-12154. Then I remade DBD with perl : : MakeFile.pl -8. But now I am getting : : DBI->Connect failed: ORA-12224: TNS no listner (DBD:login : : failed) : : Can I get some help? : : Rahul : : Meh (guest) wrote: : : : Hi; : : : I'm trying to connect to Oracle via DBI interface,by a simple : : : script like this: : : : use DBI; : : : $dbh = DBI->connect( : : : : : : 'dbi:Oracle:database=1234;host=my.home.adrs;port=1521','dba_name : : ','dba_passwd'); : : : if ( ! defined $dbh){ : : : die " can not connect to server :$DBI::errstr "; : : : } : : : $sth= $dbh->prepare( " SELECT table_name FROM user_tables "); : : : $sth->execute; : : : while( @varList = $sth->fetchrow_array){ : : : print " @varList "; : : : } : : : $sth->finish; : : : $dbh->disconnect; : : : Then I get this error message: : : : ORA-12154: TNS:could not resolve service name (DBD ERROR: : : : OCIServerAttach) at /home/test/dbitest.pl line 4 : : : can not connect to server :ORA-12154: TNS:could not resolve : : : service name (DBD ERROR: OCIServerAttach) : : : Listener.ora file looks OK,and I don't get what : : OCIServiceAttach : : : is referring to .Any help?Thanks. : : : Meh null Title : re:Oracle/DBI connect error(12154) O/S : MS Windows Author : emmanuel pascual Type : Question Date : Oct 25, 2001 02:57 PT POST :REPLY (W/QUOTE) I also got a message 12154 and my Oracle version is 7.2. I'd like to know what is the correct format of the host string or what do i have to do if i'm using Sql*Plus but could not connect to database. How do i check for the service name?
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved