- 论坛徽章:
- 0
|
参考文章http://www.xrss.cn/Dev/DataBase/200753013678.Html
OS:rh as4 u2 DATABASE : ORACLE 9204
两种方法均不行,以下是后一种方法:
[root@ora1 admin]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.1.196 ora1
127.0.0.1 ora1 localhost.localdomain localhost
[root@ora1 admin]# cat sqlnet.ora
# SQLNET.ORA Network Configuration File: /opt/app/oracle/product/9.2/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
#SQLNET.AUTHENTICATION_SERVICES= (NONE)
NAMES.DIRECTORY_PATH= (HOSTNAME)
[root@ora1 admin]# cat listener.ora
# LISTENER.ORA Network Configuration File: /opt/app/oracle/product/9.2/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/app/oracle/product/9.2)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ora1)
(SID_NAME = ora9idb)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora1)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
[oracle@ora1 ~]$ tnsping ora1
TNS Ping Utility for Linux: Version 9.2.0.4.0 - Production on 21-MAR-2008 23:15:32
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/opt/app/oracle/product/9.2/network/admin/sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=ora1.))(ADDRESS=(PROTOCOL=TCP)(HOST=ora1)(PORT=1521)))
OK (20 msec)
[oracle@ora1 ~]$ lsnrctl status
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 21-MAR-2008 23:15:51
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 21-MAR-2008 23:06:52
Uptime 0 days 0 hr. 8 min. 59 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /opt/app/oracle/product/9.2/network/admin/listener.oraListener Log File /opt/app/oracle/product/9.2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ora1" has 1 instance(s).
Instance "ora9idb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@ora1 ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Mar 21 23:16:27 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn sys/sys@ora1 as sysdba;
ERROR:
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect
descriptor
问题出在什么地方? |
|