DisplayAdd1

TechnoTechDB is a platform, which will help to grow your carrier in Information sector. Having 15 years of Experience in Oracle/MongoDB/Postgres/Mysql databases, along with having good expertise level of knowledge in Scripting to automate database task. Our goal to start with zero to hero level expertise in Database. You can access/refer my some blogs on https://mrorcldba.blogspot.com link and post your comments and your suggestion to motive us.

Saturday, 23 January 2016

Clone database from ACTIVE standby database.

Clone database from ACTIVE standby database.

below steps are useful when you already have ORCL_T datbase  ::

SOURCE : STANDBY DATABASE (ORCLSTDBY)

TARGET : TEST DATABASE (ORCL_T)

-- on Testing ( ORCL_T DB) DB

alter system set log_file_name_convert='+DATA_GROUP/orclstby/onlinelog/','+DATA_GROUP/orcl_t/onlinelog/' scope=spfile;
alter system set db_file_name_convert='+DATA_GROUP/orclstby/datafile/','+DATA_GROUP/orcl_t/datafile/' scope=spfile;
alter system set db_unique_name=orcl_t scope=spfile;

create pfile='/tmp/initorcl_t.ora' from spfile;
alter system set cluster_database=false scope=spfile;
shut immediate;
STARTUP NOMOUNT RESTRICT;
ALTER DATABASE MOUNT;
DROP DATABASE;

-- on Standby DB

alter database flashback off;
alter database recover managed standby database cancel;

-- on Testing(For Clone DB) DB

STARTUP NOMOUNT pfile='/tmp/initorcl_t.ora';
Create spfile from pfile='/tmp/initorcl_t.ora';
Startup mount
rman  target  sys/oracle@orclstby auxiliary   sys/oracle@orcl_t

--activerestore_final.cmd

run {
allocate channel C1 device type disk;
allocate channel C2 device type disk;
allocate channel C3 device type disk;
allocate channel C4 device type disk;
allocate channel C5 device type disk;
allocate auxiliary channel C6 device type disk;
allocate auxiliary channel C7 device type disk;
duplicate target database to orcl_t from active database;
release channel C1 ;
release channel C2;
release channel C3;
release channel C4;
release channel C5;
}

-- Make no archivelog on cloned DB.

-- on Standby DB
alter database flashback on;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

No comments:

Post a Comment

Steps to Rename Host in Oracle RESTART (ASM) in Linux

  oracle@localhost ] asmcmd ASMCMD> lsdg State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_...