I am trying to execute insert command after deleting data from a table but it is giving me an error. I am doing an ACID transaction.
<?php
require ( 'conn.conf' );
if ($querydb){
try {
//$querydb->beginTransaction();
$deleteSQL = "delete from THIRD_PARTY_MON";
$insertSQL = "insert into THIRD_PARTY_MON( select param1, param2 from database@dblink )";
$parse = oci_parse( $querydb, $deleteSQL );
oci_execute( $parse, OCI_NO_AUTO_COMMIT );
$parse = oci_parse( $querydb, $insertSQL );
oci_execute( $parse , OCI_COMMIT_ON_SUCCESS );
//oci_commit( $querydb );
} catch (exception $e){
oci_rollback( $querydb );
}
}
?>
PHP Warning: oci_execute(): ORA-02019: connection description for remote database not found in C:\mon_scripts\third_party.php on line 16
Warning: oci_execute(): ORA-02019: connection description for remote database not found in C:\mon_scripts\third_party.php on line 16
After getting this error if I run a select query, the table THIRD_PARTY_MON
is empty, so nothing was inserted into it.
What am I doing wrong here ?