In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 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 (4)-- AIX system Oracle 10g Application
System environment:
Operating system: AIX5300-08
Oracle software: Oracle 10gR2
For AIX systems, it is very convenient to use ASM under Oracle 10g. After installing Oracle database software, you do not need to install any other software to use ASM to store data.
1. Establish ASM Instance
[oracle@aix211 dbs] $cat init+ASM.ora
Instance_type='asm'
Asm_diskstring='/dev/rlv*'
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
2. Establish a directory related to the operation of Instance
[oracle@aix211 dbs] $mkdir-p / u01/app/oracle/admin/+ASM/bdump
[oracle@aix211 dbs] $mkdir-p / u01/app/oracle/admin/+ASM/cdump
[oracle@aix211 dbs] $mkdir-p / u01/app/oracle/admin/+ASM/udump
3. Start the CSS process
The CSS process is used for communication between ASM Instance and RDBMS
[oracle@aix211 bin] $. / localconfig add
You must be logged in as root to run. / localconfig.
Log in as root and restart. / localconfig execution.
[oracle@aix211 bin] $su-
Root's Password:
[ubih W] $bash
[root@aix211 /] # cd / u01/app/oracle/product/10.2.0/db_1/bin
[root@aix211 bin] #. / localconfig add
/ etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp' system'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 30 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.
Aix211
CSS is active on all nodes.
Oracle CSS service is installed and running under init (1m)
4. Start ASM Instance
[oracle@aix211 ~] $export ORACLE_SID=+ASM
[oracle@aix211 ~] $sqlplus'/ as sysdba'
SQL*Plus: Release 10.2.0.1.0-Production on Tue May 27 16:22:40 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL > startup nomount
ASM instance started
Total System Global Area 130023424 bytes
Fixed Size 2019136 bytes
Variable Size 102838464 bytes
ASM Cache 25165824 bytes
SQL > 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
SQL >
5. Create an ASM disk through LV
[root@aix211 /] # lsvg asmvg
VOLUME GROUP: asmvg VG IDENTIFIER: 00040f8a00004c00000001463c91f6ec
VG STATE: active PP SIZE: 64 megabyte (s)
VG PERMISSION: read/write TOTAL PPs: 480 (30720 megabytes)
MAX LVs: 256 FREE PPs: 480 (30720 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256kilobyte (s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
1) create a logical volume
[root@aix211 /] # mklv-y lv_asm1 asmvg 64
Lv_asm1
[root@aix211 /] # mklv-y lv_asm2 asmvg 64
Lv_asm2
[root@aix211 /] # mklv-y lv_asm3 asmvg 64
Lv_asm3
[root@aix211 /] # mklv-y lv_asm4 asmvg 64
Lv_asm4
[root@aix211 /] # lsvg-l asmvg
Asmvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
Lv_asm1 jfs 64 64 1 closed/syncd N/A
Lv_asm2 jfs 64 64 1 closed/syncd N/A
Lv_asm3 jfs 64 64 1 closed/syncd N/A
Lv_asm4 jfs 64 64 1 closed/syncd N/A
[root@aix211 /] #
2) set logical volume properties
[root@aix211 /] # chown oracle:dba / dev/*lv_asm*
[root@aix211 /] # ls-l / dev/ | grep asm
Crw-rw---- 1 root system 88, 0 May 27 16:25 asmvg
Brw-rw---- 1 oracle dba 88, 1 May 27 16:28 lv_asm1
Brw-rw---- 1 oracle dba 88, 2 May 27 16:29 lv_asm2
Brw-rw---- 1 oracle dba 88, 3 May 27 16:29 lv_asm3
Brw-rw---- 1 oracle dba 88, 4 May 27 16:29 lv_asm4
Crw-rw---- 1 oracle dba 88, 1 May 27 16:28 rlv_asm1
Crw-rw---- 1 oracle dba 88, 2 May 27 16:29 rlv_asm2
Crw-rw---- 1 oracle dba 88, 3 May 27 16:29 rlv_asm3
Crw-rw---- 1 oracle dba 88, 4 May 27 16:29 rlv_asm4
3) View ASM disk information
[oracle@aix211 ~] $kfod
ORACLE_SID ORACLE_HOME
=
+ ASM / u01/app/oracle/product/10.2.0/db_1
[oracle@aix211 ~] $kfod status=TRUE asm_diskstring='/dev/rlv*' disk=all
Disk Size Header Path
=
1: 4096 Mb FOREIGN / dev/rlv_asm1 / / this bare device information is inconsistent with other lv
2: 4096 Mb CANDIDATE / dev/rlv_asm2
3: 4096 Mb CANDIDATE / dev/rlv_asm3
4: 4096 Mb CANDIDATE / dev/rlv_asm4
ORACLE_SID ORACLE_HOME
=
+ ASM / u01/app/oracle/product/10.2.0/db_1
6. Establish an ASM disk group
[oracle@aix211 ~] $export ORACLE_SID=+ASM
[oracle@aix211 ~] $sqlplus'/ as sysdba'
SQL*Plus: Release 10.2.0.1.0-Production on Tue May 27 16:36:03 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the Partitioning, OLAP and Data Mining options
SQL > create diskgroup dg1
2 normal redundancy
3 failgroup fg1 disk'/ dev/rlv_asm1'
4 failgroup fg2 disk'/ dev/rlv_asm2'
Create diskgroup dg1
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15201: disk / dev/rlv_asm1 contains a valid RDBMS file
Error message: rlv_asm1 is occupied by database instance
Clear the ASM disk header information:
[oracle@aix211 ~] $dd if=/dev/zero of=/dev/rlv_asm1 bs=8192 count=2560
2560 0 records in
2560 0 records out
[oracle@aix211 ~] $kfod status=TRUE asm_diskstring='/dev/rlv*' disk=all
Disk Size Header Path
=
1: 4096 Mb CANDIDATE / dev/rlv_asm1 / / at this point, rlv_asm1 is consistent with other lv
2: 4096 Mb CANDIDATE / dev/rlv_asm2
3: 4096 Mb CANDIDATE / dev/rlv_asm3
4: 4096 Mb CANDIDATE / dev/rlv_asm4
ORACLE_SID ORACLE_HOME
=
+ ASM / u01/app/oracle/product/10.2.0/db_1
Then create a disk group:
[oracle@aix211 ~] $sqlplus'/ as sysdba'
SQL*Plus: Release 10.2.0.1.0-Production on Tue May 27 16:44:16 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production
With the Partitioning, OLAP and Data Mining options
SQL > create diskgroup dg1
2 normal redundancy
3 failgroup fg1 disk'/ dev/rlv_asm1'
4 failgroup fg2 disk'/ dev/rlv_asm2'
Diskgroup created.
SQL > create diskgroup rcy1
2 normal redundancy
3 failgroup fg1 disk'/ dev/rlv_asm3'
4 failgroup fg2 disk'/ dev/rlv_asm4'
Diskgroup created.
7. View disk group information
SQL > select name,state from v$asm_diskgroup
NAME STATE
DG1 MOUNTED
RCY1 MOUNTED
SQL > select name,path,state from v$asm_disk
NAME PATH STATE
-
DG1_0000 / dev/rlv_asm1 NORMAL
DG1_0001 / dev/rlv_asm2 NORMAL
RCY1_0000 / dev/rlv_asm3 NORMAL
RCY1_0001 / dev/rlv_asm4 NORMAL
@ so far, the ASM storage system has been successfully established in the AIX system through Oracle 10g. DataBase storage can be carried out through ASM disk groups, which can sometimes play the role of ASM storage system and improve the performance of Oracle database.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.