I am having a problem establishing a connection with my database.
The following connection specification in my program
$dbh = DBI->connect("DBI:Oracle:D102L",'scott/tiger','');
Is giving me the error:
DBI connect('D102L','scott/tiger',...) failed: ORA-12154: TNS:could not
resolve the connect identifier specified (DBD ERROR: OCIServerAttach) at
./test.pl line 17
When I have my environment variable ORACLE_SID set to 'D102L' I can
establish the connection without specifying the database name:
$dbh = DBI->connect("DBI:Oracle:",'scott/tiger','');
(works fine)
I did get the following warnings during the DBD compilation, the problem
may be related to those:
dbdimp.c: In function `ora_db_login6':
dbdimp.c:385: warning: cast to pointer from integer of different size
dbdimp.c:399: warning: cast to pointer from integer of different size
dbdimp.c:409: warning: cast to pointer from integer of different size
dbdimp.c:413: warning: cast to pointer from integer of different size
dbdimp.c: In function `dbd_rebind_ph_char':
dbdimp.c:1169: warning: cast from pointer to integer of different size
sqlplus works without any problems.
The environment is Solaris 10 x86 64 bit. Oracle version is 10.2 64 bit
and I am running the perl program on the database server.
Any ideas?