Guys please help. I have been tasked to create a php page that would connect to an Oracle DB given the below:
Table name that is holding the Solutions info is called: REMMIS2.PBM_SOLUTION_DATABASE
Please see below the TNS connection string.
User id = myid
Password = mypass
REMPRD02=
(DESCRIPTION =
(FAILOVER = ON)
(LOAD_BALANCE = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.53)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.53)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.53)(PORT = 1721))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.53)(PORT = 1722))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.54)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.54)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.54)(PORT = 1721))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.54)(PORT = 1722))
(CONNECT_DATA =
(SERVICE_NAME = MISPRDS1)
(FAILOVER_MODE =
(TYPE = session)
(METHOD = basic)
(DELAY = 5)
(RETRIES = 100)
)
)
)
What I have tried is :
<?php
// Create connection to Oracle
$conn = oci_connect("myid", "mypass", "10.182.237.53/MISPRDS1");
if (!$conn) {
$m = oci_error();
echo $m['message'], "\n";
exit;
}
else {
print "Connected to Oracle!";
}
// Close the Oracle connection
oci_close($conn);
?>
But I cannot establish a connection. I'm not sure if i would first need download instantclient package from Oracle for my server that is running PHP or if my code is wrong. Please assist
Table name that is holding the Solutions info is called: REMMIS2.PBM_SOLUTION_DATABASE
Please see below the TNS connection string.
User id = myid
Password = mypass
REMPRD02=
(DESCRIPTION =
(FAILOVER = ON)
(LOAD_BALANCE = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.53)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.53)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.53)(PORT = 1721))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.53)(PORT = 1722))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.54)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.54)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.54)(PORT = 1721))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.237.54)(PORT = 1722))
(CONNECT_DATA =
(SERVICE_NAME = MISPRDS1)
(FAILOVER_MODE =
(TYPE = session)
(METHOD = basic)
(DELAY = 5)
(RETRIES = 100)
)
)
)
What I have tried is :
<?php
// Create connection to Oracle
$conn = oci_connect("myid", "mypass", "10.182.237.53/MISPRDS1");
if (!$conn) {
$m = oci_error();
echo $m['message'], "\n";
exit;
}
else {
print "Connected to Oracle!";
}
// Close the Oracle connection
oci_close($conn);
?>
But I cannot establish a connection. I'm not sure if i would first need download instantclient package from Oracle for my server that is running PHP or if my code is wrong. Please assist