[英]OCILOGON error ORA 12514
I am getting 我正进入(状态
Array (
[code] => 12514
[message] => Error while trying to retrieve text for error ORA-12514
[offset] => 0
[sqltext] =>
)
when calling the Ocilogon
function to connect with oracle. 当调用
Ocilogon
函数与oracle连接时。 I got the correct string but still getting the error. 我得到了正确的字符串,但仍然收到错误。
ocilogon()
is deprecated (along with many other aliases ) and you should not be using it in new code. ocilogon()
已被弃用(以及其他许多别名 ),因此您不应在新代码中使用它。 Use oci_connect()
instead. 请改用
oci_connect()
。
Personally I use the following code that doesn't rely on environment settings like TNS_ADMIN
: 我个人使用以下代码,这些代码不依赖于
TNS_ADMIN
类的环境设置:
oci_connect($username, $password, $conn_string);
Where $conn_string
is a valid connection string that looks something like this: $conn_string
是一个有效的连接字符串,看起来像这样:
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = HOST.EXAMPLE.COM)(PORT = 1521))
)
(CONNECT_DATA = (SID = EXAMPLE))
)
You can copy the connection string directly from your TNSNAMES.ORA
file. 您可以直接从
TNSNAMES.ORA
文件复制连接字符串。
This blog entry on oracle.com might be useful further reading for you. oracle.com上的此博客条目可能对您进一步有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.