我们需要找到一种方法将生产中的某些数据复制到我们的开发区域,以便我们可以调试/修复任何问题.
有时单个用户相关数据会受到影响.我们必须在dev中复制相同的场景并找到解决方案.
目前我们遵循两种方法: –
1. Check the audit history and try to recreate the similar scenario
in dev. <50% sucess rate in recreating the exact same scenario.
2. Restore+Encrypt the "whole" production into dev and then continue
on the work. It is an overkill if issue impacts only a single user.
所以我试图找到一种方法来从生产中选择单个用户数据并将其插入到dev区域.
We just have Java and Oracle. Can’t use any external tools. Because we
dont have license and cannot download freeware due to security issues.
我尝试了以下内容: –
>编写一个java代码,它将查询信息模式表以查找表之间的关系并创建如下所示的select语句: –
select 'insert into TABLE1(C1,C2,C3,C4) values ('||''''||C1||''''||','||coalesce(to_char(C2),'null')||','||''''||C3||''