我编写了一个PHP脚本来从Oracle数据库中提取查询并将结果写入csv文件。 我正在使用Zend Framework连接到数据库。 我知道凭据是正确的,因为我可以通过终端使用SQLPlus进行连接。
这是错误:
Zend_Db_Adapter_Exception: SQLSTATE[HY000]: pdo_oci_handle_factory: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (/home/http/php-5.3.3/ext/pdo_oci/oci_driver.c:579) in /opt/http/Zend/ZendFramework-1.10.3/library/Zend/Db/Adapter/Pdo/Abstract.php on line 144
我试图做研究,但没有可靠的解决方案。 我确实读过它可能与tnsnames.ora关联,但我无法在服务器上找到该文件。 我之前在其他项目中使用过Zend,没有任何问题。
仅供参考:我没有root权限,所以我无法在服务器上做很多魔术。
你有什么建议?
I have written a PHP script to pull a query from an Oracle database and write results to a csv file. I am using Zend Framework to get connected to the database. I know the credentials are correct as I am able to connect through terminal using SQLPlus.
This is the error:
Zend_Db_Adapter_Exception: SQLSTATE[HY000]: pdo_oci_handle_factory: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (/home/http/php-5.3.3/ext/pdo_oci/oci_driver.c:579) in /opt/http/Zend/ZendFramework-1.10.3/library/Zend/Db/Adapter/Pdo/Abstract.php on line 144
I have tried to do research, but no solid solutions. I did read that it could be associated with the tnsnames.ora but I couldn't find that file on the server. I have used Zend before in other projects without any issues.
FYI: I do not have root, so I can't do much magic on the server.
What are your suggestions?
最满意答案
这是Oracle的常见错误消息,与zend甚至php无关。 我通常在SQLDeveloper或Toad中获取此消息。 检查tnsnames.ora,listener.ora,sqlnet.ora,日志文件等,并尝试连接客户端应用程序。 (如果它不起作用,您可以将其报告给管理员)
That's a common errormessage from Oracle, there is nothing to do with zend or even php. I usually get this message in SQLDeveloper or Toad. Check the tnsnames.ora, listener.ora, sqlnet.ora, log files etc. and try to connect with a client app. (if it isn't working, you can report it to the admins)
更多推荐
发布评论