안녕하세요, Surmin입니다.
오늘은 Oracle Database Standard Edition 2(SE2)에서 Enterprise Edition(EE)으로 변경하는 방법에 대해 이야기해보려 합니다.
관련 작업을 진행하실 때 참고가 되기를 바랍니다.
환경
- Linux 8 / Oracle19c
Test
※ 12c 이상의 버전부터는 catalog.sql과 catproc.sql 두 스크립트를 수행할 필요가 없습니다.
#GUI 방법
샘플 데이터 생성 합니다.
CREATE TABLESPACE example
DATAFILE '/app/oracle/oradata/ORA19C/new_tbs01.dbf' SIZE 10M
AUTOEXTEND ON NEXT 2M MAXSIZE 200M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M
SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLE new (id NUMBER, day TIMESTAMP) TABLESPACE example;
INSERT INTO new (id, day) VALUES (1, SYSTIMESTAMP);
commit;
SQL> select * from new;
ID
----------
DAY
---------------------------------------------------------------------------
1
19-MAY-25 11.23.05.883177 AM
1) Oracle Standard Edition 서버 소프트웨어의 릴리스 번호가 Oracle Enterprise Edition 서버 소프트웨어와 동일한지 확인
SQL> select * from v$version;
|-----------------------|--------------------------------------------------------------------|
| BANNER | Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production |
| BANNER_FULL | Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.26.0.0.0
| BANNER_LEGACY | Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production |
| CON_ID | 0 |
2)DB 종료
b. 만약 윈도우 os 라면 OracleServiceSID / Oracle / Service 를 포함한 모든 오라클 서비스를 중지 시켜야 합니다.
SQL> shutdown immediate;
- 운영 체제가 Windows인 경우 OracleServiceSID Oracle 서비스를 포함한 모든 Oracle 서비스를 중지하십시오. 여기서 SID는 인스턴스 이름입니다.
- 현재 Oracle 홈에 있는 모든 데이터베이스 파일을 백업하십시오.
- oraInventory ,oracle 두 디렉토리만 백업하면 따로 tar 할필요 없음
#아래는 예시
##데이터베이스 파일을 모두 백업 합니다.
a. oracle file Backup : /oracle [/product, /oraInventory]
tar cvfp oracle_se.tar /oracle/app
tar cvfp oracle_inventory.tar /oracle/oraInventory
b. data file Backup : /oradata
tar cvfp oracle_data.tar /oradata/TESTDB01
tar cvfp oracle_arch.tar /oradata/arch (추가)
c. admin & audit Backup : $ORACLE_BASE/admin
tar cvfp oracle_base.tar $ORACLE_BASE/admin
d. dbs Backup : [linux] $ORACLE_HOME/dbs or [window] $ORACLE_HOME/database
tar cvfp oracle_dbs.tar $ORACLE_HOME/dbs
tar cvfp oracle_network.tar $ORACLE_HOME/network/admin
tar cvfp oracle_audit.tar $ORACLE_BASE/audit
#Configuration Tools Logs의 줄임말로, Oracle 구성 도구들이 실행될 때 생성하는 로그 파일들을 저장하는 디렉토리
tar cvfp oracle_cfgtoollogs.tar $ORACLE_BASE/cfgtoollogs
###만약을 위하여 백업함 특히 oratab 은 필요함
#Oracle 인스턴스 목록을 관리하는 파일
cp -av /etc/oratab /etc/oratab_backup
#Oracle Inventory 위치 정보를 담고 있는 파일
cp -av /etc/oraInst.loc /etc/oraInst.loc_backup
#Oracle Fast File Mapping library
cp -av /opt/ORCLfmap /opt/ORCLfmap_backup
5)제거
[oracle@ORA19C deinstall]$ ./deinstall
######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##
Checking for existence of the Oracle home location /app/oracle/product/19c
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /app/oracle
Checking for existence of central inventory location /app/oraInventory
## [END] Install check configuration ##
Network Configuration check config START
Network de-configuration trace file location: /tmp/deinstall2025-05-19_01-31-37PM/logs/netdc_check2025-05-19_01-31-51PM.log
Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]: (엔터누름)
Network Configuration check config END
Database Check Configuration START
Database de-configuration trace file location: /tmp/deinstall2025-05-19_01-31-37PM/logs/databasedc_check2025-05-19_01-31-51PM.log
Use comma as separator when specifying list of values as input
#해당 인스턴스 맞는지
Specify the list of database names that are configured in this Oracle home [ORA19C]:(엔터누름)
###### For Database 'ORA19C' ######
Single Instance Database
The diagnostic destination location of the database: /app/oracle/diag/rdbms/ora19c
Storage type used by the Database: FS
Database file location: /app/oracle/oradata/ORA19C
Fast recovery area location: Does not exist
database spfile location: /app/oracle/product/19c/dbs/spfileORA19C.ora
The details of database(s) ORA19C have been discovered automatically. Do you still want to modify the details of ORA19C database(s)? [n]:(엔터누름)
######################### DECONFIG CHECK OPERATION END #########################
####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /app/oracle/product/19c
Inventory Location where the Oracle home registered is: /app/oraInventory
Following Single Instance listener(s) will be de-configured: LISTENER
The following databases were selected for de-configuration. The databases will be deleted and will not be useful upon de-configuration : ORA19C
Database unique name : ORA19C
Storage used : FS #완전 삭제위하여 y
Do you want to continue (y - yes, n - no)? [n]: y
..
####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/app/oracle/product/19c' from the central inventory on the local node.
Successfully deleted directory '/app/oracle/product/19c' on the local node.
Successfully deleted directory '/app/oraInventory' on the local node.
Successfully deleted directory '/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.
Run 'rm -r /etc/oraInst.loc' as root on node(s) 'ORA19C' at the end of the session.
Run 'rm -r /opt/ORCLfmap' as root on node(s) 'ORA19C' at the end of the session.
Run 'rm -r /etc/oratab' as root on node(s) 'ORA19C' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################
..
#root에서 디렉터러 삭제수행
[root@ORA19C ~]# rm -rf /etc/oraInst.loc
[root@ORA19C ~]# rm -rf /opt/ORCLfmap
[root@ORA19C ~]# rm -rf /etc/oratab
신규 EE 를 Install 합니다 하기전에 패치 먼저 합니다. (기존 환경과 동일한 경로로 Oracle 설치 수행)
- OPatch 교체 후 진행
- unzip p37260974_190000_Linux-x86-64.zip (패치)
unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME
cd $ORACLE_HOME
#패치적용 수행
./runInstaller -applyRU /tmp/test2/37260974
#설치 후 Version확인
[oracle@ORA19C 19c]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Mon May 19 14:56:28 2025
Version 19.26.0.0.0
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to an idle instance.
SQL>exit
network, dbs, admin 재사용 가능하도록 설정 합니다.
#backup위치
[oracle@ORA19C test]$ pwd && ls
/tmp/test
oracle_Inventory_se.tar oracle_base.tar oracle_data.tar oracle_dbs.tar oracle_se.tar
tar xvfp oracle_dbs.tar
tar xvfp oracle_network.tar
tar xvfp oracle_data.tar
#이동 시키며, 만약 용량이 부족하면 mv합니다.
cp -av network/admin/*.ora $ORACLE_HOME/network/admin
cp -av dbs/* $ORACLE_HOME/dbs
cp -av oradata $ORACLE_BASE/
cp -av audit $ORACLE_BASE/
cp -av cfgtoollogs $ORACLE_BASE/
#db올림
[oracle@ORA19C oracle]$ sqlplus / as sysdba
SQL> startup
#패치 버전확인
SQL> SET LINESIZE 120
SET PAGESIZE 50
COLUMN BANNER FORMAT A50
COLUMN BANNER_FULL FORMAT A60
COLUMN BANNER_LEGACY FORMAT A50
SELECT * FROM v$version;
BANNER BANNER_FULL
-------------------------------------------------- ------------------------------------------------------------
BANNER_LEGACY CON_ID
-------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19. Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 -
0.0.0.0 - Production Production
Version 19.26.0.0.0
Oracle Database 19c Enterprise Edition Release 19. 0
0.0.0.0 - Production
#데이터 확인
SQL> select * from new;
ID DAY
---------- ---------------------------------------------------------------------------
1 19-MAY-25 11.23.05.883177 AM
#EE기능 확인 , 80ea 전부 true
SQL> SELECT * FROM v$option WHERE value = 'TRUE';
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Partitioning
TRUE 0
Objects
TRUE 0
Advanced replication
TRUE 0
Bit-mapped indexes
TRUE 0
Connection multiplexing
TRUE 0
Connection pooling
TRUE 0
Database queuing
TRUE 0
Incremental backup and recovery
TRUE 0
Instead-of triggers
TRUE 0
Parallel backup and recovery
TRUE 0
Parallel execution
TRUE 0
Parallel load
TRUE 0
Point-in-time tablespace recovery
TRUE 0
Fine-grained access control
TRUE 0
Proxy authentication/authorization
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Change Data Capture
TRUE 0
Plan Stability
TRUE 0
Online Index Build
TRUE 0
Coalesce Index
TRUE 0
Managed Standby
TRUE 0
Materialized view rewrite
TRUE 0
Database resource manager
TRUE 0
Spatial
TRUE 0
Export transportable tablespaces
TRUE 0
Transparent Application Failover
TRUE 0
Fast-Start Fault Recovery
TRUE 0
Sample Scan
TRUE 0
Duplexed backups
TRUE 0
Java
TRUE 0
OLAP Window Functions
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Block Media Recovery
TRUE 0
Fine-grained Auditing
TRUE 0
Application Role
TRUE 0
Enterprise User Security
TRUE 0
Oracle Data Guard
TRUE 0
OLAP
TRUE 0
Basic Compression
TRUE 0
Join index
TRUE 0
Trial Recovery
TRUE 0
Advanced Analytics
TRUE 0
Online Redefinition
TRUE 0
Streams Capture
TRUE 0
File Mapping
TRUE 0
Block Change Tracking
TRUE 0
Flashback Table
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Flashback Database
TRUE 0
Transparent Data Encryption
TRUE 0
Backup Encryption
TRUE 0
Unused Block Compression
TRUE 0
Result Cache
TRUE 0
SQL Plan Management
TRUE 0
Auto SQL Plan Management
TRUE 0
SecureFiles Encryption
TRUE 0
Real Application Testing
TRUE 0
Flashback Data Archive
TRUE 0
DICOM
TRUE 0
Active Data Guard
TRUE 0
Server Flash Cache
TRUE 0
Advanced Compression
TRUE 0
XStream
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Deferred Segment Creation
TRUE 0
Exadata Discovery
TRUE 0
Data Mining
TRUE 0
Global Data Services
TRUE 0
Adaptive Execution Plans
TRUE 0
Table Clustering
TRUE 0
Zone Maps
TRUE 0
Real Application Security
TRUE 0
Privilege Analysis
TRUE 0
Data Redaction
TRUE 0
Cross Transportable Backups
TRUE 0
Cache Fusion Lock Accelerator
TRUE 0
Snapshot time recovery
TRUE 0
Heat Map
TRUE 0
Automatic Data Optimization
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Transparent Sensitive Data Protection
TRUE 0
In-Memory Column Store
TRUE 0
Advanced Index Compression
TRUE 0
In-Memory Aggregation
TRUE 0
Centrally Managed User
TRUE 0
80 rows selected.
#oratab작성
vi /etc/oratab
==
ORA19C:/app/oracle/product/19c:N
==
Silent 방법
#오라클 홈생성
mkdir -p /app/oracle/product/19c
#압축해제
unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME/
cd $ORACLE_HOME/install/response
#버전확인
[oracle@ORA19C 19c]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Mon May 19 19:24:56 2025
Version 19.26.0.0.0
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to an idle instance.
#백업한 tar푼다.
tar xvfp oracle_dbs.tar
#복사진행
cp -av network/admin/* $ORACLE_HOME/network/admin
cp -av dbs/* $ORACLE_HOME/dbs
cp -av oradata $ORACLE_BASE/
cp -av audit/* $ORACLE_BASE/audit/
cp -av cfgtoollogs $ORACLE_BASE/
#DB올린다.
#만약 audit 파일 없다고 하면 sp파일 보고 혹은 p파일 보고 만들어주고 올리면 된다.
==
SQL> startup
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
==
sqlplus / as sysdba
startup
#버전확인
SQL> SET LINESIZE 120
SET PAGESIZE 50
COLUMN BANNER FORMAT A50
COLUMN BANNER_FULL FORMAT A60
COLUMN BANNER_LEGACY FORMAT A50
SELECT * FROM v$version;
BANNER BANNER_FULL
-------------------------------------------------- ------------------------------------------------------------
BANNER_LEGACY CON_ID
-------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19. Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 -
0.0.0.0 - Production Production
Version 19.26.0.0.0
Oracle Database 19c Enterprise Edition Release 19. 0
0.0.0.0 - Production
#데이터 확인
SQL> select * from new;
ID DAY
---------- ---------------------------------------------------------------------------
1 19-MAY-25 04.35.12.043567 PM
#EE기능 확인 , 80ea 전부 true
SQL> SELECT * FROM v$option WHERE value = 'TRUE';
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Partitioning
TRUE 0
Objects
TRUE 0
Advanced replication
TRUE 0
Bit-mapped indexes
TRUE 0
Connection multiplexing
TRUE 0
Connection pooling
TRUE 0
Database queuing
TRUE 0
Incremental backup and recovery
TRUE 0
Instead-of triggers
TRUE 0
Parallel backup and recovery
TRUE 0
Parallel execution
TRUE 0
Parallel load
TRUE 0
Point-in-time tablespace recovery
TRUE 0
Fine-grained access control
TRUE 0
Proxy authentication/authorization
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Change Data Capture
TRUE 0
Plan Stability
TRUE 0
Online Index Build
TRUE 0
Coalesce Index
TRUE 0
Managed Standby
TRUE 0
Materialized view rewrite
TRUE 0
Database resource manager
TRUE 0
Spatial
TRUE 0
Export transportable tablespaces
TRUE 0
Transparent Application Failover
TRUE 0
Fast-Start Fault Recovery
TRUE 0
Sample Scan
TRUE 0
Duplexed backups
TRUE 0
Java
TRUE 0
OLAP Window Functions
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Block Media Recovery
TRUE 0
Fine-grained Auditing
TRUE 0
Application Role
TRUE 0
Enterprise User Security
TRUE 0
Oracle Data Guard
TRUE 0
OLAP
TRUE 0
Basic Compression
TRUE 0
Join index
TRUE 0
Trial Recovery
TRUE 0
Advanced Analytics
TRUE 0
Online Redefinition
TRUE 0
Streams Capture
TRUE 0
File Mapping
TRUE 0
Block Change Tracking
TRUE 0
Flashback Table
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Flashback Database
TRUE 0
Transparent Data Encryption
TRUE 0
Backup Encryption
TRUE 0
Unused Block Compression
TRUE 0
Result Cache
TRUE 0
SQL Plan Management
TRUE 0
Auto SQL Plan Management
TRUE 0
SecureFiles Encryption
TRUE 0
Real Application Testing
TRUE 0
Flashback Data Archive
TRUE 0
DICOM
TRUE 0
Active Data Guard
TRUE 0
Server Flash Cache
TRUE 0
Advanced Compression
TRUE 0
XStream
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Deferred Segment Creation
TRUE 0
Exadata Discovery
TRUE 0
Data Mining
TRUE 0
Global Data Services
TRUE 0
Adaptive Execution Plans
TRUE 0
Table Clustering
TRUE 0
Zone Maps
TRUE 0
Real Application Security
TRUE 0
Privilege Analysis
TRUE 0
Data Redaction
TRUE 0
Cross Transportable Backups
TRUE 0
Cache Fusion Lock Accelerator
TRUE 0
Snapshot time recovery
TRUE 0
Heat Map
TRUE 0
Automatic Data Optimization
TRUE 0
PARAMETER
----------------------------------------------------------------
VALUE CON_ID
---------------------------------------------------------------- ----------
Transparent Sensitive Data Protection
TRUE 0
In-Memory Column Store
TRUE 0
Advanced Index Compression
TRUE 0
In-Memory Aggregation
TRUE 0
Centrally Managed User
TRUE 0
80 rows selected.
#oratab작성
vi /etc/oratab
==
ORA19C:/app/oracle/product/19c:N
==
참조