LINUX机器上监听和数据库均已经打开
listener.ora
Log messages written to /home/oracle/data/app/oracle/product/8.1.7/network/log/l
istener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=202.100.103.199)(PORT=15
21)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=202.100.103.199)(PORT=24
81))(PROTOCOL_STACK=(PRESENTATION=GIOP)(SESSION=RAW)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 8.1.7.0.0 - Production
Start Date 25-JAN-2002 09:14:24
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /home/oracle/data/app/oracle/product/8.1.7/network/adm
in/listener.ora
Listener Log File /home/oracle/data/app/oracle/product/8.1.7/network/log
/listener.log
Services Summary...
PLSExtProc has 1 service handler(s)
Test has 1 service handler(s)
The command completed successfully
LSNRCTL>
以上是我开监听的显示然后是一个报错:
连DELPHI时的错误:
初始化提供者发生错误,测试连接失败:ORA-12514:TNS:listner could not resolve SERVICE_NAME given in connect descriptor
PHP程序:
<?
putenv("ORACLE_SID=Test");#Test为数据库存名
putenv("ORACLE_HOME=/home/oracle/data/app/oracle/product/8.1.7");
if ($connection = ora_logon("system@Test_202.100.103.199", "manager")){
echo"sussesful" ;
$cursor = Ora_Open ($connection);
if ($cursor == false){
echo Ora_ErrorCode($connection).": ".Ora_Error($connection)."
";
exit;
}
else{echo "false" ;}
?>
连PHP时的错误:
Warning: Oracle: Connection Failed: in Warning: Oracle: Connection Failed: in C:\apache\htdocs\olink.php3 on line 4
false
我的联系方式:MSN
urcrpp@163.com
QQ:8423009