1. Hardware and operating system platform (P6 570):
[Email protected]/]# prtconf | grep Type
Processor TYPE:POWERPC_POWER6
CPU Type:64-bit
Kernel Type:64-bit
[Email protected]/]# oslevel-s
7100-02-02-1316
Database version 11.2.0.3.0
2. There is a DATAVG volume group in the system to hold data data and to create the bare devices required by the database:
[Email protected]/]# mklv-t o-y ctl1 datavg 30M
Ctl1
[Email protected]/]# mklv-t o-y ctl2 datavg 30M
Ctl2
[Email protected]/]# mklv-t o-y ctl3 datavg 30M
Ctl3
[Email protected]/]# mklv-t o-y redo01 datavg 100M redo01
[Email protected]/]# mklv-t o-y redo02 datavg 100M
Redo02
[Email protected]/]# mklv-t o-y redo03 datavg 100M
Redo03
[Email protected]/]# mklv-t o-y sysaux01 datavg 500M
sysaux01
[Email protected]/]# mklv-t o-y system01 datavg 1G
System01
[Email protected]/]# mklv-t o-y undotbs01 datavg 500M
Undotbs01
[Email protected]/]# mklv-t o-y users01 datavg 800M
Users01
[Email protected]/]# mklv-t o-y example01 datavg 300M
Example01
[Email protected]/]# mklv-t o-y temp01 datavg 400M
Temp01
[Email protected]/]# mklv-t o-y spfileyd datavg 10M
Spfileyd
[Email protected]/]# mklv-t o-y pwdyd datavg 10M
Pwdyd
Execute the above command as root to create a bare device. After the creation, check the creation of the bare device on DATAVG;
[Email protected]/]# lsvg-l datavg
DATAVG:
LV NAME TYPE LPs PPs PVs LV State MOUNT Point
Oralv JFS2 1 closed/syncd N/A
Lv_u01 JFS2 1 open/syncd/u01
loglv00 Jfs2log 1 1 1 open/syncd N/A
CTL1 JFS 1 1 1 open/syncd N/A
CTL2 JFS 1 1 1 open/syncd N/A
CTL3 JFS 1 1 1 open/syncd N/A
REDO01 JFS 1 1 1 open/syncd N/A
Redo02 JFS 1 1 1 open/syncd N/A
redo03 JFS 1 1 1 open/syncd N/A
SYSAUX01 JFS 1 1 1 open/syncd N/A
SYSTEM01 JFS 2 2 1 open/syncd N/A
UNDOTBS01 JFS 1 1 1 open/syncd N/A
Users01 JFS 2 2 1 open/syncd N/A
EXAMPLE01 JFS 1 1 1 closed/syncd N/A
TEMP01 JFS 1 1 1 open/syncd N/A
Spfileyd JFS 1 1 1 closed/syncd N/A
Pwdyd JFS 1 1 1 closed/syncd N/A
Use the following command to set the owner of the bare device above as an Oracle user and make changes to read and Write permissions:
Chown oracle:oinstall/dev/rredo*
Chown oracle:oinstall/dev/rctl*
......
chmod 755/dev/rctl*
chmod 755/dev/rredo*
.......
To create a pfile file:
[[email protected] DBS] $cat Initcrm.ora
crm.__db_cache_size=8254390272
crm.__java_pool_size=33554432
crm.__large_pool_size=33554432
Crm.__oracle_base= '/u01/app/oracle ' #ORACLE_BASE set from environment
crm.__pga_aggregate_target=3288334336
crm.__sga_target=9865003008
Crm.__shared_io_pool_size=0
crm.__shared_pool_size=1476395008
Crm.__streams_pool_size=0
*.audit_file_dest= '/u01/app/oracle/admin/crm/adump '--need to create this directory
*.audit_trail= ' DB '
*.compatible= ' 11.2.0.0.0 '
*.control_files= '/dev/rctl1 ', '/dev/rctl2 ', '/DEV/RCTL3 '
*.db_block_size=8192
*.db_domain= "
*.db_name= ' CRM '
*.db_recovery_file_dest= '/u01/app/oracle/fast_recovery_area '
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest= '/u01/app/oracle '
*.dispatchers= ' (protocol=tcp) (SERVICE=CRMXDB) '
*.open_cursors=300
*.pga_aggregate_target=3288334336
*.processes=150
*.remote_login_passwordfile= ' EXCLUSIVE '
*.sga_target=9865003008
*.undo_tablespace= ' UNDOTBS1 '
Write a script to create the database: (/home/oracle/createdb.txt)
CREATE DATABASE CRM
USER SYS identified by 123123
USER SYSTEM identified by 123123
LOGFILE GROUP 1 ('/dev/rredo01 ') SIZE 100M reuse,
GROUP 2 ('/dev/rredo02 ') SIZE 100M reuse,
GROUP 3 ('/dev/rredo03 ') SIZE 100M reuse
Maxlogfiles 5
Maxlogmembers 5
Maxloghistory 1
Maxdatafiles 100
CHARACTER SET Al32utf8
National CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DataFile '/dev/rsystem01 ' SIZE 1000M reuse
Sysaux datafile '/dev/rsysaux01 ' size 450M reuse - Note: size is smaller than the actual bare device.
DEFAULT tablespace Users
DataFile '/dev/rusers01 '
SIZE 750M Reuse autoextend on MAXSIZE UNLIMITED
DEFAULT Temporary tablespace tempts1
Tempfile '/dev/rtemp01 '
SIZE 350M Reuse
UNDO tablespace UNDOTBS1
DataFile '/dev/rundotbs01 '
SIZE 450M Reuse autoextend on MAXSIZE UNLIMITED;
To create a database CRM manually:
[[Email protected] ~] $sqlplus/as SYSDBA
Sql*plus:release 11.2.0.3.0 Production on Mon Feb 2 14:16:08 2015
Copyright (c) 1982, Oracle. All rights reserved.
Connected to an idle instance.
sql> startup Nomount;
ORACLE instance started.
Total System Global area 9820950528 bytes
Fixed Size 2229864 bytes
Variable Size 1543506328 bytes
Database buffers 8254390272 bytes
Redo buffers 20824064 bytes
Sql> @/home/oracle/createdb.txt;
Database created.
To create a spfile file on a bare device:
sql> create spfile= '/dev/rspfileyd ' from pfile;
File created.
Check the data file for the database:
Sql> select name from V$datafile;
NAME
--------------------------------------------------------------------------------
/dev/rsystem01
/dev/rsysaux01
/dev/rundotbs01
/dev/rusers01
Sql> select name from V$controlfile;
NAME
--------------------------------------------------------------------------------
/dev/rctl1
/dev/rctl2
/dev/rctl3
Sql> Select member from V$logfile;
MEMBER
--------------------------------------------------------------------------------
/dev/rredo01
/dev/rredo02
/dev/rredo03
AIX 7.1 Manually Create Oracle 11g database (Bare device management)