Oracle
Oracle 19c 無法創建主密鑰
我無法在 oracle 19c 中創建主密鑰…我在 sqlnet.ora 中將參數設置為:
WALLET_LOCATION= (SOURCE= (METHOD=file) (METHOD_DATA= (DIRECTORY=/opt/oracle/product/19c/db_home/admin/ALF/wallet/tde)))
還要設置參數 TDE_CONFIGURATION:
ALTER SYSTEM SET TDE_CONFIGURATION="KEYSTORE_CONFIGURATION=FILE" scope=both;
在我重新啟動 oracle 並執行以下命令後:
alter session set container=CDB$ROOT;
administer key management create keystore identified by "mypassword";
administer key management set keystore OPEN identified by "mypassword";
並嘗試創建主密鑰:
ADMINISTER KEY MANAGEMENT SET KEY USING TAG 'master key' IDENTIFIED BY "mypassword" WITH BACKUP USING 'masterbackup';
而且我總是收到以下錯誤:
ERROR at line 1: ORA-28362: master key not found
你知道,我如何解決這個問題嗎?雖然,我按照指令執行了命令……謝謝。
那麼你遵循了什麼指示?
以下是您的命令範例,我根本沒有使用
sqlnet.ora
,因為它在 19c 中是可選的:SQL> !mkdir /u01/app/oracle/admin/MIN19_O71/wallet SQL> alter system set wallet_root='/u01/app/oracle/admin/MIN19_O71/wallet' scope=spfile; System altered. SQL> startup force ORACLE instance started. Total System Global Area 1073737800 bytes Fixed Size 8904776 bytes Variable Size 297795584 bytes Database Buffers 759169024 bytes Redo Buffers 7868416 bytes Database mounted. Database opened. SQL> alter system set tde_configuration="keystore_configuration=file" scope=both; System altered. SQL> administer key management create keystore identified by "mypassword"; keystore altered. SQL> administer key management set keystore OPEN identified by "mypassword"; keystore altered. SQL> !ls -l /u01/app/oracle/admin/MIN19_O71/wallet total 0 drwxr-x---. 2 oracle oinstall 25 Dec 30 16:01 tde SQL> !ls -l /u01/app/oracle/admin/MIN19_O71/wallet/tde total 4 -rw-------. 1 oracle oinstall 2555 Dec 30 16:01 ewallet.p12 SQL> administer key management set key using tag 'master key' identified by "mypassword" with backup using 'masterbackup'; keystore altered. SQL> !ls -l /u01/app/oracle/admin/MIN19_O71/wallet/tde total 12 -rw-------. 1 oracle oinstall 2555 Dec 30 16:02 ewallet_2019123015024590_masterbackup.p12 -rw-------. 1 oracle oinstall 4171 Dec 30 16:02 ewallet.p12 SQL>