Oracle 10g/11g Create New ASM Instance and Databases



1.Create ASM Instance.

D:\oracle\product\10.2.0\db_1\BIN>oradim -NEW -ASMSID +ASM -SYSPWD asmsys -START
MODE auto


Output:
Instance created.



2.Create pfile for +ASM instance.

Use this sample file.


*._ASM_ALLOW_ONLY_RAW_DISKS=FALSE
*.ASM_DISKSTRING='C:\asmdisks\*','D:\asmdisks\*','E:\asmdisks\*','F:\asmdisks\*'
*.background_dump_dest='D:\oracle\product\10.2.0\admin\+ASM\bdump'
*.core_dump_dest='D:\oracle\product\10.2.0\admin\+ASM\cdump'
*.DB_UNIQUE_NAME='+ASM'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='SHARED'
*.user_dump_dest='D:\oracle\product\10.2.0\admin\+ASM\udump'


3.Create bdump,udump,cdump and pfile directory into ORACLE_HOME

MD F:\oracle\product\10.2.0\admin\+ASM\bdump
MD F:\oracle\product\10.2.0\admin\+ASM\udump
MD F:\oracle\product\10.2.0\admin\+ASM\cdump
MD F:\oracle\product\10.2.0\admin\+ASM\pfile

 4.Create Disk group from asmtool.


It will take time to create disk.Don't interrupt.Check properties of file for size increase.

Create four directories in different location.*/ASMDISKS

* means C:,D:,E:,F:

Execute this command.

C:\Documents and Settings\Administrator>asmtool -create C:\asmdisks\disk01 1024

C:\Documents and Settings\Administrator>asmtool -create D:\asmdisks\disk02 1024 

C:\Documents and Settings\Administrator>asmtool -create E:\asmdisks\disk03 1024  

C:\Documents and Settings\Administrator>asmtool -create F:\asmdisks\disk04 1024  

C:\Documents and Settings\Administrator>asmtool -create C:\asmdisks\disk05 1024

C:\Documents and Settings\Administrator>asmtool -create D:\asmdisks\disk06 1024 

C:\Documents and Settings\Administrator>asmtool -create E:\asmdisks\disk07 1024  

C:\Documents and Settings\Administrator>asmtool -create F:\asmdisks\disk08 1024 


5.Create  OracleCSS Service.

Open Command Prompt.

SET ORACLE_HOME=D:\oracle\product\10.2.0\db_1

Go to CD %Oracle_home%/bin

Execute this command

D:\oracle\product\10.2.0\db_1\BIN>localconfig.bat add



Output:
Step 1:  creating new OCR repository
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'administrator', privgrp ''..
Operation successful.
Step 2:  creating new CSS service
successfully created local CSS service
successfully added CSS to home



6.Start +ASM Instance.

C:\Documents and Settings\Administrator>SET ORACLE_SID=+ASM

C:\Documents and Settings\Administrator>sqlplus / as sysdba

SQL>Startup pfile='D:\oracle\product\10.2.0\admin\+ASM\pfile\init.ora'

Output:

ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1247420 bytes
Variable Size              57472836 bytes
ASM Cache                  25165824 bytes
ORA-15110: no diskgroups mounted

There is no Disk Group Created.Ignore Error.

7.Create ASM Disk Group.


CREATE DISKGROUP DATA
 EXTERNAL REDUNDANCY DISK 'C:/asmdisks/DISK01' NAME DISK01,
              'D:/asmdisks/DISK02' NAME DISK02,
              'E:/asmdisks/DISK03' NAME DISK03,
              'F:/asmdisks/DISK04' NAME DISK04
/

Diskgroup created.

CREATE DISKGROUP RECOVER
 EXTERNAL REDUNDANCY DISK 'C:/asmdisks/DISK05' NAME DISK05,
              'D:/asmdisks/DISK06' NAME DISK06,
              'E:/asmdisks/DISK07' NAME DISK07,
              'F:/asmdisks/DISK08' NAME DISK08
/


Diskgroup created.

8.Create SPFILE ans default pfile.

SQL> create spfile from pfile='F:\oracle\product\10.2.0\admin\+ASM\pfile\init.or
a';

File created.

SQL> create pfile from spfile;

File created.

SQL>

9.Check Diskgroup details.

 select group_number,name,total_mb,Free_mb from v$asm_diskgroup;

10.Create Database from Database Configuration Assistance(DBCA).

















 C Choose Automatic Storage Management(ASM).





Provide password of +asm instance.

 


Display All ASM Disks.

Mount all Disk


 




 Choose Oracle Managed Files.




Choose Flash Recovery Area.



 


 Go to End of Create Database by selecting next.







 11.Restart All Services.


Connect Database.Check Data Control.


12.Migration to ASM Instance Using Data Control.

Connect to Data Control.

Go to Administration Tab.

Click on Migrate to ASM.

Provide +ASM Instance Details.



Click Next

Do Cold or Hot Migration.Default Cold.





Provide Data file Disk Group.








Click Next.








Click Next.




Submit Job.





Check Alert_blogdb.log.After completing task.Check Database.

SQL> select *from v$dbfile;

     FILE# NAME
---------- --------------------------------------------------
         4 +DATA/blogdb/datafile/users.259.783875715
         3 +DATA/blogdb/datafile/sysaux.258.783875709
         2 +DATA/blogdb/datafile/undotbs1.257.783875711
         1 +DATA/blogdb/datafile/system.256.783875709


SQL> select *from v$logfile;

 SQL> /

    GROUP# MEMBER
---------- --------------------------------------------------
         1 +RECOVER/blogdb/onlinelog/group_1.261.783875861
         1 +DATA/blogdb/onlinelog/group_1.260.783875859
         2 +RECOVER/blogdb/onlinelog/group_2.263.783875901
         2 +DATA/blogdb/onlinelog/group_2.266.783875895
         4 +RECOVER/blogdb/onlinelog/group_4.259.783875855
         4 +DATA/blogdb/onlinelog/group_4.264.783875849

===========================================================================



13.Delete Old Files.



Use this for manual migration,Click





















No comments:

Post a Comment

Dear User,

Thank you very much for your kind response