Recently, all the company's operating systems have been upgraded to Windows 7. Our company has an ORACLE product software for Engineering Planning called Primavera Six (P6). So I need to migrate the P6 database from XP to the Win7 system. This is because the P6 database has been successfully migrated from XP to XP, and it is a success, so there is no problem. This time, no tests were conducted before migration. Haha, I'm a little overconfident. I have to perform tests first in the future. Otherwise, if it is to restrict time for database migration, especially to help customers with projects, it will be criticized by leaders and customers, fortunately, I am a database of my own company this time, and there is no time limit. I can search for the cause of the unsuccessful reply within a few days. Let me talk about this migration story.
I wrote an email last Thursday morning to my colleagues using the P6 system and told them that I had migrated the server database from Thursday to Friday, so the database could not be used during this period. In fact, it will not take such a long time. It is mainly because our company needs special personnel authorization to install and uninstall the software. All the software cannot be installed or uninstalled without authorization, A little abnormal. Haha. Well, let's just talk about the migration time. I told IT on Thursday that I would upgrade my OS to Windows 7 on Friday. Today I backed up my database and related software. Of course, I still have MYSQL database information on this server. Today, we will focus on ORACLE database backup. Mysql I wrote a small batch for automatic backup every day. Basically, there is no problem with migrating to WIN7. So I switched the database several times: alter system switch logfile. I want to prepare the database because it is relatively small.
1, so make a full-database cold backup
A. Shut down the database shutdown immediate.
B. Copy all the data files, including tempfile, datafile, redo logile, and controlfile.
2. Use RMAN for full-Database Hot Backup under database mount.
A. The RMAN configuration is as follows:
RMAN> configure channel device type disk format 'd: \ bak \ backupset \ % U ';
RMAN> configure controlfile autobackup on;
RMAN> configure controlfile autobackup format for device type disk to 'd: \ bak \ ctrlbak \ % F ';
RMAN> configure retention policy to redundancy 5;
RMAN> configure retention policy to recovery window of 5 days;
RMAN> backup as compressed backupset database plus archivelog;
B. From the above, we can see that the paths of my backup files are:
CONFIGURE the automatic backup of Control Files: configure controlfile autobackup on;
Control File Path: d: \ bak \ ctrlbak
Data File Path: d: \ bak \ backupset
C. Start Using RMAN for backup.
RMAN> backup database;
After the backup is complete, copy the files under d: \ bak, and copy the online redo log file. This will be followed. I will tell you how to use it when replying. Back up other backup files to the mobile hard disk.
Thursday is over. Wait for IT to erase the XP system on Friday, install the WIN7 system, and then reply.