亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

如何備份克隆數據庫

發布時間:2021-11-12 09:44:35 來源:億速云 閱讀:184 作者:小新 欄目:關系型數據庫

這篇文章主要介紹如何備份克隆數據庫,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

---基于備份克隆


1、創建pfile
  create pfile from spfile
添加
  log_archive_dest
compatible=


2、創建密碼文件及文件夾


orapwd file=D:\app\product\11.2.0\dbhome_1\database\PWDGTJ.ora password=GTJ entries=4


3、listener.ora、tnsnames.ora創建本地命名一定要在目標數據庫以及輔助數據庫創建


4、注冊新實例


oradim –new –sid GTJ –intpwd GTJ


5、創建spfile


create  spfile from pfile='D:\app\product\11.2.0\dbhome_1\database\initgtj.ora' 


STARTUP NOMOUNT FORCE PFILE='D:\app\product\11.2.0\dbhome_1\database\initgtj.ora' 


 alter system set compatible='11.2.0.4.0' scope=spfile;


 




DUPLICATE TARGET DATABASE
  FOR STANDBY
  FROM ACTIVE DATABASE
  PASSWORD FILE
  SPFILE 
    PARAMETER_VALUE_CONVERT '/disk1', '/disk2'
    SET DB_FILE_NAME_CONVERT '/disk1','/disk2'
    SET LOG_FILE_NAME_CONVERT '/disk1','/disk2'
    SET DB_UNIQUE_NAME 'dup1'
    SET SGA_MAX_SIZE 200M
    SET SGA_TARGET 125M;


6、連接rman 
目標數據庫以及輔助數據庫都要創建
rman    AUXILIARY  sys/gtj@gtjtest






7、克隆數據庫
-----------------運行成功-------------------------------------------------------------
RUN{ 
SET NEWNAME FOR DATABASE TO 'D:\APP\ORADATA\GTJ\%b';
DUPLICATE DATABASE TO 'GTJ' BACKUP LOCATION 'D:\app\flash_recovery_area\orcl\ORCL\BACKUPSET\2017_08_09' NOFILENAMECHECK;
}
rman nocatalog
connect target sys/oracle@zz
connect AUXILIARY  sys/gtj@gtjtest
rman  target sys/oracle@zz  AUXILIARY  sys/gtj@gtjtest
run{ 
 
SET NEWNAME FOR DATABASE TO 'D:\APP\ORADATA\GTJ\%b';


duplicate target database to GTJ FROM ACTIVE DATABASE 
logfile   
group 1 ('D:\APP\ORADATA\GTJ\REDO01.LOG') size 10m,   
group 2 ('D:\APP\ORADATA\GTJ\REDO02.LOG') size 10m,   
group 3 ('D:\APP\ORADATA\GTJ\REDO03.LOG') size 10m;   
  
}  
------------------------參考-----------------------------------------------------------
RUN{
DUPLICATE DATABASE ORCL TO 'GTJ' BACKUP LOCATION 'D:\app\flash_recovery_area\orcl\ORCL\BACKUPSET\2017_08_09' 
SET DB_FILE_NAME_CONVERT ('D:\APP\ORADATA\ORCL','D:\APP\ORADATA\GTJ')
SET LOG_FILE_NAME_CONVERT ('D:\APP\ORADATA\ORCL','D:\APP\ORADATA\GTJ');
}


DUPLICATE DATABASE TO GTJ
  UNTIL TIME "TO_DATE('08/09/2017 19:00:00', 'MM/DD/YYYY HH24:MI:SS')"
  BACKUP LOCATION 'D:\app\flash_recovery_area\orcl\ORCL\BACKUPSET\2017_08_09'
  NOFILENAMECHECK;


alter system set db_recovery_file_dest='D:\app\flash_recovery_area'


RUN
{  
  ALLOCATE AUXILIARY CHANNEL newdb DEVICE TYPE sbt; 
  DUPLICATE TARGET DATABASE TO newdb
    PFILE ?/dbs/initNEWDB.ora
    UNTIL TIME 'SYSDATE-1'  # specifies incomplete recovery
    SKIP TABLESPACE example, history   # skip desired tablespaces
    DB_FILE_NAME_CONVERT ('/h2/oracle/dbs/trgt/','/h3/oracle/oradata/newdb/')
    LOGFILE
      GROUP 1 ('/h3/oradata/newdb/redo01_1.f',
               '/h3/oradata/newdb/redo01_2.f') SIZE 4M,
      GROUP 2 ('/h3/oradata/newdb/redo02_1.f',
               '/h3/oradata/newdb/redo02_2.f') SIZE 4M,
      GROUP 3 ('/h3/oradata/newdb/redo03_1.f',
               '/h3/oradata/newdb/redo03_2.f') SIZE 4M REUSE;
}






RUN
{
  SET NEWNAME FOR DATABASE TO '/oradata1/%b'; 
  DUPLICATE TARGET DATABASE TO dupdb
    LOGFILE
      GROUP 1 ('/duplogs/redo01a.log', 
               '/duplogs/redo01b.log') SIZE 4M REUSE,
      GROUP 2 ('/duplogs/redo02a.log',
               '/duplogs/redo02b.log') SIZE 4M REUSE;
}
 


DUPLICATE DATABASE TO GTJ
  UNTIL TIME "TO_DATE('08/09/2017 19:00:00', 'MM/DD/YYYY HH24:MI:SS')"
  BACKUP LOCATION 'D:\app\flash_recovery_area\orcl\ORCL\BACKUPSET\2017_08_09'
  NOFILENAMECHECK;


DUPLICATE DATABASE 'PROD' dbid 8675309 to 'TEST'
  UNTIL TIME "to_date('11/01/2007', 'MM/DD/YYYY')"
  BACKUP LOCATION '/backups' NOFILENAMECHECK
  PFILE='?/dbs/inittest.ora' db_file_name_convert='prod','test';

以上是“如何備份克隆數據庫”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

元江| 平泉县| 盐亭县| 佛教| 丹棱县| 揭阳市| 乐都县| 玛多县| 江津市| 江山市| 子长县| 聊城市| 正蓝旗| 临武县| 科技| 香河县| 荥经县| 涞水县| 湖南省| 荆门市| 宕昌县| 莫力| 皮山县| 固安县| 库伦旗| 拜泉县| 瓦房店市| 屏南县| 安吉县| 广德县| 新密市| 泰顺县| 元朗区| 酒泉市| 汝城县| 隆化县| 易门县| 龙海市| 景宁| 来安县| 阜城县|