Friday, 1 June 2012

Sync security between JD Edwards 9.0 and 9.1

I have a demo site in 9.0, working quite nicely thanks.  I want to replicate the users and security to 9.1 – here is what I did.

Firstly create the database link, from orcl to jdevm

using this statement to find the unique column combos:

select column_name from all_ind_columns where index_owner = 'SY910' and index_name = 'F95921_0'

I came up with the following statements:

insert into sy910.f00950 t1
select * from sy900.f00950@jdevm t2
where not exists (
select 1 from sy910.f00950 t3
where t2.fssety = t3.fssety
and t2.fsuser = t3.fsuser
and t2.fsobnm = t3.fsobnm
and t2.fsdtai = t3.fsdtai
and t2.fsfrdv = t3.fsfrdv
and t2.fssy = t3.fssy)

 

insert into sy910.f0092 t1
select * from sy900.f0092@jdevm t2
where not exists (
select 1 from sy910.f0092 t3
where t2.uluser = t3.uluser)

insert into sy910.f98OWSEC t1
select * from sy900.f98OWSEC@jdevm t2
where not exists (
select 1 from sy910.f98OWSEC t3
where t2.scuser = t3.scuser
and t2.scsecf1 = t3.scsecf1)

insert into sy910.f98OWpu t1
select * from sy900.f98OWpu@jdevm t2
where not exists (
select 1 from sy910.f98OWpu t3
where t2.PUSECUSR = t3.PUSECUSR
and t2.PUSECF1 = t3.PUSECF1)

insert into sy910.f95921 t1
select * from sy900.f95921@jdevm t2
where not exists (
select 1 from sy910.f95921 t3
where t2.RLFRROLE = t3.RLFRROLE
and t2.RLTOROLE = t3.RLTOROLE
and t2.RLEFFDATE = t3.RLEFFDATE)

insert into sy910.f0093 t1
select * from sy900.F0093@jdevm t2
where not exists (
select 1 from sy910.F0093 t3
where t2.LLUSER = t3.LLUSER
and t2.LLLL = t3.LLLL
)

update sy910.f0093 set LLLL = 'JDV910' where LLLL = 'JDV900' ;

update sy910.f0093 set LLLL = 'DV910' where LLLL = 'DV900' ;

-- you might get some dups on the above

insert into sy910.f00921 t1
select * from sy900.F00921@jdevm t2
where not exists (
select 1 from sy910.F00921 t3
where t2.ULUSER = t3.ULUSER)

No comments:

Extending JDE to generative AI