In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
            
                    
                
2025-11-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to backup clone database, the article is very detailed, has a certain reference value, interested friends must read!
---Based on backup clone
1. Create pfile
create pfile from spfile
added
log_archive_dest
compatible=
2. Create password files and folders
orapwd file=D:\app\product\11.2.0\dbhome_1\database\PWDGTJ.ora password=GTJ entries=4
3, listener.ora, tnsnames.ora to create local names must be created in the target database and auxiliary database
4. Register a new instance
oradim -new -sid GTJ -intpwd GTJ
5. Create 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. Connect rman
Both the target database and the secondary database are created
rman AUXILIARY sys/gtj@gtjtest
7. Clone database
---------------------------
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';
The above is "How to backup clone database" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





            
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.