I have never worked on an oracle database, however, now I need to use php (executed on a different server) to log into the oracle database, but it seems that there is some missing data.
what I have:
what I don't have:
I tried some guessed service names but I get:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I tried some other alternatives such using SID but still the same error with SID this time instead of service:
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
All the other solutions I found require an access to the server to run some scripts or commands, but this is impossible for my case.
The code I use :
$user = 'myUser';
$password = 'myPassword';
$database = 'MY_DB';
$conn=oci_connect($user,$password,
'(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.l.l00)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = someName)
)
)');
if ($conn) {
echo "connected";
}
else
{
echo "not connected";
}
with the error message followed by "not connected" as a result on my browser. So, is it possible to somehow log into the database? or is it impossible?
the DBA gave me the missing information