Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

45

积分

0

好友

6

主题
1#
发表于 2012-2-10 15:59:10 | 查看: 7379| 回复: 7
操作系统:
Welcome to SUSE Linux Enterprise Server 10 SP2 (x86_64) - Kernel %r (%t).
数据库版本:11.1.0.7.0
这是新装的数据库,做的是主备,双机切换没有问题,但是客户端连接服务器的时候,报:
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
alert中只有如下报错:
ORA-00942: table or view does not exist

tnsname.ora内容如下:
ISAP =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.46.163.160 )(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ISAP)
    )
  )
service_name为:
SQL> show parameter service_name
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string      ISAP

为什么会报
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
这个错,现在导致这个新装的双机无法投入生产,麻烦帮忙解决下,多谢了
2#
发表于 2012-2-10 16:02:32
action plan:

在server段

cat $ORACLE_HOME/network/admin/sqlnet.ora
cat $ORACLE_HOME/network/admin/tnsnames.ora
cat $ORACLE_HOME/network/admin/listener.ora
cat $ORACLE_HOME/network/admin/endpoints_listener.ora

lsnrctl status 监听器名字
lsnrctl service 监听器名字

回复 只看该作者 道具 举报

3#
发表于 2012-2-10 16:03:09
可恶的TNS-125**,最近也给这东西搞得烦死

回复 只看该作者 道具 举报

4#
发表于 2012-2-10 16:10:10

回复 1# 的帖子

oracle@FJ:~> cat $ORACLE_HOME/network/admin/sqlnet.ora | grep -v ^#

NAMES.DIRECTORY_PATH= (TNSNAMES)

oracle@FJ:~> cat $ORACLE_HOME/network/admin/tnsnames.ora | grep -v ^#

ISAP =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.46.163.160 )(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ISAP)
    )
  )
oracle@FJ:~> cat $ORACLE_HOME/network/admin/listener.ora | grep -v ^#

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.46.163.160)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

SID_LIST_LISTENER =
        (SID_LIST =
        (SID_DESC =
        (GLOBAL_DBNAME = ora11g)
        (ORACLE_HOME = /opt/oracle/product/11g/db)
        (SID_NAME = ISAP)
        )
        )

没有$ORACLE_HOME/network/admin/endpoints_listener.ora文件

回复 只看该作者 道具 举报

5#
发表于 2012-2-10 16:13:55

lsnrctl 信息

oracle@FJXM-DM-PTLDB4:~> lsnrctl status isap

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 10-FEB-2012 16:12:31

Copyright (c) 1991, 2008, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.46.163.160)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ISAP)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date                19-JAN-2012 21:18:05
Uptime                    21 days 18 hr. 54 min. 26 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/11g/db/network/admin/listener.ora
Listener Log File         /opt/oracle/product/11g/db/log/diag/tnslsnr/FJXM-DM-PTLDB4/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.46.163.160)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "ora11g" has 1 instance(s).
  Instance "ISAP", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
oracle@FJXM-DM-PTLDB4:~> lsnrctl service isap

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 10-FEB-2012 16:12:40

Copyright (c) 1991, 2008, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.46.163.160)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ISAP)))
Services Summary...
Service "ora11g" has 1 instance(s).
  Instance "ISAP", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
The command completed successfully

回复 只看该作者 道具 举报

6#
发表于 2012-2-10 16:22:06
SID_LIST_LISTENER =
        (SID_LIST =
        (SID_DESC =
        (GLOBAL_DBNAME = ora11g)
        (ORACLE_HOME = /opt/oracle/product/11g/db)
        (SID_NAME = ISAP)
        )
        )



把GLOBAL_DBNAME 改成 ISAP 然后  重启下监听

TNS-12514: TNS:listener does not currently know of service requested in connect descriptor

找不到合适的 service , 你的监听里确实没有静态的ISAP这个服务名

回复 只看该作者 道具 举报

7#
发表于 2012-2-10 16:49:17

谢谢

问题已解决,谢谢!!!

回复 只看该作者 道具 举报

8#
发表于 2012-2-10 17:01:40
将GLOBAL_DBNAME = ora11g换成isap是什么意思?静态注册了这个?
好像ocm联系中有这个呵呵

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-15 02:04 , Processed in 0.047810 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569