Oracle project that's the thing----Database migration (1)

Source: Internet
Author: User
Tags log log

Do database migration is an egg pain, do database design, often do not consider the scalability of data architecture, because do database migration is not to do database design people.

Before doing such a database migration, the requirements are probably as follows

1. There are about 5 hours of downtime during the night, and you can do a full library (a-machine) migration operation.

2. The data amount is about 900G.

3. The same operating system and database version

4. When migrating, you need to change the database name and instance name.

5. There are no data backup tapes or disk devices on the customer site.

6. A hardware-upgraded small machine (b-machine) is available to run the migrated database without shared storage.

I think I have some kind of spectrum in my mind to see this request.

5 hours of downtime, 900G of data, database import and export estimates are not. Basically the tone does the data recovery to achieve. Plus no tape backup, if you use Rman for backup and recovery

1. More complex, many steps, different error 2. There is no tape backup device, which can affect the production library if the database is backed up.

This essentially locates a consistent database migration under user management.

The specific implementation plan is not disclosed by the company. But the process was roughly said.

1. In the morning to the data center, see IBM's small machine and storage, recorded the system parameters and configuration, began to reload the system, partition LVM, and bare devices.

2. After this, it was 1 o'clock noon to eat time. Bought a hamburger, stuffed it in his mouth and went back to work. Start installing Oracle for AIX.

3. Installation completed It was five o'clock in the afternoon, the dizzy old swell out to turn a circle. By the way eat dinner, prepare supper at night.

4. Return to the computer room, the directory structure on the B machine, configuration on the data instance. and start to check the environment, whether there are problems, such as whether the listener is normal, to a machine to B network connectivity and so on. There was a little problem in the middle. We'll talk later.

5. Fortunately, the computer room together overtime people really a lot, also with these it otaku odds, unless it is sigh life, thinking life, which has a south to the North Drift, talking about the hot and dry noodles in Wuhan

Almost did not cry, and finally came to a sentence, fluttering what is like, heaven and earth a gull. Dude, that's amazing!

6. At 11 I went to the database administrator, I hope he can advance notice, so that the database shutdown, I can do more than one hours of operation, the heart is also easy. Where the administrator playing QQ game, fighting the landlord, playing the positive high, see me to the front, do not want to get up. 11 o'clock, there is no business operations, to the various business departments to call, sent a notice. I can do it now!

Transfer the small data file to the B machine via SFTP on the A-machine database shutdown. Make physical copies of the company's disks at the same time. After one hours, the copy is complete.

7. Because there is no library, directly through the initialization of files, control files, password files, log files, and data file recovery, fast, but if the file is damaged, you have to re-copy directly.

Overall, the operation is smooth, but in the middle of these problems.

1. Rename the database of library B.

Scenario 1: Kinda think of course, after you change the file path in the Db_name,backgroud_dump_dest,core_dump_dest,user_dump_dest,audit_file_dest in the initialization file,

Change the control_files name again. Use Orapwd to re-create the user password file. Start the database.

View Code

No, the control file used at startup uses the original database name. Only use Scenario 2

Scenario 2: Load the original data name first, and then change the database name by rebuilding the control file.

Rebuilding the control file

Generates the control file trace to get the statement that generates the control file. After the db_name is executed, the ALTER DATABASE open Resetlogs

2. In the Execute ALTER DATABASE open Resetlogs. If error occurs

Statement Error

No clue, from the error point of view due to inconsistent data files and control file files. Is it a problem when a library shuts down, causing the SCN in the control file to be inconsistent with the SCN of the data file?

Not sure. Boarded a library, start a library, sure enough I expected. Failed to start the database.

failed to start

Database control files can only be recovered on the a library, and the documentation in Oracle provides the following steps:

ORACLE DOC

After execution completes, the boot succeeds, back up to B machine, restore, success.

3. A minor problem occurred during the middle boot

Oracle Error

The recover database is carried out, the recovery fails, the connection is forcibly disconnected, the Alert.log log file is viewed, and the configuration file is changed after the Initxx.ora initialization. Ok.

Test for data, no loss, gameover!

4. A small problem encountered during start-up

can ' t excluse mode

Ext.: http://www.cnblogs.com/jerryxing/archive/2012/07/24/2606798.html

Oracle project that's the thing----Database migration (1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.