On January 27th, this site will be read-only as we migrate to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,532 Users
  • 2,269,755 Discussions
  • 7,916,774 Comments

Discussions

RAC Database renamed using recreating control file - but problem

Jhil
Jhil Member Posts: 3,182 Bronze Trophy
edited Feb 28, 2018 9:35AM in Real Application Clusters

Dear all,

I have renamed database name for  rac database.

But

1) srvctl utility not showing running Instances details correntlt ?

2) some files are coming under old path and few are new path ?  (pls see redo log file)

Old db name : testdb

New db name : proddb

>> Before Renamed the Database

$ srvctl config database -d testdb

Database unique name: testdb

Database name: testdb

Oracle home: /u01/app/oracle/product/11.2.0/db_home

Oracle user: oracle

Spfile: +ASM_DG_DATA/testdb/spfiletestdb.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: testdb

Database instances: testdb1,testdb2

Disk Groups: ASM_DG_DATA,ASM_DG_RECO

Mount point paths:

Services:

Type: RAC

Database is administrator managed

After renamed the Database

$ srvctl config database -d proddb

Database unique name: proddb

Database name:

Oracle home: /u01/app/oracle/product/11.2.0/db_home

Oracle user: oracle

Spfile:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: proddb

Database instances: testdb1,testdb2

Disk Groups:

Mount point paths:

Services:

Type: RAC

Database is administrator managed

>> From Node1

[[email protected] dbs]$ ps -ef  | grep pmon

grid      4384     1  0 21:33 ?        00:00:01 asm_pmon_+ASM1

oracle   10927     1  0 22:43 ?        00:00:00 ora_pmon_testdb1

>> From Node2

[[email protected] ~]$ ps -ef | grep pmon

grid      4456     1  0 21:15 ?        00:00:01 asm_pmon_+ASM2

oracle    9178     1  0 22:35 ?        00:00:00 ora_pmon_testdb2

oracle   10784  6281  0 23:19 pts/0    00:00:00 grep pmon

>> Questions

>>  Why Instance status are incorrect ?

$ srvctl status database -d proddb

Instance testdb1 is not running on node rac1

Instance testdb2 is not running on node rac2

SQL> select name, instance_name from v$database, v$instance;

NAME      INSTANCE_NAME

--------- ----------------

PRODDB    testdb1

SQL> select select name from v$datafile;

NAME

------------------------------------------------------------------------------------------------------------------------

+ASM_DG_DATA/testdb/datafile/system.324.969298117

+ASM_DG_DATA/testdb/datafile/sysaux.325.969298119

+ASM_DG_DATA/testdb/datafile/undotbs1.326.969298119

+ASM_DG_DATA/testdb/datafile/users.327.969298119

+ASM_DG_DATA/testdb/datafile/example.332.969298267

+ASM_DG_DATA/testdb/datafile/undotbs2.333.969298473

6 rows selected.

SQL> select name from v$controlfile;

NAME

------------------------------------------------------------------------------------------------------------------------

+ASM_DG_DATA/testdb/controlfile/control01.ctl

+ASM_DG_RECO/testdb/controlfile/control02.ctl

>> Pls see some files are from old path and some of  from new path

SQL> select a.thread#, a.group#, a.members, b.member from v$log a,v$logfile b

  2   where a.Group# = b.group# order by thread#, group#;

   THREAD#     GROUP#    MEMBERS MEMBER

---------- ---------- ---------- --------------------------------------------------------------

         1          1          2 +ASM_DG_RECO/testdb/onlinelog/group_1.539.969298247

         1          1          2 +ASM_DG_DATA/testdb/onlinelog/group_1.329.969298245

         1          2          2 +ASM_DG_RECO/testdb/onlinelog/group_2.540.969298247

         1          2          2 +ASM_DG_DATA/testdb/onlinelog/group_2.330.969298247

         2          3          2 +ASM_DG_DATA/proddb/onlinelog/group_3.337.969315141

         2          3          2 +ASM_DG_RECO/proddb/onlinelog/group_3.569.969315143

         2          4          2 +ASM_DG_DATA/proddb/onlinelog/group_4.338.969315143

         2          4          2 +ASM_DG_RECO/proddb/onlinelog/group_4.570.969315145

8 rows selected.

Thanks in advance.

Best Answer

  • Jhil
    Jhil Member Posts: 3,182 Bronze Trophy
    edited Feb 28, 2018 9:32AM Answer ✓

    Hi

    I found steps and resolved it.

    $ srvctl modify database -d proddb -n proddb -p +ASM_DG_DATA/testdb/spfileproddb.ora -a ASM_DG_DATA,ASM_DG_RECO

    [[email protected] ~]$ srvctl start database -d proddb

    $ srvctl config database -d proddb

    Database unique name: proddb

    Database name: proddb

    Oracle home: /u01/app/oracle/product/11.2.0/db_home

    Oracle user: oracle

    Spfile: +ASM_DG_DATA/testdb/spfileproddb.ora

    Domain:

    Start options: open

    Stop options: immediate

    Database role: PRIMARY

    Management policy: AUTOMATIC

    Server pools: proddb

    Database instances: testdb1,testdb2

    Disk Groups: ASM_DG_DATA,ASM_DG_RECO

    Mount point paths:

    Services:

    Type: RAC

    Database is administrator managed

    $ srvctl status database -d proddb

    Instance testdb1 is running on node rac1

    Instance testdb2 is running on node rac2

    REF_LINK : Rename RAC database using NID utility !!! - FindCopyPaste.com

Answers

  • SPA09
    SPA09 Member Posts: 867 Gold Badge
    edited Feb 28, 2018 8:20AM

    Hi,

    yes the changes on the DB where not reflect anything in the Clusterware.

    So you need to remove the database from the clusterware and then

    add the database and instances newly in the Clusterware

    disable database

    remove database

    add database

    add instance (this can be done with the add database)

    regards

    Jhil
  • Jhil
    Jhil Member Posts: 3,182 Bronze Trophy
    edited Feb 28, 2018 9:20AM

    Hi,

    $ srvctl disable database -d proddb

    $ srvctl remove database -d proddb

    Remove the database proddb? (y/[n]) y

    $ srvctl add database -d proddb -o /u01/app/oracle/product/11.2.0/db_home -p SPFILE='+ASM_DG_DATA/testdb/spfiletestdb.ora'

    $ srvctl add instance -d proddb -i testdb1 -n rac1

    $ srvctl add instance -d proddb -i testdb2 -n rac2

    $ srvctl config database -d proddb

    Database unique name: proddb

    Database name:

    Oracle home: /u01/app/oracle/product/11.2.0/db_home

    Oracle user: oracle

    Spfile: SPFILE=+ASM_DG_DATA/testdb/spfiletestdb.ora

    Domain:

    Start options: open

    Stop options: immediate

    Database role: PRIMARY

    Management policy: AUTOMATIC

    Server pools: proddb

    Database instances: testdb1,testdb2

    Disk Groups:

    Mount point paths:

    Services:

    Type: RAC

    Database is administrator managed

    >> Not MET expected output

    $ srvctl status database -d proddb

    Instance testdb1 is not running on node rac1

    Instance testdb2 is not running on node rac2

    $ srvctl start database -d proddb

    PRCR-1079 : Failed to start resource ora.proddb.db

    CRS-5017: The resource action "ora.proddb.db start" encountered the following error:

    ORA-01078: failure in processing system parameters

    ORA-01565: error in identifying file 'SPFILE=+ASM_DG_DATA/testdb/spfiletestdb.ora'

    ORA-27037: unable to obtain file status

    Linux-x86_64 Error: 2: No such file or directory

    Additional information: 3

    . For details refer to "(:CLSN00107:)" in "/u01/product/11.2.0/grid_home/log/rac2/agent/crsd/oraagent_oracle/oraagent_oracle.log".

    CRS-5017: The resource action "ora.proddb.db start" encountered the following error:

    ORA-01078: failure in processing system parameters

    ORA-01565: error in identifying file 'SPFILE=+ASM_DG_DATA/testdb/spfiletestdb.ora'

    ORA-27037: unable to obtain file status

    Linux-x86_64 Error: 2: No such file or directory

    Additional information: 3

    . For details refer to "(:CLSN00107:)" in "/u01/product/11.2.0/grid_home/log/rac1/agent/crsd/oraagent_oracle/oraagent_oracle.log".

    CRS-2674: Start of 'ora.proddb.db' on 'rac1' failed

    CRS-2674: Start of 'ora.proddb.db' on 'rac2' failed

    CRS-2632: There are no more servers to try to place resource 'ora.proddb.db' on that would satisfy its placement policy

  • Jhil
    Jhil Member Posts: 3,182 Bronze Trophy
    edited Feb 28, 2018 9:32AM Answer ✓

    Hi

    I found steps and resolved it.

    $ srvctl modify database -d proddb -n proddb -p +ASM_DG_DATA/testdb/spfileproddb.ora -a ASM_DG_DATA,ASM_DG_RECO

    [[email protected] ~]$ srvctl start database -d proddb

    $ srvctl config database -d proddb

    Database unique name: proddb

    Database name: proddb

    Oracle home: /u01/app/oracle/product/11.2.0/db_home

    Oracle user: oracle

    Spfile: +ASM_DG_DATA/testdb/spfileproddb.ora

    Domain:

    Start options: open

    Stop options: immediate

    Database role: PRIMARY

    Management policy: AUTOMATIC

    Server pools: proddb

    Database instances: testdb1,testdb2

    Disk Groups: ASM_DG_DATA,ASM_DG_RECO

    Mount point paths:

    Services:

    Type: RAC

    Database is administrator managed

    $ srvctl status database -d proddb

    Instance testdb1 is running on node rac1

    Instance testdb2 is running on node rac2

    REF_LINK : Rename RAC database using NID utility !!! - FindCopyPaste.com

This discussion has been closed.