试试看try catch结构
try {
  $stmt=OCIParse($conn,$SQL);
  OCIExecute($stmt);
  OCIFreeStatement($stmt);} catch (Exception $e) {
  echo 'error';
}