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 DataBase single instance using ASM case (3)-- Oracle 10g Application

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Oracle DataBase single instance using ASM case (3)-- Oracle 10g Application

System environment:

Operating system: RedHat EL5 (64)

Oracle software: Oracle 10gR2

It is easy to use ASM in Oracle 10g single instance environment:

1. Create a disk partition

[root@rh65 ~] # fdisk-l

Disk / dev/sdb: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/ dev/sdb1 1 487 3911796 83 Linux

/ dev/sdb2 488 974 3911827 + 83 Linux

/ dev/sdb3 975 2610 13141170 5 Extended

/ dev/sdb5 975 1461 3911796 83 Linux

/ dev/sdb6 1462 1948 3911796 83 Linux

/ dev/sdb7 1949 2192 1959898 + 83 Linux

/ dev/sdb8 2193 2436 1959898 + 83 Linux

/ dev/sdb9 2437 2610 1397623 + 83 Linux

2. Install ASM LIB software

System kernel version:

[root@rh65 rh6_xen_asm] # uname-a

Linux rh65 2.6.18-194.el5xen # 1 SMP Tue Mar 16 22:08:06 EDT 2010 i686 i686 i386 GNU/Linux

Install the ASM package:

[root@rh65 rh6_xen_asm] # ls-l

Total 236

-rwxr--r-- 1 oracle oinstall 128392 May 27 12:15 oracleasm-2.6.18-194.el5xen-2.0.5-1.el5.i686.rpm

-rwxr--r-- 1 oracle oinstall 13929 May 27 12:14 oracleasmlib-2.0.4-1.el5.i386.rpm

-rwxr--r-- 1 oracle oinstall 85303 May 27 12:14 oracleasm-support-2.1.8-1.el5.i386.rpm

[root@rh65 rh6_xen_asm] # rpm-ivh *

Warning: oracleasm-2.6.18-194.el5xen-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Error: failed to stat / media/RHEL_5.5 i386 DVD: No such file or directory

Preparing... # [100%]

1:oracleasm-support # [33%]

2:oracleasm-2.6.18-194.el### [67%]

3:oracleasmlib # # [100%]

3. Configure ASM and set up ASM disk

[root@rh65 rh6_xen_asm] # service oracleasm configure

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library

Driver. The following questions will determine whether the driver is

Loaded on boot and what permissions it will have. The current values

Will be shown in brackets ('[]'). Hitting without typing an

Answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle

Default group to own the driver interface []: dba

Start Oracle ASM library driver on boot (yzone) [n]: y

Scan for Oracle ASM disks on boot (yzone) [y]:

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver: [OK]

Scanning the system for Oracle ASMLib disks: [OK]

[root@rh65 rh6_xen_asm] #

Create an ASM disk:

[root@rh65 rh6_xen_asm] # service oracleasm createdisk ASM_DSK1 / dev/sdb1

Marking disk "ASM_DSK1" as an ASM disk: [OK]

[root@rh65 rh6_xen_asm] # service oracleasm createdisk ASM_DSK2 / dev/sdb2

Marking disk "ASM_DSK2" as an ASM disk: [OK]

[root@rh65 rh6_xen_asm] # service oracleasm createdisk ASM_DSK3 / dev/sdb5

Marking disk "ASM_DSK3" as an ASM disk: [OK]

[root@rh65 rh6_xen_asm] # service oracleasm createdisk ASM_DSK4 / dev/sdb6

Marking disk "ASM_DSK4" as an ASM disk: [OK]

View ASM disk information:

[root@rh65 ~] # service oracleasm listdisks

ASM_DSK1

ASM_DSK2

ASM_DSK3

ASM_DSK4

4. Configure ASM instance

[oracle@rh65 dbs] $cat init+ASM.ora

Instance_type='asm'

Asm_diskstring='ORCL:ASM_*'

Large_pool_size=12m

Asm_diskgroups='DG1','RCY1'

Background_dump_dest=/u01/app/oracle/admin/+ASM/bdump

Core_dump_dest=/u01/app/oracle/admin/+ASM/cdump

User_dump_dest=/u01/app/oracle/admin/+ASM/udump

Set up the appropriate directory:

[oracle@rh65 dbs] $mkdir-p / u01/app/oracle/admin/+ASM/bdump

[oracle@rh65 dbs] $mkdir-p / u01/app/oracle/admin/+ASM/cdump

[oracle@rh65 dbs] $mkdir-p / u01/app/oracle/admin/+ASM/udump

Create a password file:

[oracle@rh65 dbs] $orapwd file='orapw+ASM' password=oracle entries=3

Start the CSS service:

[root@rh65 ~] # cd / u01/app/oracle/product/10.2.0/db_1/bin

[root@rh65 bin] #. / localconfig add

/ etc/oracle does not exist. Creating it now.

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp' root'..

Operation successful.

Configuration for local CSS has been initialized

Adding to inittab

Startup will be queued to init within 90 seconds.

Checking the status of new Oracle init process...

Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.

Rh65

CSS is active on all nodes.

Oracle CSS service is installed and running under init (1m)

5. Start ASM Instance

[oracle@rh65 ~] $export ORACLE_SID=+ASM

[oracle@rh65 ~] $sqlplus'/ as sysdba'

12:44:31 SYS@ + ASM > startup force nomount

ASM instance started

Total System Global Area 83886080 bytes

Fixed Size 1217836 bytes

Variable Size 57502420 bytes

ASM Cache 25165824 bytes

12:44:46 SYS@ + ASM > show parameter name

NAME TYPE VALUE

-

Db_file_name_convert string

Db_name string

Db_unique_name string + ASM

Global_names boolean FALSE

Instance_name string + ASM

Lock_name_space string

Log_file_name_convert string

Service_names string + ASM

12:45:10 SYS@ + ASM >

6. Establish ASM diskgroup by hand

12:50:33 SYS@ + ASM > create diskgroup dg1

12:53:57 2 normal redundancy

12:54:01 3 failgroup fg1 disk 'ORCL:ASM_DSK1'

12:54:06 4 failgroup fg2 disk 'ORCL:ASM_DSK2'

Diskgroup created.

Elapsed: 00:00:12.22

12:54:23 SYS@ + ASM > create diskgroup rcy1

12:54:37 2 normal redundancy

12:54:40 3 failgroup fg1 disk 'ORCL:ASM_DSK3'

12:54:50 4 failgroup fg2 disk 'ORCL:ASM_DSK4'

Diskgroup created.

7. View ASM disk groups and disk information

12:55:09 SYS@ + ASM > select name, state from v$asm_diskgroup

NAME STATE

DG1 MOUNTED

RCY1 MOUNTED

Elapsed: 00:00:00.18

12:56:02 SYS@ + ASM >

12:57:09 SYS@ + ASM > select GROUP_NUMBER, DISK_NUMBER,STATE,NAME,PATH from v$asm_disk

GROUP_NUMBER DISK_NUMBER STATE NAME PATH

-

1 0 NORMAL ASM_DSK1 ORCL:ASM_DSK1

1 1 NORMAL ASM_DSK2 ORCL:ASM_DSK2

2 0 NORMAL ASM_DSK3 ORCL:ASM_DSK3

2 1 NORMAL ASM_DSK4 ORCL:ASM_DSK4

Elapsed: 00:00:00.03

8. Manage ASM through DBCA

@ at this point, Oracle 10g ASM disk can also be used under a single instance.

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

Wechat

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

12
Report