Creating the ASMSNMP user on 11.2 ASM RAC reports the next error、Oracle 10G冒出的错误:ORA-12631: Username

ORA-12631

Oracle 10G冒出的错误:

ORA-12631: Username retrieval failed
Cause: The authentication service failed to retrieve the name of a user.
Action: Enable tracing to determine which routine is failing.

Error Type:
Microsoft OLE DB Provider for Oracle (0x80004005)
ORA-12631: Username retrieval failed
/apps/beta14a.asp, line 96
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SBC; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Page:
GET /apps/beta14a.asp
Time:
Monday, July 12, 2004, 10:23:05 AM

对于这个错误 ,一般是由于使用域用户帐号登录导致的,如果换成本地用户则没有问题。
解决方案:
RESOLUTION on METALINK:

These errors are associated with remote authentication on NT under NTS (NT Transport Services). Essentially, the following parameter is set in the “sqlnet.ora”:

SQLNET.AUTHENTICATION_SERVICES = (NTS)

As a result, if you are logged on as a domain user, and you don’t have a network connection (network cable temporary removed or laptop booted standalone), you will not be able to connect to the database because the authentication will try to reach the domain users database on the PDC (Primary Domain Controller) or BDC (Backup Domain Controller).

Solution Description:

There a 2 solutions to connect to the database when no network is present:

1. You can log in as a NT local user.  
 
2. You can disable NTS in sqlnet.ora by setting the following parameter:
   
       SQLNET.AUTHENTICATION_SERVICES = (NONE) 

通过使用NONE,成功解决此问题。

ORA-15306

[oracle@testos:/home/oracle]$ oerr ora 15306
15306, 00000, "ASM password file update failed on at least one node"
// *Cause:  A CREATE USER, ALTER USER, DROP USER, GRANT, or REVOKE
//          command failed on at least one node of the Automatic Storage
//          Management (ASM) cluster.
// *Action: Check the ASM alert logs for more information.
//
[oracle@testos:/home/oracle]$

现象

ASMCMD>  orapwusr --modify --password sys
Enter password: ********
ORA-15306: ASM password file update failed on at least one node
ORA-15321: cannot set attribute with connected clients (DBD ERROR: error possibly near <*> indicator at char 41 in '/* ASMCMD */alter user sys identified by <*>adadadad')
ASMCMD> exit

sql内改

[grid@rac1 ~]$ sqlplus / as sysasm
 
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 14 20:10:44 2020
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
 
SQL> alter user sys identified by Oracle123;
alter user sys identified by Oracle123
                             *
ERROR at line 1:
ORA-15306: ASM password file update failed on at least one node
ORA-15321: cannot set attribute with connected clients

解决方法

#进入grid_home的dbs
[grid@rac1 dbs]$ pwd
/u01/app/11.2.0/grid/dbs
[grid@rac1 dbs]$ ls
ab_+ASM1.dat  hc_+ASM1.dat  init.ora
 

#创建秘钥文件
[grid@rac1 dbs]$  orapwd file='orapw+ASM1' entries=5 password=Oracle123
[grid@rac1 dbs]$ ls
ab_+ASM1.dat  hc_+ASM1.dat  init.ora  orapw+ASM1
 
#复制到其它节点
[grid@rac1 dbs]$ scp orapw+ASM1 rac2:/u01/app/11.2.0/grid/dbs/orapw+ASM2
orapw+ASM1                                                                                                                                    100% 2048     2.0KB/s   00:00    
[grid@rac1 dbs]$ 
 
#创建 asmsnmp 并赋予权
[grid@rac1 rac1]$ sqlplus / as sysasm
 
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 14 20:14:53 2020
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
 
SQL>  create user asmsnmp identified by Oracle123;
 
User created.
 
SQL> grant sysdba to asmsnmp;
 
Grant succeeded.
 
SQL> select * from v$pwfile_users;
 
USERNAME                                                     SYSDBA
------------------------------------------------------------ ----------
SYSOPER    SYSASM
---------- ----------
SYS                                                          TRUE
TRUE       FALSE
 
ASMSNMP                                                      TRUE
FALSE      FALSE
 
 
SQL> 

更改成功

[grid@rac1 rac1]$ asmcmd
ASMCMD> orapwusr --modify --password sys
Enter password: *********
ASMCMD> 
ASMCMD> 
ASMCMD>

2、Creating ASMSNMP User reports ORA-15306: ASM Password File Update Failed On At Least One Node. (文档 ID 1137504.1)

Applies to

Oracle Database - Enterprise Edition - Version 11.1.0.7 and later Information in this document applies to any platform.

Symptoms

Creating the ASMSNMP user on 11.2 ASM RAC reports the next error:

SQL> create user asmsnmp identified by test01;
create user asmsnmp identified by test01
*
ERROR at line 1:
ORA-15306: ASM password file update failed on at least one node

Cause

The ORA-15306 error demonstrates that the ASM password file is missing in one or several node(s) or it is corrupt.

Solution

  1. Remove all the ASM password files from each node:

    rm Grid Oracle Home/dbs/orapw+ASM
    rm Grid Oracle Home/dbs/orapw+ASM
    .
    .
    rm Grid Oracle Home/dbs/orapw+ASM
    
  2. Create ASM password file manually on the first node as the OS user which owns the Grid Infrastructure:

    $> orapwd file='orapw+ASM' entries=5 password=
    
  3. Copy the password file to all nodes with the correct ASM instance name:

    scp orapw+ASM to remote node #1 : Grid Oracle Home/dbs/orapw+ASM
    scp orapw+ASM to remote node #2 : Grid Oracle Home/dbs/orapw+ASM
    .
    .
    scp orapw+ASM to remote node # : Grid Oracle Home/dbs/orapw+ASM
    
  4. Add the ASMSNMP user in ASM instance, and grant sysdba privilege to it:

    SQL> create user asmsnmp identified by;
    SQL> grant sysdba to asmsnmp;
    
  5. Verify the ASMSNMP user was created:

    SQL> select * from v$pwfile_users;
    
    USERNAME SYSDB SYSOP SYSAS
    ------------------------------ ----- ----- -----
    SYS TRUE TRUE TRUE
    ASMSNMP TRUE FALSE FALSE
    

Note: Pre 11gR2, each node in the cluster had ASM password file named as orapw. Starting 11gR2, password file in a RAC cluster is named using the format orapw<+’_asmsid’> .”_asmsid” is an underscore parameter that defines default SID/Name of ASM instance:

Value   Value
Underscore Parameter                       Session Instnc  Description
------------------------------------------ ------- ------- ---------------------------------------------------------
_asmsid                                    asm     asm     ASM instance id

Example

Pre 11gR2:

Password file on Node1: orapw+ASM1
Password file on Node2: orapw+ASM2

11gR2 and onwards:

Password file on Node1: orapw+ASM
Password file on Node2: orapw+ASM
  • 12
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值