sqlplus sys/sys@dbsid as sysdba无法连到oracle
如题。
sqlplus sys/sys as sysdba;
select banner from v$version;结果:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
CORE 12.1.0.1.0 Production
TNS for Linux: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 - Production
echo $ORACLE_SID得到:
ora12cr1
tnsnames.ora的内容:
ORA12CR1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVER_NAME = orcl.cn.oracle.com)
)
)
lsnrctl status:
LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 10-SEP-2013 21:05:15
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date 10-SEP-2013 20:35:07
Uptime 0 days 0 hr. 30 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost.localdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "orcl.cn.oracle.com" has 1 instance(s).
Instance "ora12cr1", status READY, has 1 handler(s) for this service...
Service "orclXDB.cn.oracle.com" has 1 instance(s).
Instance "ora12cr1", status READY, has 1 handler(s) for this service...
Service "pdborcl.cn.oracle.com" has 1 instance(s).
Instance "ora12cr1", status READY, has 1 handler(s) for this service...
The command completed successfully
sqlplus sys/sys@ora12cr1 as sysdba不能连接到Oracle,出现:
ERROR:
ORA-01017: invalid username/password; logon denied
求各位帮忙,已经搞了两个晚上了。
对了,我把tnsnames.ora中的SERVER_NAME=orcl.cn.oracle.com改为SID=ora12cr1也不行,一样的错。