熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

Clone an Oracle Database

2022-06-13   來源: Oracle 

  Description
  Need to create a duplicate database on the same machine ? Database too big to use Export/Import ?
  This is the easiest way to do it
  
  Assume the original database is called PROD and you want to create a CLONE duplicate database
  
  Procedure
   Find some disk space and create appropriate directories / file systems for you cloned database (conforming to the OFA guidelines)
  
   Connect to the PROD instance and dump the controlfile using the SQL command
  
  ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
  
  This will put a text copy of the controlfile in the USER_DUMP_DEST
  
   Shutdown Normal PROD database
  
   Perform an operating system copy of PROD to the new location where CLONE will reside
  
   Startup the PROD instance
  
   Edit the controlfile you created and change all the path names of the database to the new location
  
   Set your environment to the CLONE instance and run Server Manager (svrmgrl)
  
  CONNECT INTERNAL
  STARTUP NOMOUNT
  
  CREATE CONTROLFILE REUSE SET DATABASE CLONE RESETLOGS NOARCHIVELOG
  MAXLOGFILES
  MAXLOGMEMBERS
  MAXDATAFILES
  MAXINSTANCES
  MAXLOGHISTORY
  LOGFILE
  GROUP /oracle/data/CLONE/redos/logCLONEdbf SIZE K
  GROUP /oracle/data/CLONE/redos/logCLONEdbf SIZE K
  GROUP /oracle/data/CLONE/redos/logCLONEdbf SIZE K
  DATAFILE
  /oracle/data/CLONE/system_ts/systCLONEdbf SIZE M
  /oracle/data/CLONE/data_ts/data_CLONEdbf SIZE M
  /oracle/data/CLONE/index_ts/index_CLONEdbf SIZE M
  /oracle/data/CLONE/rbs_ts/rbs_CLONEdbf SIZE M
  /oracle/data/CLONE/temp_ts/temp_CLONEdbf SIZE M
  /oracle/data/CLONE/tools_ts/ts_tools_CLONE_dbf SIZE M
  /oracle/data/CLONE/users_ts/ts_users_CLONEdbf SIZE M
  ;
  
  ALTER DATABASE OPEN RESETLOGS;
  
   Thats it an exact duplicate of PROD and a painless procedure

From:http://tw.wingwit.com/Article/program/Oracle/201311/17821.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.