part1편에 이어 계속 하겠습니다.
글이 너무 길어지면 관리하기도 힘들고 보기도 힘들더라구요..그래서 나눠서 했습니다.
사전 구성
해당 포스팅을 보시기 전에 part1부터 진행해주시면 될거 같습니다.
https://jhdatabase.tistory.com/17
테스트 시작
■ grid 설치
# su - grid
# cd /grid
# unzip LINUX.X64_193000_grid_home.zip -d $ORACLE_HOME
# cd $ORACLE_HOME
[+ASM]grid@jh:/grid/crs/product/19c/dbhome_1#who am i
[+ASM]grid@jh:/grid/crs/product/19c/dbhome_1#export DISPLAY=61.250.99.123:0.0
[+ASM]grid@jh:/grid/crs/product/19c/dbhome_1#xhost +
[+ASM]grid@jh:/grid/crs/product/19c/dbhome_1# ./gridSetup.sh
■ 전에 yum으로 설치할때 설치 안된 패키지 따로 넣고 rpm으로 설치하겠습니다.
※ 설치 이후 check again을 해주시면 됩니다.
[root@jh /]# rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64\ \(2\).rpm
warning: compat-libstdc++-33-3.2.3-72.el7.x86_64 (2).rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:compat-libstdc++-33-3.2.3-72.el7 ################################# [100%]
■ 이후 ignore all
[root@jh ~]# cd /grid/crs/product/19c/dbhome_1/cv/rpm
[root@jh cv]# export cv
cvdata/ cvutl/
[root@jh cv]# export CVUQDISK_GRP=dba
[root@jh rpm]# ll
total 12
-rw-r--r-- 1 grid dba 11412 Mar 13 2019 cvuqdisk-1.0.10-1.rpm
[root@jh rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpm
Preparing... ################################# [100%]
Updating / installing...
1:cvuqdisk-1.0.10-1 ################################# [100%]
■ 해당 스크립트 실행
■ grid 데몬 확인
# su - grid
[+ASM]grid@jh:/home/grid# crsctl stat res -t //필수 데몬들 보기 (올라오는 순서 있음)
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE jh STABLE
ora.LISTENER.lsnr
ONLINE ONLINE jh STABLE
ora.asm
ONLINE ONLINE jh Started,STABLE
ora.ons
OFFLINE OFFLINE jh STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE jh STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE jh STABLE
--------------------------------------------------------------------------------
[+ASM]grid@jh:/home/grid# crsctl stat res -t -init
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE jh STABLE
ora.LISTENER.lsnr
ONLINE ONLINE jh STABLE
ora.asm
ONLINE ONLINE jh Started,STABLE
ora.ons
OFFLINE OFFLINE jh STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE jh STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE jh STABLE
--------------------------------------------------------------------------------
■ 디스크 RECO 그룹 생성
[+ASM]grid@jh:/home/grid# asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL N 512 512 4096 4194304 102400 102176 0 51088 0 N DATA/
MOUNTED EXTERN N 512 512 4096 4194304 101376 101288 0 101288 0 N RECO/
[+ASM]grid@jh:/home/grid# asmca
■ DB 엔진 설치
[root@jh ~]# su - oracle
[TEST]oracle@jh:/oracle# unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME
[TEST]oracle@jh:/oracle# cd $ORACLE_HOME
[TEST]oracle@jh:/oracle/app/product/19c/dbhome_1# who am iroot
pts/1 2021-06-14 12:07 (61.250.99.123)
[TEST]oracle@jh:/oracle/app/product/19c/dbhome_1# export DISPLAY=61.250.99.123:0.0
[TEST]oracle@jh:/oracle/app/product/19c/dbhome_1# ./runInstaller
■ 스크립트 실행
[root@jh ~]# /oracle/app/product/19c/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/app/product/19c/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Oracle Trace File Analyzer (TFA - Standalone Mode) is available at :
/oracle/app/product/19c/dbhome_1/bin/tfactl
Note :
1. tfactl will use TFA Service if that service is running and user has been granted access
2. tfactl will configure TFA Standalone Mode only if user has no access to TFA Service or TFA is not installed
■ 설치
[TEST]oracle@jh:/oracle# dbca
※SGA 사이즈 설정은 전체 램의 30%
PGA 사이즈 설정은 전체 램의 10% 설정
ASMM -> sga와 pga를 따로 나눠서 관리
AMM -> sga와 pga를 함번에 관리
[TEST]oracle@jh:/home/oracle# export ORACLE_SID=test
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +RECO
Oldest online log sequence 10
Next log sequence to archive 12
Current log sequence 12
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DATA/ORCL/DATAFILE/system.261.1075207809
+DATA/ORCL/DATAFILE/sysaux.262.1075207813
+DATA/ORCL/DATAFILE/undotbs1.263.1075207815
+DATA/ORCL/DATAFILE/users.265.1075207827
SQL> create tablespace kIm datafile size 1G;
Tablespace created.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DATA/ORCL/DATAFILE/system.261.1075207809
+DATA/ORCL/DATAFILE/sysaux.262.1075207813
+DATA/ORCL/DATAFILE/undotbs1.263.1075207815
+DATA/ORCL/DATAFILE/users.265.1075207827
+DATA/ORCL/DATAFILE/kum.267.1075210495
[+ASM]grid@jh:/home/grid# crsctl config has // ASM 이 자동으로 올라오는지 확인
CRS-4622: Oracle High Availability Services autostart is enabled.
[+ASM]grid@jh:/home/grid# crsctl disable has // ASM 자동으로 올라오는거 끄는법
[orcl]oracle@jh:/home/oracle# srvctl status database -d orcl // 디비 상태 확인 -d sid이름
Database is running.
[+ASM]grid@jh:/home/grid# crsctl stop has -> crs 데몬 끄기
[+ASM]grid@jh:/home/grid# crsctl start has -> crs 데몬 키기
■ 해당 리소스가 환경설정 확인
[+ASM]grid@jh:/home/grid# crsctl stat res ora.asm -p
NAME=ora.asm
TYPE=ora.asm.type
ACL=owner:grid:rwx,pgrp:dba:r-x,other::r--
ACTIONS=
ACTION_SCRIPT=
ACTION_TIMEOUT=60
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
ASM_DISKSTRING=ORCL:*
AUTO_START=restore
CHECK_INTERVAL=1
CHECK_TIMEOUT=30
CLEAN_TIMEOUT=60
CSS_CRITICAL=no
DELETE_TIMEOUT=60
DESCRIPTION=Oracle ASM resource
ENABLED=1
GEN_RESTART=StartCompleted
GEN_USR_ORA_INST_NAME=+ASM
IGNORE_TARGET_ON_FAILURE=no
INSTANCE_FAILOVER=1
INTERMEDIATE_TIMEOUT=0
LOAD=1
LOGGING_LEVEL=1
MODIFY_TIMEOUT=60
NLS_LANG=
OFFLINE_CHECK_INTERVAL=0
OS_CRASH_THRESHOLD=0
OS_CRASH_UPTIME=0
PRESENCE=standard
PWFILE=+DATA/orapwasm
PWFILE_BACKUP=
REGISTERED_TYPE=srvctl
RESOURCE_GROUP=
RESTART_ATTEMPTS=5
RESTART_DELAY=0
SCRIPT_TIMEOUT=60
SERVER_CATEGORY=
SPFILE=+DATA/ASM/ASMPARAMETERFILE/registry.253.1075206007
START_CONCURRENCY=0
START_DEPENDENCIES=hard(ora.cssd) weak(ora.LISTENER.lsnr)
START_TIMEOUT=900
STOP_CONCURRENCY=0
STOP_DEPENDENCIES=hard(ora.cssd)
STOP_TIMEOUT=600
TARGET_DEFAULT=default
TYPE_VERSION=1.2
UPTIME_THRESHOLD=1d
USER_WORKLOAD=no
USR_ORA_ENV=
USR_ORA_INST_NAME=+ASM
USR_ORA_OPEN_MODE=mount
USR_ORA_OPI=false
USR_ORA_STOP_MODE=immediate
WORKLOAD_CPU=0
WORKLOAD_CPU_CAP=0
WORKLOAD_MEMORY_MAX=0
WORKLOAD_MEMORY_TARGET=0
이상으로 마치도록 하겠습니다.
'DataBase > Oracle' 카테고리의 다른 글
[Oracle - Statspack manual & Job 생성] part 1 (0) | 2022.03.10 |
---|---|
[Oracle - killed 세션] (0) | 2022.03.10 |
[Oracle - PDB접속 방법 use TNS] (0) | 2022.03.10 |
[Oracle - RESTART 19c install] part 1 (0) | 2022.01.22 |
[Oracle - Client password version에러] ORA-28040 (0) | 2022.01.22 |