Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle script to create ASM instance

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment: Oracle 11g (11.1.0.6) Windows Server 2003

Note: there is a difference between the creation of Oracle asm instances before and after 11gR2. 11gR2 introduces Grid infrastructure. The method created here is only applicable to previous versions of 11gR2 databases.

Create a directory (the sid of the instance is dbasm):

Create the following directory under the Oracle product directory (for example: d:\ app\ Administrtor\ admin):

D:\ app\ Administrtor\ admin\ dbasm

D:\ app\ Administrtor\ admin\ dbasm\ adump

D:\ app\ Administrtor\ admin\ dbasm\ bdump

D:\ app\ Administrtor\ admin\ dbasm\ cdump

D:\ app\ Administrtor\ admin\ dbasm\ dpdump

D:\ app\ Administrtor\ admin\ dbasm\ udump

Create a new asm disk:

Description: this is created on a formatted partition and an unpartitioned disk. There is a difference between the two. This example is created on a formatted partition.

C:\ Documents and Settings\ Administrator > asmtool-create d:\ asmfiles\ asmfile1 1

C:\ Documents and Settings\ Administrator > asmtool-create d:\ asmfiles\ asmfile2 2

After creation, a 1024kb and a 2048kb file will be generated in the corresponding directory.

Create a new initialization file:

Create the file initDBASM.ora in $ORACLE_HOME\ dbs and ORACLE_HOM\ database

Contents of the file:

*. _ asm_allow_only_raw_disks=FALSE

* .instance_type='ASM'

* .asm_diskstring='D:\ asmfiles\ *'

* .large_pool_size=12M

* .db_unique_name='DBASM'

* .asm_power_limit=1

* .remote_login_passwordfile='SHARED'

* .background_dump_dest=D:\ app\ Administrtor\ admin\ asm\ bdump'

* .core_dump_dest=D:\ app\ Administrtor\ admin\ asm\ cdump'

* .user_dump_dest=D:\ app\ Administrtor\ admin\ asm\ udump'

Create a new password file:

C:\ Documents and Settings\ Administrator > orapwd file=PWDoraDBASM.ora password=oracle

The password is oracle, which corresponds to the password of sys

Open the instance:

Log in to SQLPLUS:

Set ORACLE_SID = DBASM

Sqlplus / as sysdba

Startup

(if an ora- error occurs, double-click to run $ORACLE_HOME\ BIN\ localconfig.bat. This file is only available in the previous version of 11gR2. Log in to sqlplus to start the instance after running it.)

If nothing happens, the instance will be created at this point.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report