码迷,mamicode.com
首页 > 其他好文 > 详细

测试客户端连接12c ASM实例

时间:2019-03-14 00:41:43      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:lease   sas   nfa   enter   product   com   strong   环境   blog   

环境:Oracle 12.2.0.1 RAC
背景:用户反映12c ASM创建的用户具备sysasm权限,但无法在客户端连接到ASM实例,且没有报错。

1.ASM实例创建用户赋予sysasm权限

sqlplus / as sysasm

SQL> create user infa identified by infa;
User created.
SQL> grant sysasm to infa;
Grant succeeded.

2.客户端tnsnames.ora配置

分别针对ASM实例1和实例2配置对应的信息:

ASM12c1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.90)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = +ASM)
      (INSTANCE_NAME = +ASM1)
    )
  )
  
ASM12c2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.92)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = +ASM)
      (INSTANCE_NAME = +ASM2)
    )
  )

因为是12c版本,无需配置UR=A,关于UR=A可参考之前的测试:

3.客户端测试连接

客户端测试连接ASM12c1:

[oracle@db01 admin]$ sqlplus infa/infa@asm12c1 as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 13 22:45:53 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter instance_name

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
instance_name                        string
+ASM1
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

客户端测试连接ASM12c2:

[oracle@db01 admin]$ sqlplus infa/infa@asm12c2 as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 13 22:46:19 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show parameter instance_name

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
instance_name                        string
+ASM2
SQL> 

我测试是没有任何问题的,明天连接实际客户环境再进一步看具体情况。

测试客户端连接12c ASM实例

标签:lease   sas   nfa   enter   product   com   strong   环境   blog   

原文地址:https://www.cnblogs.com/jyzhao/p/10527450.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!