如题。
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 - Productionecho $ORACLE_SID得到:
ora12cr1tnsnames.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:15Copyright (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也不行,一样的错。
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 - Productionecho $ORACLE_SID得到:
ora12cr1tnsnames.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:15Copyright (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也不行,一样的错。
解决方案 »
- Oracle 使用edit命令问题
- PLSQL Developer 和 Oracle
- 一个临时表查询问题:invalid use of an aggegate function
- oracle有switch语句么??????????
- 急!怎么将Oracel中全角的数字(nvarchar2)转为int类型的数字。
- 視圖值傳遞到表
- 如何将一数据库某个表内全部内容插入到另一个数据库相同的表中,另一个数据库的表内是空的
- 我要写一个 存储过程 把应用程序运行情况写进日志文件里.请问我该怎么得到这个路径???
- 请问blob类型的数据怎么相加呢?
- 100百分征答,急!!答案解决问题后,另外再给200分
- GoldenGate的Data Pump进程问题
- oracle pl/sql developer 如何在test窗口打断点啊
我就是在本机啊
不输入用户密码,直接一个斜杠
sqlplus /@ora12cr1 as sysdba
这样不行吗
我就是在本机啊
不输入用户密码,直接一个斜杠
sqlplus /@ora12cr1 as sysdba
这样不行吗
我只是想确认下是不是密码不正确
1.sqlplus /nolog
2.conn / as sysdba
不是说了 sqlplus sys/sys as sysdba能连接sqlplus sys/sys@ora12cr1 as sysdba不能连接吗?
而且只有一个数据库,所以也不会是连接其他数据库的问题唉,不知道是不是12c在认证这块有啥不一样了
不是说了 sqlplus sys/sys as sysdba能连接sqlplus sys/sys@ora12cr1 as sysdba不能连接吗?
而且只有一个数据库,所以也不会是连接其他数据库的问题唉,不知道是不是12c在认证这块有啥不一样了
这么说,我想起来我曾经也出现过这个情况,原因是tnsnames.ora文件里面配的链接名称前面多了个空格,感觉这个文件里面的格式还是很严格的。
要不试试,把这个文件里面的配置删掉,使用oracle带的工具配置试试。
orapwd file=d:/oracle/DATABASE/pwd+sid.ORA password=sys entries=10;
echo $ORACLE_SID返回ora12cr1
echo $ORACLE_SID返回ora12cr1
我记得
(SERVER_NAME = orcl.cn.oracle.com)
orcl.cn.oracle.com应该换成ora12cr1
sqlplus / as sysdba
这样是通过操作系统来认证登录的,不需要密码文件也不需要listener,
至于你写成sqlplus /@ora12cr1 as sysdba我就没见过,
你倒是可以先export ORACLE_SID=ora12cr1,然后再sqlplus / as sysdba
2.export ORACLE_SID=ora12cr1,然后再使用sqlplus sys/sys@ora12cr1 as sysdba链接看看。