Advertisement
ExaGridDba

12.1 non-cdb TDE change the keystore password

Nov 15th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. [oracle@stormking DB12102 admin]$ oh
  2. [oracle@stormking DB12102 dbhome_1]$ cd network/admin/
  3. [oracle@stormking DB12102 admin]$ pwd
  4. /u01/app/oracle/product/12.1.0/dbhome_1/network/admin
  5. [oracle@stormking DB12102 admin]$ cat sqlnet.ora
  6.  
  7. encryption_wallet_location =
  8. (source =
  9. (method = file)
  10. (method_data =
  11. (directory = /u01/app/oracle/wallet/$ORACLE_SID/wallet)))
  12. [oracle@stormking DB12102 admin]$ mkdir -p /u01/app/oracle/wallet/$ORACLE_SID/wallet
  13.  
  14. [oracle@stormking DB12102 admin]$ sysdba
  15.  
  16. SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 15 09:36:36 2017
  17.  
  18. Copyright (c) 1982, 2014, Oracle. All rights reserved.
  19.  
  20.  
  21. Connected to:
  22. Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
  23. With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
  24. and Real Application Testing options
  25.  
  26. SQL> administer key management create keystore '/u01/app/oracle/wallet/DB12102/wallet' identified by kspw;
  27.  
  28.  
  29. keystore altered.
  30.  
  31. SQL> SQL>
  32. SQL> administer key management set keystore open identified by kspw;
  33.  
  34. keystore altered.
  35.  
  36. SQL> administer key management set key identified by kspw with backup;
  37.  
  38. keystore altered.
  39.  
  40. SQL> create tablespace ts encryption using 'aes256' default storage ( encrypt );
  41.  
  42. Tablespace created.
  43.  
  44. SQL> create table tcr ( a varchar2(30)) tablespace ts;
  45.  
  46. Table created.
  47.  
  48. SQL> insert into tcr ( a ) values ( rpad( 'A', 30, 'A' ));
  49.  
  50. 1 row created.
  51.  
  52. SQL> commit;
  53.  
  54. Commit complete.
  55.  
  56.  
  57. SQL> set linesize 200;
  58. SQL> select rowid, a from tcr;
  59.  
  60. ROWID A
  61. ------------------ ------------------------------------------------------------------------------------------
  62. AAAFGoAAAAAAAMOAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  63.  
  64.  
  65. SQL> administer key management alter keystore password identified by kspw set npw with backup;
  66.  
  67. keystore altered.
  68.  
  69. SQL> startup force
  70. ORACLE instance started.
  71.  
  72. Total System Global Area 3221225472 bytes
  73. Fixed Size 2929552 bytes
  74. Variable Size 603982960 bytes
  75. Database Buffers 1526726656 bytes
  76. Redo Buffers 13844480 bytes
  77. In-Memory Area 1073741824 bytes
  78. Database mounted.
  79. ORA-28365: wallet is not open
  80.  
  81.  
  82. SQL> administer key management set keystore open identified by npw;
  83.  
  84. keystore altered.
  85.  
  86. SQL> alter database open;
  87.  
  88. Database altered.
  89.  
  90. SQL> select rowid, a from tcr;
  91.  
  92. ROWID A
  93. ------------------ ------------------------------------------------------------------------------------------
  94. AAAFGoAAAAAAAMOAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement