以前一直在服务器上的使用oracle用户操作数据库,今天切换了另外一个用户,已经将该用户添加到dba组里,但是无法登录
[etl@node1 shell]$ whoami
etl
[etl@node1 shell]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 28 14:10:09 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> connect hxl/hxl@myrac_kettle
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
tnsnames.ora文件的内容如下,没有发现不对的地方,因为oracle用户是可以使用该tns登录的.
[oracle@node1 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/product/oracle/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
RACDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hxlscan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb)
)
)
myrac_kettle =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.201)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.202)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = kettle)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
估计是该文件的权限问题,修改文件的权限后,问题解决.
[oracle@node1 admin]$ chmod 755 tnsnames.ora
[oracle@node1 admin]$ ls -al
total 20
drwxr-xr-x 3 oracle oinstall 4096 Feb 28 14:09 .
drwxr-xr-x 11 oracle oinstall 4096 Feb 25 17:11 ..
drwxr-xr-x 2 oracle oinstall 4096 Feb 25 17:02 samples
-rw-r--r-- 1 oracle oinstall 187 May 7 2007 shrept.lst
-rwxr-xr-x 1 oracle oinstall 731 Feb 28 14:09 tnsnames.ora
-- The End --
阅读(1937) | 评论(0) | 转发(0) |