我尝试使用pdo_oci驱动程序连接到Oracle。我的用户有SYSDBA证明:
$oraHost = 'x.x.x.x';
$oraPort = 1521;
$oraUser = 'x';
$oraPassword = 'x';
$oraServiceName = 'x';
$db = "(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = $oraHost)(PORT = $oraPort))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = $oraServiceName)
)
)";
$conn = new PDO("oci:dbname=" . $db, $oraUser, $oraPassword);
并收到错误
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: OCISessionBegin:: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
我如何将SYSDBA角色传递给pdo连接?