We have two databases DB1 and DB2. DB1 is in computer C1 and DB2 is in another computer C2. First we export DB1 in C1 by running RUN_DBExport.bat and import it into DB2 in C2 by running RUN_DBRestore.bat. Then users of C2 input data in some tables (say A and B). At the same time, in DB1, we edit the table (say E and F) by creating more columns, as the result we also edit the AD_Column, AD_Field.
Question is: How could we import those update from DB1 into DB2? As the users have input data, we cant just import the whole database, which will make all the input data lost.
Any greate idea?
Thanks a lot!!!
1, export the db1
2, import the db1 into the db2 as another schema,let's say reference
3, run merge sql
(merge is a sql command in oracle)
Merge into compiere.AD_Element c1
using reference.AD_Element c2
when Matched then
update Set AD_CLIENT_ID = c2.AD_CLIENT_ID ,
AD_ORG_ID = c2.AD_ORG_ID ,
ISACTIVE = c2.ISACTIVE ,
CREATED = c2.CREATED ,
UPDATED = c2.UPDATED ,
CREATEDBY = c2.CREATEDBY ,
UPDATEDBY = c2.UPDATEDBY ,
NAME = c2.NAME ,
DESCRIPTION = c2.DESCRIPTION ,
HELP = c2.HELP ,
ENTITYTYPE = c2.ENTITYTYPE ,
COLUMNNAME = c2.COLUMNNAME ,
PRINTNAME = c2.PRINTNAME ,
PO_NAME = c2.PO_NAME,
PO_PRINTNAME = c2.PO_PRINTNAME ,
PO_DESCRIPTION = c2.PO_DESCRIPTION ,
PO_HELP = c2.PO_HELP
when not Matched then
values (c2.AD_Element_ID,c2.AD_CLIENT_ID,c2.AD_ORG_ID,c2.ISACTIVE,c2.CREATED,c2.UPDATED,c2.CREATEDBY,c2.UPDATEDBY,c2.NAME,c2.DESCRIPTION,c2.HELP,c2.ENTITYTYPE,c2.COLUMNNAME,c2.PRINTNAME,c2.PO_NAME,c2.PO_PRINTNAME,c2.PO_DESCRIPTION,c2.PO_HELP) ;
That's great!! Thank you very much!!!
In addition to the table AD_Field and AD_Column, what other tables should i merge?
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.