copy password file from non-asm to asm location

STEP 1: Check current configuration or location of password file

[oracle@oratest2 ~]$  srvctl config database -d ORA_PRIM | grep -i password

Password file: +DATA/ORA_PRIM/PASSWORD/pwdora_prim.258.1180617047

STEP 2: Locate the password file that need to be copy from non-asm to asm location

[oracle@oratest2 ~]$ ls -ltr /tmp/orapwdora_prim

-rw-r-----. 1 oracle oracle 2048 Sep 28 12:20 /tmp/orapwdora_prim

ASMCMD> pwd

+DATA/ORA_PRIM/PASSWORD

ASMCMD> ls -lt

ASMCMD>       

STEP 3: Modify the password file name using srvctl command

[oracle@oratest2 ~]$ srvctl modify database -d ORA_PRIM -pwfile +DATA/ORA_PRIM/PASSWORD/pwdora_prim

[oracle@oratest2 ~]$ srvctl config database -d ORA_PRIM | grep -i password

Password file: +DATA/ORA_PRIM/PASSWORD/pwdora_prim

STEP 4: Copy the password file using pwcopy utility into asm location

ASMCMD> pwcopy --dbuniquename ORA_PRIM /tmp/orapwdora_prim +DATA/ORA_PRIM/PASSWORD/pwdora_prim

ASMCMD-8028: Password file '+DATA/ORA_PRIM/PASSWORD/pwdora_prim' is associated with 'ORA_PRIM' already. Use the force option.

ASMCMD> pwcopy --dbuniquename ORA_PRIM /tmp/orapwdora_prim +DATA/ORA_PRIM/PASSWORD/pwdora_prim -f

copying /tmp/orapwdora_prim -> +DATA/ORA_PRIM/PASSWORD/pwdora_prim

ASMCMD> ls -lt

Type      Redund  Striped  Time             Sys  Name

PASSWORD  HIGH    COARSE   SEP 28 12:00:00  Y    pwdora_prim.258.1180874433

PASSWORD  HIGH    COARSE   SEP 28 12:00:00  N    pwdora_prim => +DATA/ORA_PRIM/PASSWORD/pwdora_prim.258.1180874433

NOTE 1: Please use -f option if you get password file already exist error

NOTE 2: If you don't use '--dbuniquename' keyword then the password file will be copy with 'unknown' name. 



Post a Comment

Previous Post Next Post