Although, Conceptual Details on ASM were hardly touched, but the post was pretty straight-forward and a direct technical approach. Any DBA can use content to get their hands on 10g ASM. And, so I thought of working on the contents in my test 10g environment. And within a matter of 2 hours, I was able to migrate my Non-ASM Database to ASM Database on Windows.
Here's a brief outline on the whole content:
- Creation of ASM Disks using "asmtool", spaced enough to have your Non-ASM Database fit in.
asmtool -create disk01 2048 - Creation of OCR Repository and CSS Service, using "localconfig"
localconfig add - Creation of ASM Instance using "DBCA", as first step.
Here you will have to set the following paramters like, ASM_DISKGROUP, ASM_DISKSTRING, LOCK_NAME_SPACE, etc. - Creation of ASM Disk Groups and Addition od ASM Disks (as Candidates), using "DBCA", assecond step.
Ensuring _ASM_ALLOW_ONLY_RAW_DISKS is set to FALSE, to successfully add ASM Disks.
alter system "_ASM_ALLOW_ONLY_RAW_DISKS"=false scope=spfile; - Ensure the Availability of the Instance:
net start oracleasmservice+asm - Checking the Assignments of the ASM Disks
show parameter asm
At this point the ASM Instance is up with mounted ASM Disk Groups. - Change the following parameters (control_files, db_create_file_dest, db_create_online_log_dest_n) and startup the Non-ASM Database in NOMOUNT state.
control_files='+DATA\control01.ctl','+DATA\control02.ctl','+DATA\control03.ctl' - In another session, connect as target to Non-ASM Database, using "rman"
- Restore the control file from original location to ASM Disk, and mount the database, under "rman" session:
restore controlfile from 'C:\oracle\asmdb\control01.ctl'; - Take a Copy Backup of the Non-ASM Database in ASM Disk space, under "rman" session.
backup as copy database format '+DATA'; - Switch the Database and Tempfiles to ASM Disk having the copy backup.
switch database to copy;
run{set newname for tempfile 1 to '+DATA/asmdb/tempfile'; switch tempfile all;} - Now, open the database.
- Add redo groups to ASM Disk, and drop the redo groups from non-ASM location
alter database add logfile group 4 ('+data');
I am sure you will enjoy it!!!
No comments:
Post a Comment