TDE tablespace encryption functionality สามารถใช้เพื่อ encrypt tablespace ที่เก็บข้อมูลทั้งหมดจาก EBS application เนื่องจาก TDE transparent ต่อ application การเขียน code ใหม่จึงไม่จำเป็น ผู้ใช้ที่ได้รับอนุญาตสามารถเข้าถึง encrypted data ได้โดยไม่มีปัญหา
บทนำ
ผู้ใช้ที่ได้รับอนุญาตสามารถเข้าถึง encrypted data ได้โดยไม่มีปัญหา TDE ใช้กับ data-at-rest เช่น datafiles และ backup files
วัตถุประสงค์
TDE tablespace encryption option ช่วยให้คุณ secure ข้อมูลที่ละเอียดอ่อนทั้งหมดที่เก็บใน EBS database เฉพาะ authorized users เท่านั้นที่สามารถเข้าถึง encrypted data ได้
ข้อจำกัด
SYSTEM และ SYSAUX ไม่สามารถ encrypt ได้ เนื่องจากถูกสร้างขึ้นในขณะสร้าง DB ไม่ใช่ระหว่าง tablespace creation Encryption option ถูก append ระหว่าง tablespace creation Undo และ TEMP tablespace ก็ไม่สามารถ encrypt ได้ แต่ data ที่เก็บจาก encrypted tablespace ใน TEMP/UNDO จะถูก encrypt
Implementation Steps (ขั้นตอนการดำเนินการ)
1. Verify Software Versions (ตรวจสอบเวอร์ชันซอฟต์แวร์)
- Patch 16207672 - 12.2.2
- Patch 20745242 - R12.AD.C.Delta.7
- Patch 20784380 - R12.TXK.C.Delta.7
- Patch 19597008
- Patch 20251314 (included in 12.2.5)
- Patch 8796558
- Patch 19343134
2. Prepare 12.1.0 DB Home
- ติดตั้ง 12.1.0 software
- ติดตั้ง Oracle Database 12c Products จาก 12c Examples CD (mandatory)
- Apply additional 12.1.0.2 RDBMS patches
3. Apply Latest Required DB ETCC/PSU Patches
4. Create nls/data/9idata Directory
perl $ORACLE_HOME/nls/data/old/cr9idata.pl
5. Apply Patch 16541956 บน Applications Consolidated ใช้ Export/Import Utility Patch บน Source Administration Server Node
สร้าง working directory
mkdir /u01/expimp << /u01/oracle/patches/12c_db/backup/expimp/3rditeration
7. Generate Target Database Instance Creation Script aucrdb.sql
Export/import patch 提供 auclondb.sql script ซึ่งสร้าง aucrdb.sql script คัดลอก $AU_TOP/patch/115/sql/auclondb.sql script จาก app node ไป DB node source และ execute ดังด้านล่าง
$ sqlplus system/[system password] \ @$AU_TOP/patch/115/sql/auclondb.sql 12
8. Record Advanced Queue Settings
คัดลอก script auque1.sql จาก $AU_TOP/patch/115/sql จาก app node ไป DB node และ execute คำสั่งต่อไปนี้สร้าง auque2.sql
$ sqlplus /nolog
SQL> connect / as sysdba;
SQL> @auque1.sql
9. Remove Rebuild Index Parameter ใน Spatial Indexes
select * from dba_indexes where index_type='DOMAIN' and upper(parameters) like '%REBUILD%';
10. Synchronize Text Indexes
$ sqlplus '/ as sysdba' SQL> select pnd_index_owner,pnd_index_name,count(*) from ctxsys.ctx_pending group by pnd_index_owner,pnd_index_name;
ใช้คำสั่งด้านล่างหากมี row คืนมาจาก query ข้างต้น
exec ctx_ddl.sync_index('[index owner].[index name]');
11. Create Export Parameter File
คัดลอก $AU_TOP/patch/115/import/auexpdp.dat จาก App node และแก้ไขตาม requirement
diff auexpdp.dat auexpdp.dat.orig « /u01/oracle/patches/12c_db/backup/expimp 8c8 < filesize=5368709120
filesize=104857600012,13d11< PARALLEL=5< EXCLUDE=STATISTICS
สร้าง directory ตามที่จำเป็น
SQL> create or replace directory dmpdir as '/u01/oracle/patches/12c_db/backup/expimp/2nditeration';
Directory created.
12. Ensure No Patching Cycle Is Active
Node Name Node Type Phase Status Started Finished Elapsed
Appnode master PREPARE COMPLETED
2017/05/20 23:01:31 2017/||05/20 23:24:45 0:23:14 APPLY COMPLETED
2017/05/20 23:53:09 2017/05/20 23:53:39 0:00:30 FINALIZE COMPLETED 2017/05/20 23:55:55 2017/05/20 23:56:14 0:00:19 CUTOVER COMPLETED 2017/05/20 23:58:57 2017/05/21 00:09:50 0:10:53 CLEANUP COMPLETED 2017/05/21 01:59:13 2017/05/21 01:59:44 0:00:31
13. Shut Down Application Server Processes
14. Grant Privilege ให้ Source System Schema ใช้คำสั่งต่อไปนี้
SQL> grant EXEMPT ACCESS POLICY to system;
Grant succeeded.
15. Remove MGDSYS Schema (Conditional) ใช้คำสั่งต่อไปนี้
$ sqlplus "/ as sysdba" @?/md/admin/catnomgdidcode.sql
16. Export OLAP Analytical Workspaces (Optional) รันคำสั่งต่อไปนี้
SQL> col owner format a15
SQL> col aw_name format a15
SQL> select OWNER, AW_NAME ,PAGESPACES from dba_aws where owner != 'SYS' order by 1,2;
OWNER AW_NAME PAGESPACES
>APPS ODPCODE 1123
APPS XWDEVKIT 1106 APPS XWDEVKIT_BACKUP 1106 FPA FPAPJP 505
- SQL> create or replace directory AW_DIR as
'/u01/oracle/patches/12c_db/backup/MGR_DIR';
Directory Created
2a. SQL> exec dbms_aw.execute('aw attach APPS.ODPCODE rw');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('allstat');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('export all to eif file ''AW_DIR/ODPCODE.eif''');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw detach APPS.ODPCODE');
PL/SQL procedure successfully completed.
2b. SQL> exec dbms_aw.execute('aw attach APPS.XWDEVKIT rw');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('allstat');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('export all to eif file ''AW_DIR/XWDEVKIT.eif''');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw detach APPS.XWDEVKIT');
PL/SQL procedure successfully completed.
2c. SQL> exec dbms_aw.execute('aw attach APPS.XWDEVKIT_BACKUP rw');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('allstat');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('export all to eif file ''AW_DIR/XWDEVKIT_BACKUP.eif''');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw detach APPS.XWDEVKIT_BACKUP');
PL/SQL procedure successfully completed.
2d. SQL> exec dbms_aw.execute('aw attach FPA.FPAPJP rw');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('allstat');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('export all to eif file ''AW_DIR/FPAPJP.eif''');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw detach FPA.FPAPJP');
PL/SQL procedure successfully completed.
- Delete แต่ละ AW ที่ exported ในขั้นตอน #2 โดยใช้ SQL command:
SQL> exec dbms_aw.execute('aw delete APPS.ODPCODE');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw delete APPS.XWDEVKIT');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw delete APPS.XWDEVKIT_BACKUP');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw delete FPA.FPAPJP');
PL/SQL procedure successfully completed.
- Remove OLAP จาก 32bit database และ cleanup INVALID OLAP related objects ด้วยคำสั่งต่อไปนี้:
cd $ORACLE_HOME/olap/admin --->>> required to locate all embedded calls to other scripts conn / as sysdba
@?/olap/admin/catnoamd.sql
@?/olap/admin/olapidrp.plb
@?/olap/admin/catnoaps.sql
@?/olap/admin/catnoxoq.sql
@?/rdbms/admin/utlrp.sql
select owner, object_name, object_type from dba_objects where status <> 'VALID';
SQL> select owner, object_name, object_type,status from dba_objects where status <> 'VALID' and object_name like '%OLAP%'; SYS OLAPIBOOTSTRAP FUNCTION INVALID
SYS OLAPIHANDSHAKE FUNCTION INVALID
PUBLIC OLAPIBOOTSTRAP SYNONYM INVALID
PUBLIC OLAPIHANDSHAKE SYNONYM INVALID
APPS PA_OLAP_PVT PACKAGE BODY INVALID
SQL> drop FUNCTION sys.OLAPIBOOTSTRAP;
Function dropped.
SQL> drop FUNCTION sys.OLAPIHANDSHAKE;
Function dropped.
SQL> drop PUBLIC SYNONYM OLAPIBOOTSTRAP;
Synonym dropped.
SQL> drop PUBLIC SYNONYM OLAPIHANDSHAKE;
Synonym dropped.
SQL> drop package body apps.PA_OLAP_PVT;
Package body dropped.
SQL> select owner, object_name, object_type,status from dba_objects where status <> 'VALID' and object_name like '%OLAP%'; no rows selected
Execute the following steps on target 12c 64 bit database where are you are performing the upgrade.
Install the 64bit version of Oracle, include the Oracle OLAP option, and migrate the database to 64 bits.
Add OLAP back into the database by connecting to the database '/ as sysdba' and executing:
SQL> spool olap_install.log
SQL> set echo on
SQL> show user
SQL> @?/olap/admin/olap.sql SYSAUX TEMP;
SQL> spool off
ใช้คำสั่ง SQL ต่อไปนี้เพื่อ import แต่ละ exported AWs
NOTE: All quotes are single quotes และตรวจสอบให้แน่ใจว่าคุณใช้ right combination ของ EIF file และ OWNER.AW_NAME
SQL> create or replace directory AW_DIR as '/u01/oracle/patches/12c_db/backup/MGR_DIR';
Directory created.
SQL> exec dbms_aw.execute('aw create APPS.ODPCODE');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('import all from eif file ''AW_DIR/ODPCODE.eif'' data dfns');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('update');
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> exec dbms_aw.execute('aw detach APPS.ODPCODE');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw create APPS.XWDEVKIT');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('import all from eif file ''AW_DIR/XWDEVKIT.eif'' data dfns');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('update');
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> exec dbms_aw.execute('aw detach APPS.XWDEVKIT');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw create APPS.XWDEVKIT_BACKUP');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('import all from eif file ''AW_DIR/XWDEVKIT_BACKUP.eif'' data dfns');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('update');
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> exec dbms_aw.execute('aw detach APPS.XWDEVKIT_BACKUP');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('aw create FPA.FPAPJP');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('import all from eif file ''AW_DIR/FPAPJP.eif'' data dfns');
PL/SQL procedure successfully completed.
SQL> exec dbms_aw.execute('update');
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> exec dbms_aw.execute('aw detach FPA.FPAPJP');
PL/SQL procedure successfully completed.
17. Drop XLA Packages (Optional)
$ sqlplus apps/[APPS password] SQL> select distinct('drop package '||db.owner||'.'|| db.object_name || ';') from dba_objects db, xla_subledgers xl where db.object_type='PACKAGE BODY' and db. object_name like 'XLA%AAD%PKG' and substr(db.object_name,1,9) = 'XLA_'|| LPAD (SUBSTR(TO_CHAR(ABS(xl.application_id)), 1, 5), 5, '0') and db.object_name NOT IN ('XLA_AAD_HDR_ACCT_ATTRS_F_PKG','XLA_AMB_AAD_PKG') order by 1; SQL> @drop_xla_package.sql
18. Export the Applications Database Instance
$ expdp "/ as sysdba" parfile=[export parameter file name]
19. Revoke Privilege จาก Source System Schema
SQL> revoke EXEMPT ACCESS POLICY from system;
20. Enable Oracle Advanced Security TDE Tablespace Encryption (Using Oracle wallet method)
เพิ่ม entry นี้ใน sqlnet_ifile.ora ใน $ORACLE_HOME/network/admin/<SID>_<HOST>:
Keep it in single line to avoid format issue
ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD = FILE)(METHOD_DATA=(DIRECTORY= /u01/oracle/dbhome1/12.1.0.2/wallet)))
21. Create Target Initialization Parameter File / Working Directory
22. Modify aucrdb.sql Script ตาม Actual Location ของ Target Database Datafiles
Append ต่อไปนี้ไปยังแต่ละคำสั่ง 'CREATE TABLESPACE' ใน aucrdb.sql:
ENCRYPTION [USING '<enc. algorithm>;'] DEFAULT STORAGE (ENCRYPT) ตัวเลือกที่เป็นไปได้คือ: 3DES168, AES128 (default หากไม่ระบุ), AES192, และ AES256)
23. Finally Split Edited Copy ของ aucrdb.sql เป็นสอง .sql files แยกกัน ไฟล์แรกจะมี CREATE DATABASE statement และไฟล์ที่สองจะมี CREATE TABLESPACE statements
24. Create Target Database Instance
$ sqlplus /nolog SQL> connect / as sysdba; SQL> spool aucrdb1.log; For UNIX or Linux: SQL> startup nomount; SQL> @aucrdb1.sql SQL> spool off
25. After DB Is Created คุณต้องสร้าง Encryption Key ก่อนสร้าง Tablespace
สำหรับ encrypted tablespaces และ encryption key management based on Oracle Wallet:
SQL alter system set encryption key identified by "<Strong_Password > >";
26. Create Encrypted Tablespace ใช้ Script ต่อไปนี้
SQL> spool aucrdb2.log SQL> @aucrdb2.sql << Make sure this include encryption syntex SQL> exit;
27. When Target Database Instance Created Restart Database Instance
Shutdown immediate cp -pR wallet wallet.orig.date orapki wallet create -wallet /u01/oracle/dbhome1/12.1.0.2/wallet -auto_login
Make wallet autologin
startup mount หากใช้ Oracle Wallet:
Below is required in case of manual wallet SQL> alter system set encryption wallet open identified by "<strong_password>"; alter database open;
select * from v$encryption_wallet;
28. Copy All Database Preparation Scripts ไป Target Oracle Home เพื่อ Setup Sys/System Schemas
29. Set Up SYS Schema
$ sqlplus "/ as sysdba" @audb1210.sql
30. Set Up SYSTEM Schema
$ sqlplus system/[system password] @ausy1210.sql
31. Install Java Virtual Machine
$ sqlplus system/[system password] @aujv1210.sql
32. Install Other Required Components
sqlplus system/**** @aumsc1210.sql SYSAUX TEMP
33. Perform Patch Post-Install Instructions
SQL> conn /as sysdba Connected to an idle instance. SQL> startup upgrade cd $ORACLE_HOME/OPatch [oracle@dbnode OPatch]$ ./datapatch –verbose SQL> shut immediate SQL> startup SQL> @?/rdbms/admin/utlrp.sql
34. Set CTXSYS Parameter (Conditional)
$ sqlplus "/ as sysdba" SQL> exec ctxsys.ctx_adm.set_parameter('file_access_role', 'public');
35. Disable Automatic Gathering of Statistics
$ sqlplus "/ as sysdba" SQL> alter system enable restricted session; SQL> @adstats.sql $ sqlplus "/ as sysdba" SQL> alter system disable restricted session; SQL> exit;
36. Back Up Target Database Instance (Optional)
37. Create Import Parameter Files
SQL> show user USER is "SYSTEM" SQL> create or replace directory dmpdir as '/u01/oracle/patches/12c_db/backup/expimp';
Directory created.
คัดลอก dump files จาก source ไป target server หาก servers ต่างกัน
38. Import the Applications Database Instance
$ impdp "/ as sysdba" parfile=auimpdp.dat
39. Import OLAP Analytical Workspaces (Conditional)
Steps related to target (12c) needs to be performed here
40. Revoke Privilege จาก Target System Schema
SQL> revoke EXEMPT ACCESS POLICY from system;
41. Reset Advanced Queues
$ sqlplus /nolog SQL> connect / as sysdba; SQL> @auque2.sql
42. Run adgrants.sql
$ sqlplus "/ as sysdba" @adgrants.sql APPS
43. Grant Create Procedure Privilege บน CTXSYS
$ sqlplus apps/[APPS password] @adctxprv.sql \ [SYSTEM password] CTXSYS
44. Start New Database Listener (Conditional)
45. Deregister Current Database Server
$ sqlplus apps/[APPS password] SQL> exec fnd_conc_clone.setup_clean;
46. Implement และ Run AutoConfig
perl $AD_TOP/bin/admkappsutil.pl
Copy appsutil.zip to $ORACLE_HOME/ on DB node.
unzip -o appsutil.zip
Build $CONTEXT_FILE
perl adbldxml.pl
./adconfig.sh
Restart DB/Listener - Source new env file
Run autoconfig on App node run fs
./adconfig.sh
Run autoconfig on App node patch fs
./adconfig.pl contextfile=$CONTEXT_FILE run=INSTE8
47. Gather Statistics for SYS Schema
$ sqlplus "/ as sysdba" SQL> alter system enable restricted session; SQL> @adstats.sql $ sqlplus "/ as sysdba" SQL> alter system disable restricted session; SQL> exit;
48. Recreate Custom Database Links (Conditional)
49. Create ConText Objects
คุณต้องเรียก scripts โดยใช้ driver file เพื่อสร้าง objects นี้ รันคำสั่งต่อไปนี้:
$ perl $AU_TOP/patch/115/bin/dpost_imp.pl [driver file] [source database version] adop phase=apply hotpatch=yes
50. Populate CTXSYS.DR$SQE Table
$ sqlplus apps/[apps password] SQL> exec icx_cat_sqe_pvt.sync_sqes_for_all_zones;
51. Compile Invalid Objects
52. Recreate XLA Packages (Conditional)
หากคุณ dropped XLA packages ใน source environment คัดลอก $XLA_TOP/patch/115/sql/xla6128278.sql จาก source ไป target และรันดังด้านล่าง
$ sqlplus apps/[APPS password] SQL> @xla6128278.sql [spool log file]
53. Run AutoConfig บน Run APPL_TOP
==>echo $FILE_EDITION run ==>./adconfig.sh
54. Apply Post-Upgrade WMS Patches (Conditional)
หากคุณอัปเกรดจาก RDBMS version ก่อน 12c ให้ apply Patch 19007053 adop phase=apply patches=19007053 patchtop=/home/applmgr/exp_patch apply_mode=downtime workers=12
55. Maintain Application Database Objects
a. Compile flexfield data in AOL tables b. Recreate grants และ synonyms สำหรับ APPS schema
56. Start Applications Server Processes
57. Create DQM Indexes
a. ล็อกอิน Oracle Applications ด้วย responsibility "Trading Community Manager"
b. คลิก Control > Request > Run
c. เลือก "Single Request" option
d. ใส่ "DQM Staging Program" name
e. ใส่พารามิเตอร์ต่อไปนี้:
i. Number of Parallel Staging Workers: 4 ii. Staging Command: CREATE_INDEXES iii. Continue Previous Execution: NO iv. Index Creation: SERIAL f. คลิก "Submit"
สรุป
โดยการทำตามขั้นตอนทั้งหมดข้างต้น เรากำลังดำเนินการ 12C database upgrade พร้อมกับการเปิดใช้งาน Tablespace level Encryption
ใช้แท็บ Feedback เพื่อแสดงความคิดเห็นหรือถามคำถาม คุณยังสามารถเริ่มการสนทนากับเราได้