tnsnames.ora中UR=A配置使用

来源:转载


在Oracle Database 10g 中使用新的UR=A参数
---------------------------------------
如果正在使用实例注册,则listener.ora文件中默认为没有任何数据库条目,可以在侦听程序中手工配置数据库条目,
或者

可以使用新的Oracle Database 10g参数UR=A更新tnsnames.ora文件。该参数允许只进行管理性的连接。


1.在动态监听中,只有设置了(UR=A)才能够远程访问ASM实例;

2.在静态监听中,无论是否设置(UR=A)均可远程访问ASM实例,甚至可以使用easy connect方法方法ASM实例。


在tnsnames.ora文件中添加(UR=A),则可以远程访问ASM实例。



另外maclean也给出了相应的解释:


当数据库nomount,mount或者restricted时,动态监听显示状态为BLOCKED时,客户端可通过配置UR=A进行连接。

如下:

SQL> startup nomount;ORACLE instance started.Total System Global Area 939495424 bytesFixed Size 2233960 bytesVariable Size 562039192 bytesDatabase Buffers 369098752 bytesRedo Buffers 6123520 bytesSQL> ALTER SYSTEM REGISTER;System altered.[[email protected] ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-JUL-2014 08:41:00Copyright (c) 1991, 2011, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.3.0 - ProductionStart Date 15-JUL-2014 08:40:23Uptime 0 days 0 hr. 0 min. 37 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Log File /u01/app/oracle/diag/tnslsnr/rhl6/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhl6.0x64)(PORT=1521)))Services Summary...Service "ora11gr2" has 1 instance(s). Instance "ora11gr2", status BLOCKED, has 1 handler(s) for this service...The command completed successfully

客户端配置

bbed_ur = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.137.154)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ora11gr2) (UR=A) ) )bbed = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.137.154)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ora11gr2) ) )
C:/Users/YallonKing>sqlplus sys/[email protected] as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on 星期二 7月 29 14:15:24 2014Copyright (c) 1982, 2010, Oracle. All rights reserved.ERROR:ORA-12528: TNS: 监听程序: 所有适用例程都无法建立新连接请输入用户名:C:/Users/YallonKing>sqlplus sys/[email protected]_ur as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on 星期二 7月 29 14:15:28 2014Copyright (c) 1982, 2010, Oracle. All rights reserved.连接到:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select status from v$instance;STATUS------------------------STARTEDSQL> alter database mount;数据库已更改。SQL> alter database open;数据库已更改。SQL> select open_mode from v$database;OPEN_MODE--------------------READ WRITESQL> select status from v$instance;STATUS------------OPEN

原文地址:http://feed.askmaclean.com/archives/tnsname%E4%B8%ADura%E9%85%8D%E7%BD%AE%E4%BD%BF%E7%94%A8.html





分享给朋友:
您可能感兴趣的文章:
随机阅读: