hopefully one of you guys can help me with this problem. The environment:
Client/webserver (Windows 2000) with Oracle instantclient 11.2 installed and IIS running
Remote Server (OS = Oracle Linux 6, database = 11.2.0 64Bit) The problem:
I can connect to the database server via sqlplus & tnsnames no problem so the instance is started and the database is definitely up.
SQL*Plus: Release 188.8.131.52.0 Production on Tue May 14 10:26:03 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Oracle Database 11g Release 184.108.40.206.0 - 64bit Production
SQL> The error:-
However the client is also a webserver and when I try to connect to the DB via a webpage (php script) I get the following error:
Warning: oci_connect() [function.oci-connect]: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory Process ID: 0 Session ID: 0 PHP connection script:
$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 220.127.116.11)(PORT = 1521)))(CONNECT_DATA=(SID=o11gr2ts)))";
$db_conn = oci_connect("user", "pass", $db);
Unfortunately I'm stuck with using IIS instead of Apache as we have 3rd party software and related components which are IIS dependent.
Has anybody seen this one before? I know ora-01034 & ora27101 are commonly reported errors but I've yet to see them in this context. I've tested this against another Windows-based Oracle installation we have and the script connects fine. Any help gratefully received!.
db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 18.104.22.168)(PORT = 1521)))(CONNECT_DATA=(SID=o11gr2ts)))";
I think your SID is creating issue
Please post the output of
select instance from v$thread ;
select name from v$database ;
yes you are correct, hindsight being a wonderful thing it looks like it was trying to connect to a non-existent instance.
select instance from v$thread = '11gr2ts'
select name from v$database = 'o11gr2ts'
PHP script now changed to correct instance name and connection is successful !
Thankyou very much, must have been a typo on my part on initial install...