pwcopy --dbuniquename 用户角色分离 grid oracle 不同用户时不成功

APPLIES TO:

Oracle Database Backup Service - Version N/A and later

Oracle Database Cloud Exadata Service - Version N/A and later

Oracle Database Cloud Service - Version N/A and later

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later

Oracle Database Cloud Schema Service - Version N/A and later

Information in this document applies to any platform.

GOAL

During the creation of a standby database or after having altered the password for any user granted the SYSDBA,SYSOPER or SYSDG privileges the password file must be copied from the primary site to the standby site.

The Oracle Database Enterprise Edition 12.1.0.1 and above can now store password files in ASM diskgroups. By default if dbca is used to create a RAC database, the password file is created in an ASM diskgroup on the Primary site.

The documentation states that the password file must be copied from the Primary to the Standby sites:

Oracle Data Guard Configurations and Broker Configurations

https://docs.oracle.com/database/121/DGBKR/concepts.htm#DGBKR015

This HOW TO details the procedure and commands for copying the password file from the Primary site to the standby site when these password files are held in an ASM diskgroup.

IMPORTANT: The ASM diskgroup used to store the password files on the standby site MUST have it's COMPATIBLE.ASM attribute set to 12.1.

SOLUTION

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:

Primary database: db121

Standby database: db121stb

Configuration: rs1_dg

Disk groups: +DATA, +FRA

Database instances: db1211,db1212

Oracle user: Oracle

Grid user: Grid

Instance Name: plb102

Nodes: Node1, Node2

***************

The procedure for copying the file across from the Primary site to the standby site is as the following:

  1. On the Primary site as the grid user, copy the password file out of ASM on to a file system based location, in this case /tmp

Primary Site:

oracle@node1 dbs\]$ su - grid Password: \[grid@node1 \~\]$ . oraenv ORACLE_SID = \[grid\] ? +ASM1 The Oracle base has been set to /u01/app/grid \[grid@node1 \~\]$ asmcmd ASMCMD\> pwcopy +DATA/DB121/PASSWORD/pwddb121.256.867607273 /tmp/orapwdb121 copying +DATA/DB121/PASSWORD/pwddb121.256.867607273 -\> /tmp/orapwdb121 ASMCMD\> exit 2. Copy the password file to one of the Standby RAC nodes Primary Site: \[oracle@node1 dbs\]$ scp /tmp/orapwdb121 node1:/tmp/orapwdb1211 .. . Are you sure you want to continue connecting (yes/no)? yes oracle@node2's password: orapwdb121 100% 7680 7.5KB/s 00:00 3. On the standby node that now has a copy of the password file, copy the password file into ASM as grid user. The ASM command pwcopy can be used to perform this task. Make sure the file is placed in the diskgroup and sub-directory for the standby identified through its db_unique_name value. In this case +DATA and DB121STB. Standby Site: $ su - grid Password: \[grid@node1 \~\]$ . oraenv ORACLE_SID = \[grid\] ? +ASM1 The Oracle base has been set to /u01/app/grid \[grid@node1\~\]$ asmcmd ASMCMD\> pwcopy /tmp/orapwdb1211 +DATA/DB121STB/orapwdb1211 copying /tmp/orapwdb1211 -\> +DATA/DB121STB/orapwdb1211 ASMCMD\> ls -l +DATA/DB121STB/orapwdb1211 Type Redund Striped Time Sys Name PASSWORD UNPROT COARSE FEB 26 11:00:00 N orapwdb1211 =\> +DATA/ASM/PASSWORD/pwdasm.279.872680185 ASMCMD\> exit 4. As the owner of the RDBMS software for the database, update the clusterware resource for the database and set the location of the password file to be used by the database using srvctl modify database command. Standby Site: $ su - oracle Password: \[oracle@node1\~\]$ . oraenv ORACLE_SID = \[oracle\] ? db1211 The Oracle base has been set to /u01/app/oracle \[oracle@node1 \~\]$ srvctl modify database -d db121stb -pwfile +DATA/DB121STB/orapwdb1211 \[oracle@node1\~\]$ srvctl config database -d db121stb Database unique name: db121stb Database name: Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1 Oracle user: oracle Spfile: /u01/app/oracle/product/12.1.0/dbhome_1/dbs/spfiledb1211.ora **Password file: +DATA/DB121STB/orapwdb1211** Domain: \ Start options: mount Stop options: immediate Database role: PHYSICAL_STANDBY Management policy: AUTOMATIC Server pools: Disk Groups: DATA,FRA Mount point paths: Services: Type: RAC Start concurrency: Stop concurrency: OSDBA group: dba OSOPER group: Database instances: db1211,db1212 Configured nodes: node1, node2 Database is administrator managed Note: if the --dbuniquename switch in pwcopy is used, the following errors will appear after the file has been copied. ASMCMD\> pwcopy --dbuniquename db121stb /tmp/orapwdb1211 +DATA/DB121STB/orapwdb1211 copying /tmp/orapwdb1211 -\> +DATA/DB121STB/orapwdb1211 PRCD-1163 : Failed to modify database db121stb PRCR-1071 : Failed to register or update resource ora.db121stb.db CRS-0245: User doesn't have enough privilege to perform the operation ASMCMD-9453: failed to register password file as a CRS resource These errors are expected due to user role separation. Please use steps above instead.

相关推荐
THRUSTER111116 分钟前
MySQL-- 函数(单行函数):数值函数, 字符串函数
数据库·mysql·函数·navicat·单行函数
橙序研工坊13 分钟前
MySQL的进阶语法7(索引-B+Tree 、Hash、聚集索引 、二级索引(回表查询)、索引的使用及设计原则
数据库·sql·mysql
Bruce-li__14 分钟前
深入理解Python asyncio:从入门到实战,掌握异步编程精髓
网络·数据库·python
小光学长1 小时前
基于vue框架的智能服务旅游管理系统54kd3(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
数据库
Bonnie_12151 小时前
07-MySQL-事务的隔离级别以及底层原理
数据库·mysql
ETLCloud数据集成社区1 小时前
ETLCloud是如何通过Oracle实现CDC的?
数据库·oracle·etl·实时数据同步
KATA~1 小时前
解决MyBatis-Plus枚举映射错误:No enum constant问题
java·数据库·mybatis
xyliiiiiL1 小时前
一文总结常见项目排查
java·服务器·数据库
shaoing1 小时前
MySQL 错误 报错:Table ‘performance_schema.session_variables’ Doesn’t Exist
java·开发语言·数据库
用户6279947182621 小时前
南大通用GBase 8s 获取表的约束与索引列信息
数据库