페이지 이력
준비 작업
리스너 생성
리스너 갯수와 이름 그리고 사용할 포트에 맞게 response 파일 내의 변수를 설정하기 바랍니다.
코드 블럭 | ||||||
---|---|---|---|---|---|---|
| ||||||
cat > ~/netca.rsp
[GENERAL]
RESPONSEFILE_VERSION="19.0"
CREATE_TYPE="CUSTOM"
SHOW_GUI=false
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"} |
코드 블럭 | ||||||
---|---|---|---|---|---|---|
| ||||||
dbcanetca -silent -generateScripts -gdbName <글로벌DB명> -templateName New_Database.dbt -scriptDest <스크립트 저장 경로> -createAsContainerDatabase <CDB 여부> -databaseConfigType <DB 타입> -nodelist <쉼표로 구분한 구성할 노드 목록> -memoryMgmtType <메모리 관리 타입> -totalMemory <DB에 할당할 메모리 크기(MB)> -characterSet <문자셋> -nationalCharacterSet <National 문자셋> -storageType <스토리지 타입> -useOMF true <OMF 사용여부> -redoLogFileSize <Redo Log 크기(MB)> -databaseType <DB 용도> -datafileDestination <db_create_file_dest> -recoveryAreaDestination <db_recovery_file_dest> -recoveryAreaSize <FRA 영역 크기(MB)> -emConfiguration <EM 설정> -runCVUChecks <정기적인 클러스터 검증 수행 여부> | ||||||
펼치기 | ||||||
responsefile ~/netca.rsp |
펼치기 | ||
---|---|---|
|
코드 블럭 | ||||||
---|---|---|---|---|---|---|
| ||||||
lsnrctl status <리스너명> |
펼치기 | ||||
---|---|---|---|---|
|
스크립트 수정
코드 블럭 | ||||
---|---|---|---|---|
| ||||
nls_language="AMERICAN" # 변경
audit_trail=none # 변경
db_create_online_log_dest_1="+DATA" # 추가
db_create_online_log_dest_2="+FRA" #추가 |
서식 미적용 |
---|
##############################################################################
# Copyright (c) 1991, 2013 by Oracle Corporation
##############################################################################
###########################################
# NLS
###########################################
nls_language="AMERICAN"
nls_territory="KOREA"
###########################################
# SGA Memory
###########################################
sga_target=3000m
###########################################
# Shared Server
###########################################
dispatchers="(PROTOCOL=TCP) (SERVICE=racdbXDB)"
###########################################
# Miscellaneous
###########################################
compatible=19.0.0
diagnostic_dest=/u01/app/oracle
###########################################
# Network Registration
###########################################
local_listener=-oraagent-dummy-
###########################################
# Database Identification
###########################################
db_name="racdb"
###########################################
# Security and Auditing
###########################################
audit_file_dest="/u01/app/oracle/admin/racdb/adump"
audit_trail=none
remote_login_passwordfile=exclusive
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_tablespace=UNDOTBS1
###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=1000m
###########################################
# Cache and I/O
###########################################
db_block_size=8192
###########################################
# Cursors and Library Cache
###########################################
open_cursors=300
###########################################
# Cluster Database
###########################################
#cluster_database=true
###########################################
# File Configuration
###########################################
db_create_file_dest="+DATA"
db_recovery_file_dest="+FRA"
db_recovery_file_dest_size=20000m
db_create_online_log_dest_1="+DATA"
db_create_online_log_dest_2="+FRA"
###########################################
# Processes and Sessions
###########################################
processes=300
family:dw_helper.instance_mode=read-only
racdb2.instance_number=2
racdb1.instance_number=1
racdb1.thread=1
racdb2.thread=2
racdb2.undo_tablespace=UNDOTBS2
racdb1.undo_tablespace=UNDOTBS1 |
|
파일 저장 경로 생성
코드 블럭 | ||||||
---|---|---|---|---|---|---|
| ||||||
mkdir -p /oradata/ORCL19C/online # 데이터 파일을 저장할 경로
mkdir -p /FRA/ORCL19C/online # FRA 설정 경로
chown -R oracle:oinstall /oradata
chown -R oracle:oinstall /FRA |
펼치기 | ||
---|---|---|
|
DB 생성 스크립트 생성
코드 블럭 | ||||||
---|---|---|---|---|---|---|
| ||||||
dbca -silent -generateScripts -gdbName <글로벌DB명> -templateName New_Database.dbt -scriptDest <스크립트 저장 경로> -createAsContainerDatabase <CDB 여부> -databaseConfigType <DB 타입> -memoryMgmtType <메모리 관리 타입> -totalMemory <DB에 할당할 메모리 크기(MB)> -characterSet <문자셋> -nationalCharacterSet <National 문자셋> -storageType <스토리지 타입> -redoLogFileSize <Redo Log 크기(MB)> -databaseType <DB 용도> -datafileDestination <db_create_file_dest> -recoveryAreaDestination <db_recovery_file_dest> -recoveryAreaSize <FRA 영역 크기(MB)> -emConfiguration <EM 설정> -listeners <리스너명> |
펼치기 | ||
---|---|---|
|
스크립트 수정
코드 블럭 | ||||
---|---|---|---|---|
| ||||
nls_language="AMERICAN" # 변경
audit_trail=none # 변경
# db_create_online_log_dest_1="/oradata" # 추가
# db_create_online_log_dest_2="/FRA" #추가 |
펼치기 | ||
---|---|---|
|
코드 블럭 | ||||
---|---|---|---|---|
| ||||
#@/home/oracle/dbca_scripts/context.sql
#@/home/oracle/dbca_scripts/ordinst.sql
#@/home/oracle/dbca_scripts/interMedia.sql
#@/home/oracle/dbca_scripts/cwmlite.sql
#@/home/oracle/dbca_scripts/spatial.sql |
펼치기 | ||
---|---|---|
|
코드 블럭 | ||||
---|---|---|---|---|
| ||||
DATAFILE '/oradata/ORCL19C/system01.dbf' SIZE 1000M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL -- 파일 크기 수정
SYSAUX DATAFILE '/oradata/ORCL19C/sysaux01.dbf' SIZE 1000M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED |
코드 블럭 | ||||
---|---|---|---|---|
| ||||
#@/home/oracle/dbca_scripts/JServer.sql
#@/home/oracle/dbca_scripts/context.sql
#@/home/oracle/dbca_scripts/ordinst.sql
#@/home/oracle/dbca_scripts/interMedia.sql
#@/home/oracle/dbca_scripts/cwmlite.sql
#@/home/oracle/dbca_scripts/spatial.sql |
서식 미적용 |
---|
set verify off
ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE
ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE
host /u01/app/oracle/product/19c/db_1/bin/srvctl add database -d racdb -pwfile +DATA/RACDB/orapwracdb -o /u01/app/oracle/product/19c/db_1 -n racdb -a "DATA,FRA"
host /u01/app/oracle/product/19c/db_1/bin/srvctl add instance -d racdb -i racdb1 -n rac1
host /u01/app/oracle/product/19c/db_1/bin/srvctl add instance -d racdb -i racdb2 -n rac2
host /u01/app/oracle/product/19c/db_1/bin/srvctl disable database -d racdb
host /u01/app/oracle/product/19c/db_1/bin/orapwd file=+DATA/RACDB/orapwracdb force=y format=12 dbuniquename=racdb
host /u01/app/19c/grid/bin/setasmgidwrap o=/u01/app/oracle/product/19c/db_1/bin/oracle
@/home/oracle/dbca_scripts/CreateDB.sql
@/home/oracle/dbca_scripts/CreateDBFiles.sql
@/home/oracle/dbca_scripts/CreateDBCatalog.sql
#@/home/oracle/dbca_scripts/JServer.sql
#@/home/oracle/dbca_scripts/context.sql
#@/home/oracle/dbca_scripts/ordinst.sql
#@/home/oracle/dbca_scripts/interMedia.sql
#@/home/oracle/dbca_scripts/cwmlite.sql
#@/home/oracle/dbca_scripts/spatial.sql
@/home/oracle/dbca_scripts/CreateClustDBViews.sql
@/home/oracle/dbca_scripts/lockAccount.sql
@/home/oracle/dbca_scripts/postDBCreation.sql |
DB 생성
스크립트 실행
코드 블럭 | ||||
---|---|---|---|---|
| ||||
./<인스턴스 명>.sh |
펼치기 | |||
---|---|---|---|
2번 노드 먼저 수행 : dump 파일 경로와 파라미터 파일 생성
1번 노드 마지막 수행 : dump 파일 경로와 파라미터 파일 생성 후 database 생성 서식 미적용 | VALID
CATPROC-- 파일 크기VALID 수정RAC SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/oradata/ORCL19C/temp01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED -- 파일VALID JAVAVM 크기 수정 SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/oradata/ORCL19C/undotbs01.dbf' SIZE 1000M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED -- 파일 크기VALID 수정XML LOGFILE GROUP 1 ('/oradata/ORCL19C/online/redo01.log','/FRA/ORCL19C/online/redo01.log') SIZE 200M,VALID CATJAVA VALID
XDB-- Redo 로그 이중화 추가 GROUP 2 ('/oradata/ORCL19C/online/redo02.log','/FRA/ORCL19C/online/redo02.log') SIZE 200M,VALID OWM VALID
8 rows selected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> host /u01/app/oracle/product/19c/db_1/bin/srvctl enable database -d racdb;
SQL> host /u01/app/oracle/product/19c/db_1/bin/srvctl start database -d racdb;
SQL> connect "SYS"/"&&sysPassword" as SYSDBA
Connected.
SQL> spool off
SQL> exit;
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.5.0.0.0 -- Redo 로그 이중화 추가
GROUP 3 ('/oradata/ORCL19C/online/redo03.log','/FRA/ORCL19C/online/redo03.log') SIZE 200M -- Redo 로그 이중화 추가 |
펼치기 | ||
---|---|---|
|
DB 생성
스크립트 실행
코드 블럭 | ||||
---|---|---|---|---|
| ||||
~/dbca_scripts/<인스턴스명>.sh |
펼치기 | ||
---|---|---|
dump 파일 경로와 파라미터 파일 생성 후 database 생성
|
결과 확인
코드 블럭 |
---|
crsctl stat res -t |
펼치기 | ||
---|---|---|
|