Вы находитесь на странице: 1из 25

Step 1:

Backup xml, env, dbc files and shutdown application services using clone automation scripts.

Step 2:

Once all applications down, create a pfile from current spfile..

$ sqlplus '/as sysdba'

SQL> create pfile='/u01/app/oracle/product/11.2.0/dbhome_3/dbs/initcct23_cluster.ora' from


spfile='+DSKGRP1/spfilecct23.ora';

Step 3:

Shutdown the database and Listeners on all RAC nodes..

$ srvctl stop database -d cct23

Note: Make sure all instances shutdown cleanly..

Once all instances are down, check the status.

$ srvctl status database -d cct23


Stop Listeners

$ srvctl stop listener -l CCT23

Make sure CCT23 listener is down on all RAC nodes.

Step 4:

Dismount the T23 diskgroup (+DSKGRP1) on both aebdbt03 and aebdbt04 servers.

Login to ASM instance.

$ sqlplus '/as sysasm'

SQL> select group_number,name,total_mb,free_mb from v$asm_diskgroup;

SQL> alter diskgroup DSKGRP1 dismount;

SQL> select group_number,name,total_mb,free_mb from v$asm_diskgroup;


Step 4:

Fire the BCV split sync command from aebdbt03 server as oracle user.

$ sudo /scripts/acs/mkcct23bcv
Step 5:

After the spilt copied to T23 servers mount the disk group on all ASM instances (aebdbt03 & aebdbt04
servers).

Login to ASM instance.

$ sqlplus '/as sysasm'

SQL> select group_number,name,total_mb,free_mb from v$asm_diskgroup;

SQL> alter diskgroup DSKGRP1 mount;

SQL> select group_number,name,total_mb,free_mb from v$asm_diskgroup;


Login to asmcmd and check the files..

$ asmcmd

ASMCMD> cd DSKGRP1
ASMCMD> ls -lt
ASMCMD> cd TKP29
ASMCMD> ls -lt
Make sure all datafiles, controlfile, tempfile and onlinelog exists.

Step 2:

Bring up the database as TKP29, but instance name will be cct231.

Change the db_name parameter to 'tkp29' in


/home/tk/scripts/clone/auto/CCT23/init_clone_cct23_bcvsplit.ora
and start the database using this pfile..
$ sqlplus '/as sysdba'

SQL> startup nomount pfile='/home/tk/scripts/clone/auto/CCT23/init_clone_cct23_bcvsplit.ora'

SQL> alter database mount;

Check the db_name, it should be 'TKP29', but instance name will be cct231.

SQL> select name from v$database;


$ sqlplus '/as sysdba'

SQL> select name from v$controlfile;

SQL> select name from v$datafile;

SQL> select name from v$tempfile;

SQL> select member from v$logfile;

all file locations should start with '+DSKGRP1/tkp29/'

once everything looks fine...open the database..


Check the datafiles state and recover state..

$ sqlplus '/as sysdba'

SQL> select distinct(status) from gv$datafile;

SQL> select * from gv$recover_file;

If the above commands shows no recover, then Open the database otherwise we may need to recover
the database.

$ sqlplus '/as sysdba'

SQL> alter database open;

Now the database will open as 'TKP29', but instance name will be cct231.
Step 3:

shutdown the database...

$ sqlplus '/as sysdba'

SQL> shut immediate


Mount the database using pfile...

$ sqlplus '/as sysdba'

SQL> startup mount pfile='/home/tk/scripts/clone/auto/CCT23/init_clone_cct23_bcvsplit.ora'


Change the db_name using nid

$ nid target=/ dbname=cct23


This will convert the db_name from TKP29 to CCT23, and it will shut down the database.
Step 4:

Change the db_name to 'cct23' in /home/tk/scripts/clone/auto/CCT23/init_clone_cct23_bcvsplit.ora


and bring up the database using this pfile.

Mount the database as CCT23.

$ sqlplus '/as sysdba'

SQL> startup mount pfile='/home/tk/scripts/clone/auto/CCT23/init_clone_cct23_bcvsplit.ora'

Make sure the db_name is CCT23.

SQL> select name from v$database;


Then open the database with reset logs.

SQL> alter database open resetlogs;


Note: After the DB is opened with reset logs, the onlinelogs will be moved from TKP29 to CCT23
directory.
Step 5:

Remove the extra log groups (from 30 to 47) which are pointing to ‘+DSKGRP1/tkp29’.

$ sqlplus '/as sysdba'

SQL> col member for a50


SQL> select group#,member from v$logfile;
SQL> alter database drop logfile group 30;

SQL> alter database drop logfile group 31;


.
.
.
SQL> alter database drop logfile group 47;

SQL> select group#,member from v$logfile;


Step 5:

Remove the spfile from ASM diskgroup..

$ asmcmd

ASMCMD> cd DSKGRP1
ASMCMD> rm spfiletkp29.ora
Step 6:

Shut down the database..

$ sqlplus '/as sysdba'

SQL> shut immediate;


Mount the database using pfile..

$ sqlplus '/as sysdba'

SQL> startup mount pfile='/home/tk/scripts/clone/auto/CCT23/init_clone_cct23_bcvsplit.ora'

Disable the archivelog mode

SQL> alter database noarchivelog;

SQL> archive log list


Create the spfile using the cluster pfile..

SQL> create spfile='+DSKGRP1/spfilecct23.ora' from


pfile='/u01/app/oracle/product/11.2.0/dbhome_3/dbs/initcct23_cluster_bcvsplit.ora';
Shut down the database...

SQL> shut immediate;


Step 7:

Bring up the database in cluster mode, the listeners will automatically come up once the DB is started.

$ srvctl start database -d cct23

Check the status on all RAC nodes.

$ srvctl status database -d cct23


$ srvctl status listener -l CCT23

BCV Split process completed, CCT23 is up in cluster mode, now you continue with the post clone steps
with automation process.....have a nice day...

Вам также может понравиться