TDE 迁移 合并 密码忘记 处理

这篇具有很好参考价值的文章主要介绍了TDE 迁移 合并 密码忘记 处理。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

How to Migrate TDE Oracle Wallets from File System to ASM ?
 

SOLUTION

Make sure to try this in Dev / Test environment to make sure it is working fine as expected.

Create a wallet in ASM location and then merge the local file system wallet content into the ASM new wallet and also update sqlnet.ora to point to ASM wallet location.

Below is the standard process to Migrate TDE Wallet from OS File System to ASM

1. Create new keystore in ASM by running:
ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '<ASM_location>' IDENTIFIED BY **** ;

2. Edit sqlnet.ora and set the ENCRYPTION_WALLET_LOCATION to point to ASM wallet.


3. Open the keystore.
SQL> administer key management set keystore open identified by *****;


4. Merge wallet contents:
ADMINISTER KEY MANAGEMENT MERGE KEYSTORE '<file_system_path>' IDENTIFIED BY <wallet_password> INTO EXISTING KEYSTORE '<ASM_location>' IDENTIFIED BY <wallet_password> WITH BACKUP;

Check the 12c documentation for more details.

https://docs.oracle.com/cloud/latest/db121/ASOAG/asotrans_mgr.htm#ASOAG10323

GOAL

How To copy the TDE Wallet From ASM to Local OS File.

SOLUTION

We will need to create a temporary keystore in any temporary location in the file-system and merge the keystore from the ASM to this file system.


Below is an example for that.

1) mkdir -p /tmp/TDEwallet/

2)  Create a NEW keystore somewhere on the filesystem.  Example:  
    SQL> administer key management create keystore '/tmp/TDEwallet/' identified by <password>;

3)  Merge the renamed ASM keystore into the filesystem keystore.  
Example:
    SQL>  administer key management merge keystore '+ASM_Wallet_Location' identified by "<Original Password>" into existing keystore '/tmp/TDEwallet/' identified by mywallet123 with backup;
    NOTE:  This requires that you know the password for the older ewallet file!

4)  cd /tmp/TDEwallet/

5)  ls -lrt  
   (This is to check and record the size of the file.)

6)  orapki wallet display -wallet /tmp/TDEwallet/
   (This will output the contents of the wallet.)
   NOTE:  This requires that you know the password for the password file.

CAUSE

looks like wallet files got corrupted and not able to view teh wallet content using orapki wallet display command
 
> orapki wallet display -wallet /oracle/P99/ewallet.p12 -pwd Sa*******
Oracle PKI Tool Release 19.0.0.0.0 - Production
Version 19.4.0.0.0
Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.

Got tag 10 instead of 16.
 

SOLUTION

+++++++++++++++

Take a valid backup of your wallet files ( ewallet.p12 and cwallet.sso)

create a temporary keystore in any temporary location in the file-system and merge the keystore from the old location to this new location

1. Create a new empty wallet using orapki at some other location than the original wallet.

$ pwd


$ orapki wallet create -wallet . -pwd ******
$ ls -ltr

-rw-rw-rw- 1 ewallet.p12.lck
-rw------- 1 ewallet.p12

2. Merge the existing keystore into newly created empty wallet. Here for the first Keystore there is no need to specify the password as it's Auto-Login.

SQL> ADMINISTER KEY MANAGEMENT MERGE KEYSTORE '<Original/old Keystore location>' INTO EXISTING KEYSTORE '' IDENTIFIED BY WITH BACKUP;

keystore altered.

3. Now Just check the contents of the newly Merged wallet and make sure it's same as the original wallet

cd
$ ls -ltr

-rw------- 1 ewallet.p12
-rw------- 1 cwallet.sso


$ orapki wallet display -wallet

Oracle Secret Store entries:
ORACLE.SECURITY.DB.ENCRYPTION.
ORACLE.SECURITY.DB.ENCRYPTION.MASTERKEY
ORACLE.SECURITY.ID.ENCRYPTION.
ORACLE.SECURITY.KB.ENCRYPTION.
ORACLE.SECURITY.KM.ENCRYPTION.


4. At this point if it's checked it didn't affect the existing wallet

SQL> select * from v$encryption_wallet;

WRL_TYPE WRL_PARAMETER STATUS WALLET_TYPE WALLET_OR FULLY_BAC CON_ID
------------------------------------------------------------------------------------------------
FILE OPEN AUTOLOGIN SINGLE NO 0

5. change the wallet location in sqlnet.ora incase of 12c .
if you are in 19c and using wallet_root and tde_configuration parameter then change them accordingly.
 

 

  • As per the above note IDs, there is no way to recreate / decrypt the password. 

    Raised a SR and they provided me the below action plan and it worked in my case.

    1.Take a backup of folder /u01/appdata/config/wallet/xx/tde to /u01/appdata/config/wallet/xxxxx/tde_backup

    2.Create a folder tde_temp under /xxx/appdata/config/wallet/xxxx/

    3.Connect to DB as sys and run the commands below.Provide any new value for password

    SQL>ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/xxx/appdata/config/wallet/xxx/tde_temp' IDENTIFIED BY <password>;

    SQL>!ls -ltr /xxxx/appdata/config/wallet/xxx/tde_temp

    SQL>ADMINISTER KEY MANAGEMENT MERGE KEYSTORE '/***/appdata/config/wallet/xxx/tde' INTO EXISTING KEYSTORE '/xxx/appdata/config/wallet/xxxx/tde_temp' IDENTIFIED BY <password> WITH BACKUP;

    SQL>!ls -ltr /xxxx/appdata/config/wallet/xxxxx/tde_temp

    SQL>ADMINISTER KEY MANAGEMENT CREATE auto_login keystore from keystore '/xxxx/appdata/config/wallet/xxxx/tde_temp' identified by "<password>";

    4.Run the commands below and provide the output

    $cd /xxxx/appdata/config/wallet/xxxx/tde_temp

    $ls -ltr

    $mkstore -wrl /xxxx/appdata/config/wallet/xxxx/tde_temp -viewEntry

    $orapki wallet display -wallet /xxx/appdata/config/wallet/xxxx/tde_temp

    Checked the "orapki wallet display" for Password >> Successful

    Checked the actual keys for the tablespaces >> Successfully matching the key in Wallet >>you are fine to use the wallet

    Now,

    -- rename the existing wallet file (ewallet.p12)

    -- rename old autologin - (cwallet.sso)

    -- copy the new wallet (ewallet.p12) to the actual location

    -- restart database ( all instances in case of RAC)

    -- startup Database (one instance in RAC)

    -- Open wallet with new password

    SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY <wallet_password>;

    -- Create new Autologin

    SQL> ADMINISTER KEY MANAGEMENT CREATE AUTO_LOGIN KEYSTORE FROM KEYSTORE '<wallet_location>' IDENTIFIED BY <wallet_password>;

    -- copy new ewallet.p12 file and new cwallet.ssp file to all instances location

    -- start other instance

    Note - This action plan might not work in every case

    FlagQuoteOff Topic1Like

  • TDE 迁移 合并 密码忘记 处理,数据库,oracle

    SureshMuddaveerappa Sr Data Warehouse Architect Posts: 15,669 Tanzanite

    Mar 31, 2022 4:06AM

    Hello User_62P17,

    In your case it worked out well since the original wallet by itself was fine (along with the contents including the needed TDE keys). The only issue in your situation was the 'lost' password. Due to this into the new temp wallet (that was created) the original TDE keys (from the 'lost' wallet) could be merged.

    ... the "orapki wallet display" for Password >> Successful

    This is coming from the new wallet you had to create. Good to know you were able to salvage and thanks on the update.

    Cheers -- Suresh文章来源地址https://www.toymoban.com/news/detail-636921.html

到了这里,关于TDE 迁移 合并 密码忘记 处理的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Windows修改MySQL数据库密码(修改或忘记密码)  

    今天练习远程访问数据库时,为了方便访问,就想着把数据库密码改为统一的,以后我们也会经常遇到MySQL需要修改密码的情况,比如密码太简单、忘记密码等等。在这里我就借鉴其他人的方法总结几种修改MySQL密码的方法。 我就以实际操作修改root密码为例,操作系统为win

    2024年02月09日
    浏览(69)
  • Windows修改MySQL数据库密码(修改或忘记密码)

    今天练习远程访问数据库时,为了方便访问,就想着把数据库密码改为统一的,以后我们也会经常遇到MySQL需要修改密码的情况,比如密码太简单、忘记密码等等。在这里我就借鉴其他人的方法总结几种修改MySQL密码的方法。 我就以实际操作修改root密码为例,操作系统为win

    2024年02月08日
    浏览(65)
  • mysql数据库忘记密码了怎么办

    本人用的mysql8版本 看到网上很多教程,什么修改配置文件my.ini。在8版本根本没用。以下是8版本解决办法。亲测可用。 1、用管理员身份打开命令行工具。(强调:管理员身份) 2、停止mysql服务: 3、输入以下命令无密码启动mysql 4、 另开一个命令行窗口,输入mysql -u root无密

    2024年02月11日
    浏览(47)
  • Navicat数据库连接成功,密码忘记如何解决

    文章转载自:Navicat已经成功连接,密码忘记的解决方法_铁打的阿秀的博客-CSDN博客 解决方法 目录 解决方法 一:通过注册表找到数据库连接的密码,再通过PHP解密 二.通过Navicat导出连接,找到连接密码,再通过PHP进行解密 一:通过注册表找到数据库连接的密码,再通过PHP解

    2024年02月11日
    浏览(47)
  • Mysql数据库--修改root密码的几种方法(忘记密码&知道密码)

    🍁 通过 alter user root identified by \\\'新密码\\\'; 🍁 通过 set password for 用户名@\\\'用户地址\\\' = \\\'新密码\\\'; 2.1.1 🎈 停止mysql服务 2.1.2 🎈 创建mysql-init-file.txt文件 2.1.3 🎈 init-file的权限(最好赋权一下) 2.1.3 🎈 使用–init-file选项启动mysql服务 2.1.4 🎈 新密码连接测试(密码:Zyl@123321)

    2024年02月08日
    浏览(84)
  • MySQL数据库忘记密码怎么办?教你一招

    文章目录 1.以管理员身份打开cmd,关闭Mysql服务 2. 跳过密码授权登录  3.再继续以管理员身份打开一个cmd窗口,进行重置密码  4.使用新密码重新登录mysql验证  5.使用Navicat可视化工具连接Mysql Mysql数据库之前安装好了,但是突然忘记当初自己设置的登录密码了,导致使用Navi

    2024年02月04日
    浏览(112)
  • 达梦数据库8用户管理以及忘记sysdba密码修改办法

    达梦数据库8用户管理 1.创建用户的语法: 创建自定义用户gin,设置密码为123456789,密码要符合密码策略(PWD_POLICY)要求,指定默认表空间为MAIN 2.锁定/解锁用户 3.修改用户的密码(同样要符合密码策略PWD_POLICY) 4.修改用户默认表空间 –尝试从MAIN表空间修改到TEST 先创建TEST的表

    2024年02月12日
    浏览(144)
  • 忘记网站admin密码怎么办?如何修改数据库md5值与admin密码巧解

    如果你不小心忘记了网站管理员账号密码,应该如何找出呢? 小编总结了两种方法: 方法一: 打开数据库,找到admin的user字段,修改user用户名对应的密码md5植。下面是常见md5值替换表: 数据库修改MD5: 14e1b600b1fd579f47433b88e8d85291 密码:123456 e10adc3949ba59abbe56e057f20f883e 密码:

    2024年02月09日
    浏览(70)
  • 译:如何成功恢复TDE加密过的数据库

    原文地址: https://www.mssqltips.com/sqlservertip/3572/recovering-a-sql-server-tde-encrypted-database-successfully/ 我的任务是在具有敏感信息的SQL Server数据库上设置透明数据加密(TDE)。在我看到的示例中,我知道我需要主数据库中的主密钥,然后需要用该主密钥加密的证书。 一个浮现在脑海中的

    2024年02月11日
    浏览(43)
  • 【数据库】Sql Server数据迁移,处理自增字段赋值

    给自己一个目标,然后坚持一段时间,总会有收获和感悟! 在实际项目开发中,如果遇到高版本导入到低版本,或者低版本转高版本,那么就会出现版本不兼容无法导入,此时通过程序遍历创建表和添加数据方式可以解决 在 SQL Server 中,数据迁移是常见的场景之一。 以下是

    2024年02月08日
    浏览(57)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包