[转帖]Oracle数据库TNS常见错误解决方法_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
3
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 4412 | 回复: 2   主题: [转帖]Oracle数据库TNS常见错误解决方法        上一篇   下一篇 
lo1yy
注册用户
等级:新兵
经验:71
发帖:1
精华:0
注册:2018-3-21
状态:离线
发送短消息息给lo1yy 加好友    发送短消息息给lo1yy 发消息
发表于: IP:您无权察看 2019-9-19 15:59:07 | [全部帖] [楼主帖] 楼主

1、ORA-12541:TNS:没有监听器

    原因:没有启动监听器或者监听器损坏。若是前者,使用命令net start OracleOraHome10gTNSListener(名字可能有出入)即可;如果是后者,则使用“Net Configuration Assistant”工具向导之“监听程序配置”增加一个监听器即可(基本不用写任何信息,一路OK。在添加之前可能需要把所有的监听器先删!)

    2、ORA-12500:TNS:监听程序无法启动专用服务器进程或ORA-12560:TNS:协议适配器错误

    原因:ORACLE的数据库服务没有启动。使用命令net start ORACLESERVICEORADB(ORADB为数据库名字)即可。如果仍没有解决,请继续向下看。

    3、如果数据库服务启动失败,则很有可能是其注册表项值损坏,最好的做法是以下两步:

    1)ORADIM -DELETE -SID oradb 删除数据库服务项

    2)ORADIM -NEW -SID oradb 新增数据库服务项

    注:这个过程中如果出错,就重启计算机!

    4、ORA-12154:TNS:能解析服务名

    原因:ORACLE的网络服务名没有正确配置。请使用“Net8 Configuration Assistant”工具向导之“本地网络服务名配置”配置TNS即可。如果仍没有解决,请继续向下看。

    5、ORA-1034 :TNS:ORACLE不可用

    原因:ORACLE的数据库服务正确启动,但是数据库没有打开!

    使用命令:

    1)svrmgrl 启动服务管理器

    2)connect internal 以internal身份登陆

    3)startup 打开数据库

    6、ORA-12560:TNS:协议适配器错误(顽固性的)

    原因:未知。

    解决:必杀技--打开“Windows任务管理器”,杀死ORACLE.exe及ORADIM.exe进程,书写自己的ora_startup.bat,执行之!

PS:
1、ora_startup.bat:
net start OracleOraHome81TNSListener
net start ORACLESERVICEORADB


  svrmgrl 一般情况下不用,不过有时少不了它的,具体步骤见第5步。

    2、ora_shutdown.bat:

net stop OracleOraHome81TNSListener
net stop ORACLESERVICEORADB


  3、ORACLE相关服务名请参见“管理工具”之“服务”中以ORACLE开头的服务名

    1、TNS-12154 Error 或ORA-12154

    特征:SQL*NET没有找到连接串或别名

    原因1:(1)没有找到TNSNAMES.ORA文件,该文件的缺省路径为: 

windows 95/98 client
sql*Net 2.x - ORAWIN95NETWORKADMIN
Net8 - ORAWIN95NET80admin
Net8i - ORACLEORA81NETWORKADMIN
windows NT client
sql*Net 2.x - ORANTNETWORKADMIN
Net8 - ORANTNET80ADMIN
Net8i - ORACLEORA81NETWORKADMIN
UNIX Client
$ORACLE_HOME/NETWORK/ADMIN
or /etc
or /var/opt/oracle


  . 在客户端设置TNS_ADMIN

    在注册表 HKEY_LOCAL_MACHINESoftwareOracle 设置TNS_ADMIN. TNS_ADMIN 指向TNSNAMES.ORA文件的位置

    措施:按上述说明检查文件位置

    原因2:(2)TNSNAMES.ORA文件中内容格式不对

    措施:检查文件格式,标准格式如下:

DEV1.WORLD =
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp) (Host = 145.45.78.56) (Port = 1521) ) )
(CONNECT_DATA = (SID = ORCL) ) )


  原因3: (3) TNSNAMES.ORA与SQLNET.ORA不一致

    措施: SQLNET.ORA格式如下:

TRACE_LEVEL_CLIENT = OFF
SQLNET.AUTHENTICATION_SERVICES = (NONE)
NAMES.DIRECTORY_PATH = (TNSNAMES)
AUTOMATIC_IPC = OFF


  因为没有NAMES.DEFAULT_DOMAIN=world,所以DEV1.WORLD连接串不能连接,可以在TNSNAMES.ORA中增加

DEV1 =
(DESCRIPTION = (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (Host = 145.45.78.56) (Port = 1521) ) )
(CONNECT_DATA = (SID = ORCL) ) )


       此时可连接。

     2、NL-00462 Error 或ORA-00462

    特征:监听器无法启动

    原因:LISTENER.ORA文件内容错误,例如,括号不匹配、参数名错误等、多余的空格等。

    措施:重新编辑文件

    3、NL-00405 Error 或ORA-00405

    特征:LISTENER.ORA文件不可读或找不到

    原因:LISTENER.ORA文件内容错误,例如,括号不匹配、参数名错误等、多余的空格等。

    措施:确保文件位置在缺省目录下$ORACLE_HOME/network/admin,或设置环境变量TNS_ADMIN指向这个文件所在位置。

    4、TNS-01155 Error 或ORA-01155

    特征:LISTENER.ORA文件中SID_LIST_LISTENER变量赋值不对

    原因:LISTENER.ORA文件内容错误,SID_LIST_LISTENER变量赋值不对。

    措施:确保文件中赋值正确,$ORACLE_HOME/network/admin/samples目录下有样例文件,可供参考。

    5、TNS-12537 、TNS-12560、TNS-00507 Error

    特征:LISTENER.ORA文件中引用了一个无效的协议适配程序

    原因:LISTENER.ORA文件中PROCOTOL变量赋值不对。

    措施:确保文件中赋值正确,一般用tcp协议,$ORACLE_HOME/network/admin/samples目录下有样例文件,可供参考。用adapters tnslsnr检查协议程序

    6、TNS-12203 Error

    特征:不能与目标连接

    原因:监听器是否启动;别名是否配置

    措施:检查监听器是否启动,例如lsnrctl status;检查TNSNAMES.ORA的别名配置

    7、TNS-12533 Error

    特征:不能与目标连接

    原因:非法的address参数,

    措施:检查TNSNAMES.ORA的ADDRESS参数

    1)用tnsping net_service_name测试网络服务名是否配置正确!

    2)用sqlplus程序通过test网络服务名进行测试,如sqlplus system/manager@test。如果不能连接到数据库,则在tnsname.ora文件中的test网络服务名(net service)后面加上sqlnet.ora文件NAMES.DEFAULT_DOMAIN参数的值。




赞(0)    操作        顶端 
联动大白
注册用户
等级:列兵
经验:91
发帖:0
精华:0
注册:2015-5-27
状态:离线
发送短消息息给联动大白 加好友    发送短消息息给联动大白 发消息
发表于: IP:您无权察看 2019-12-4 0:30:00 | [全部帖] [楼主帖] 2  楼

为了方便大家阅读,我对文章中错误号来解释一下吧!

Error Id: ORA-12154

Title: TNS:could not resolve the connect identifier specified

Description:

TNS:could not resolve the connect identifier specified

Action:

- If you are using local naming (TNSNAMES.ORA file): - Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA) - Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible. - Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file. - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable. - If you are using directory naming: - Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA). - Verify that the LDAP directory server is up and that it is accessible. - Verify that the net service name or database name used as the connect identifier is configured in the directory. - Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier - If you are using easy connect naming: - Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA). - Make sure the host, port and service name specified are correct. - Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.

Cause:

A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.


Error Id: ORA-01155

Title: the database is being opened, closed, mounted or dismounted

Description:

the database is being opened, closed, mounted or dismounted

Action:

Wait for the open, close, mount, or dismount to complete then retry the operation. If necessary, a SHUTDOWN ABORT will always work.

Cause:

The requested operation needs the instance to be in a particular state but the state is being changed.


Error Id: ORA-12541

Title: TNS:no listener

Description:

TNS:no listener

Action:

Ensure that the supplied destination address matches one of the addresses used by the listener - compare the TNSNAMES.ORA entry with the appropriate LISTENER.ORA file (or TNSNAV.ORA if the connection is to go by way of an Interchange). Start the listener on the remote machine.

Cause:

The connection request could not be completed because the listener is not running.


Error Id: ORA-12500

Title: TNS:listener failed to start a dedicated server process

Description:

TNS:listener failed to start a dedicated server process

Action:

Turn on tracing at the ADMIN level and reexecute the operation. Verify that the ORACLE Server executable is present and has execute permissions enabled. Ensure that the ORACLE environment is specified correctly in LISTENER.ORA. The Oracle Protocol Adapter that is being called may not be installed on the local hard drive. Please check that the correct Protocol Adapter are successfully linked. If error persists, contact Oracle Customer Support.

Cause:

The process of starting up a dedicated server process failed. The executable could not be found or the environment may be set up incorrectly.


Error Id: ORA-00405

Title: compatibility type "string"

Description:

compatibility type "string"

Action:

See accompanying error

Cause:

Reporting a type associated with another error.


Error Id: ORA-12560

Title: TNS:protocol adapter error

Description:

TNS:protocol adapter error

Action:

Check addresses used for proper protocol specification. Before reporting this error, look at the error stack and check for lower level transport errors. For further details, turn on tracing and reexecute the operation. Turn off tracing when the operation is complete.

Cause:

A generic protocol adapter error occurred.


Error Id: TNS-12560

Title: TNS:protocol adapter error

Description:

TNS:protocol adapter error

Action:

Check addresses used for proper protocol specification. Before reporting this error, look at the error stack and check for lower level transport errors. For further details, turn on tracing and reexecute the operation. Turn off tracing when the operation is complete.

Cause:

A generic protocol adapter error occurred.


Error Id: TNS-12537

Title: TNS:connection closed

Description:

TNS:connection closed

Action:

None needed; this is an information message.

Cause:

"End of file" condition has been reached; partner has disconnected.


Error Id: TNS-12533

Title: TNS:illegal ADDRESS parameters

Description:

TNS:illegal ADDRESS parameters

Action:

Verify that the destination can be reached using the specified protocol. Check the parameters within the ADDRESS section of TNSNAMES.ORA. Legal ADDRESS parameter formats may be found in the Oracle operating system specific documentation for your platform. Protocols that resolve names at the transport layer (such as DECnet object names) are vulnerable to this error if not properly configured or names are misspelled.

Cause:

An illegal set of protocol adapter parameters was specified. In some cases, this error is returned when a connection cannot be made to the protocol transport.


Error Id: TNS-00507

Title: Connection closed

Description:

Connection closed

Action:

None needed; this is an information message.

Cause:

Normal "end of file" condition has been reached; partner has disconnected.


Error Id: TNS-01155

Title: Incorrectly specified SID_LIST_string parameter in LISTENER.ORA

Description:

Incorrectly specified SID_LIST_string parameter in LISTENER.ORA

Action:

Be sure this parameter is specified as described in the Oracle9i Net Services Reference Guide. For example, SID_LIST_LISTENER = (SID_LIST=(SID_DESC=(SID_NAME=<sid>)(ORACLE_HOME=<oracle_home>)))

Cause:

SID_LIST_<listener_name> in LISTENER.ORA has an error in it.


Error Id: TNS-12203

Title: TNS:unable to connect to destination

Description:

TNS:unable to connect to destination

Action:

Verify that the net service name you entered was correct. Verify that the ADDRESS portion of the connect descriptor which corresponds to the net service name is correct. Ensure that the destination process (for example the listener) is running at the remote node.

Cause:

Invalid address specified or destination is not listening. This error can also occur because of underlying network or network transport problems.


Error Id: TNS-12154

Title: TNS:could not resolve the connect identifier specified

Description:

TNS:could not resolve the connect identifier specified

Action:

- If you are using local naming (TNSNAMES.ORA file): - Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA) - Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible. - Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file. - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable. - If you are using directory naming: - Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA). - Verify that the LDAP directory server is up and that it is accessible. - Verify that the net service name or database name used as the connect identifier is configured in the directory. - Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier - If you are using easy connect naming: - Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA). - Make sure the host, port and service name specified are correct. - Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.

Cause:

A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.


也许你已明白,但对一个人有用也是我存在的理由!^_^ By:持之以恒的大白

-- 来自: 北京联动北方科技有限公司



赞(0)    操作        顶端 
Bobo226
注册用户
等级:上尉
经验:548
发帖:0
精华:0
注册:2020-1-7
状态:离线
发送短消息息给Bobo226 加好友    发送短消息息给Bobo226 发消息
发表于: IP:您无权察看 2023-6-26 14:39:15 | [全部帖] [楼主帖] 3  楼

因酒中含有一定数量 极速飞艇开奖直播 的二氧化碳形成气泡。二氧化碳通过酒的发酵在瓶内或大型储酒缸中自然形成含糖量大于50.1/升的气泡酒。干起泡酒就是干甜型的起泡酒,因酒中含有一定数量的二氧化碳形成气泡。二氧化碳通过酒的发 1688app 酵在瓶内或大型储酒缸中自然形成含糖量小于50.1/升的气泡酒。贵腐酒是源自匈牙利的一种很珍贵的甜酒




赞(0)    操作        顶端 
总帖数
3
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论