gpt4 book ai didi

php - 使用 pdo、SID 和 INSTANCE_NAME 连接 oracle

转载 作者:搜寻专家 更新时间:2023-10-31 20:47:03 24 4
gpt4 key购买 nike

如何使用 PDO::__construct() 连接到 Oracle。

我有主机、端口、SID 和 INSTANCE_NAME。

寻找我建立的资料

 CONNECT username@[//]host[:port][/service_name][:server][/instance_name]

http://docs.oracle.com/cd/E18283_01/network.112/e10836/naming.htm#i498306 ,但我不知道如何将其“翻译”为 PDO。

最佳答案

试试这个:

oci:dbname=//host:port/SID/INSTANCE_NAME

并查看 http://www.php.net/manual/en/ref.pdo-oci.connection.php获取更多信息。用户名单独传递。

关于php - 使用 pdo、SID 和 INSTANCE_NAME 连接 oracle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11970261/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com