免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4168 | 回复: 4
打印 上一主题 下一主题

[求助}legato备份oracle10g TNS 无法解析 ORA-12154: TNS:could not resolve.. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-31 16:13 |只看该作者 |倒序浏览
遇到个奇怪问题

bserver003是legato 7.3服务器端
bserver006是要备份的数据库服务器 版本 10.2.0
操作系统aix 5.3

用legato networker  console对oracle数据库备份
老报错
nsr日志中的报错

RMAN> connect target *
2> run {
3> allocate channel t1 type 'SBT_TAPE';
4> allocate channel t2 type 'SBT_TAPE';
5> allocate channel t3 type 'SBT_TAPE';
6> send 'NSR_ENV=(NSR_SERVER=berver003)';
7> crosscheck archivelog all;
8> backup
9> format "arch_%d_t%t_s%s_p%p"
10> (archivelog all delete input);
11> release channel t1;
12> release channel t2;
13> release channel t3;
14> }
15>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-12154: TNS:could not resolve the connect identifier specified

Recovery Manager complete.


SQLNET.ORA 的配置 也没错

NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)


listener的配置

PROD =
  (ADDRESS_LIST =
        (ADDRESS= (PROTOCOL= IPC)(KEY= EXTPROCPROD))
        (ADDRESS= (PROTOCOL= TCP)(Host= erpdb.bserver.com)(Port= 1521))      
--- erpdb.bserver.com这个地址是21.8.143.227 这三个ip都是bserver006的
        (ADDRESS= (PROTOCOL= TCP)(Host= 21.8.143.228 )(Port= 1521))
        (ADDRESS= (PROTOCOL= TCP)(Host= 21.8.142.241 )(Port= 1521))
        
  )

hosts的配置 21.8.142.241 bserver006
                21.8.143.227  erpdb.bserver.com
                21.8.143.226   bserver003
                .....


tnsnames.ora的配置

PROD=
        (DESCRIPTION=
                (ADDRESS=(PROTOCOL=tcp)(erpdb.bserver.com)(PORT=1521))
            (CONNECT_DATA=
                (SERVICE_NAME=PROD)
                (INSTANCE_NAME=PROD)
            )
        )

似乎都没错的
本地tnsping prod 也是正常的
$ tnsping prod

TNS Ping Utility for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Production on 30-DEC-2007 18:58:34

Copyright (c) 1997, 2006, Oracle.  All rights reserved.

Used parameter files:
/ebs_db_180g/prod/proddb/10.2.0/network/admin/PROD_bserver006/sqlnet_ifile.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=21.8.143.227)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=PROD) (INSTANCE_NAME=PROD)))
OK (0 msec)


而且本机运行同一 rman 脚本是正常的

rman脚本

connect target lgto/lgto@prod;
run {
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
allocate channel t3 type 'SBT_TAPE';
send 'NSR_ENV=(NSR_SERVER=bserver003)';
crosscheck archivelog all;
backup
format "arch_%d_t%t_s%s_p%p"
(archivelog all delete input);
release channel t1;
release channel t2;
release channel t3;
}

请指教 新年快乐

论坛徽章:
0
2 [报告]
发表于 2008-01-01 02:31 |只看该作者
哎呀妈呀 2008了 一年过去了 都没有人回复 自己顶下

论坛徽章:
2
2015年迎新春徽章
日期:2015-03-03 17:33:52数据库技术版块每日发帖之星
日期:2015-09-21 06:20:00
3 [报告]
发表于 2008-01-02 14:18 |只看该作者
这玩意没啥花头的喽,仔细检查:
1.target和catalog库的tnsname.ora,(大小写注意)保证相互tnsping通。
2.rman写成:
  connect target lgto/lgto@prod;
   connect catalog xxx/xxx@xxxxx;
   试试。
3.lgto和xxx权限。
4.link。

论坛徽章:
0
4 [报告]
发表于 2008-01-02 14:37 |只看该作者
原帖由 w3wu 于 2008-1-2 14:18 发表
这玩意没啥花头的喽,仔细检查:
1.target和catalog库的tnsname.ora,(大小写注意)保证相互tnsping通。
2.rman写成:
  connect target lgto/lgto@prod;
   connect catalog xxx/xxx@xxxxx;
   试试。
...


同意

论坛徽章:
0
5 [报告]
发表于 2008-01-04 14:19 |只看该作者

多谢二位 已解决

原因是 legato默认的$TNS_ADMIN和真实环境不符 所以呢本机可以pl/sql d也可以 就legato行,指定了 legato nw的 $tns_admin后 问题解决 多谢了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP