Hi ,
I have a requirement to retain the same roles to the users in our TEST environment even after the data refresh from PROD to TEST, why because there are some differences in assigned roles for the same user in PROD & Test.
So before going for data refresh in TEST i have created a definition group with a name "User Roles" under System Administration > Common > Data export/import > Definition groups.
And then i have added the below tables to the above definition group
"UserInfo" and “SecurityUserRole”
After this, i have exported them to a comma file type file , finally i have ended up with a .dat & .def files.
Now, after the data refresh is over from PROD to TEST,
I have exported the above .dat file back to TEST as follows.
1. System Administration > Common > Data export/import > Import
2. Selected the .dat file
3. IN the ‘Advanced’ tab below options were set to yes:
a. Include shared tables: Yes
b. Include system tables: Yes
c. Update existing record: Yes
4. Confirmed dialog for import into related tables.
5.Clicked Ok in the dialog to select which tables you want to delete before import
6.Did not select any tables
After importing progress bar will shown up and i have ended up with below errors.
and there is no roles have been updated to the users.
Below is the error description:
Import database.
Cannot execute the required database operation.
The SQL database has issued an error.
An error occurred during data import.
Cannot execute the required database operation.
The record already exists.
UPDATE "DBO"."SECURITYUSERROLE" SET "PARTITION" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."PARTITION", "RECVERSION" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."RECVERSION", "VALIDTOTZID" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."VALIDTOTZID", "VALIDTO" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."VALIDTO", "VALIDFROMTZID" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."VALIDFROMTZID", "VALIDFROM" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."VALIDFROM", "ASSIGNMENTMODE" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."ASSIGNMENTMODE", "ASSIGNMENTSTATUS" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."ASSIGNMENTSTATUS", "USER_" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."USER_", "SECURITYROLE" = "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798"."SECURITYROLE" FROM "DBO"."SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798" WHERE "SYSIMPEXPRES7AC145DB738C4357AB11EA3764D19798".NEWRECID = "SECURITYUSERROLE".RECID
Cannot execute the required database operation.
The record already exists.
INSERT INTO "DBO"."USERINFO" ("RECID", "PARTITION", "RECVERSION", "GLOBALEXCELEXPORTFILEPATH", "DEFAULTPARTITION", "CLIENTACCESSLOGLEVEL", "GLOBALEXCELEXPORTLOCATION", "GLOBALEXCELEXPORTMODE", "GLOBALLISTPAGELINKMODE", "CREDENTIALRECID", "ISSUERRECID", "ACCOUNTTYPE", "SHOWMODELNAMEINAOT", "DEL_DEFAULTMODELID", "GLOBALFORMOPENMODE", "FILTERBYGRIDONBYDEFAULT", "NOTIFYTIMEZONEMISMATCH", "HOMEPAGEREFRESHDURATION", "PREFERREDCALENDAR", "PREFERREDTIMEZONE", "HELPLANGUAGE", "LANGUAGE", "EXTERNALUSER", "ENABLEDONCE", "NETWORKALIAS", "NETWORKDOMAIN", "SID", "COMPILERWARNINGLEVEL", "REPORTRIGHTMARGIN", "REPORTLEFTMARGIN", "REPORTBOTTOMMARGIN", "REPORTTOPMARGIN", "TRACEINFO", "QUERYTIMELIMIT", "AUTOLOGOFF", "COMPANY", "INFOLOGLEVEL", "PROPERTYFONTSIZE", "PROPERTYFONTNAME", "FORMFONTSIZE", "FORMFONTNAME", "REPORTFONTSIZE", "REPORTFONTNAME", "CONFIRMUPDATE", "CONFIRMDELETE", "STARTUPPROJECT", "DEL_OSACCOUNTNAME", "DEL_PASSWORD", "SHOWAOTLAYER", "DEBUGGERPOPUP", "SHOWTOOLBAR", "SHOWSTATUSLINE", "GENERALINFO", "MESSAGELIMIT", "HISTORYLIMIT", "GARBAGECOLLECTLIMIT", "AUTOUPDATE", "AUTOINFO", "DEBUGINFO", "TOOLBARINFO", "STATUSLINEINFO", "DEL_STARTUPMENU", "ENABLE", "NAME", "ID") SELECT "NEWRECID", "PARTITION", "RECVERSION", "GLOBALEXCELEXPORTFILEPATH", "DEFAULTPARTITION", "CLIENTACCESSLOGLEVEL", "GLOBALEXCELEXPORTLOCATION", "GLOBALEXCELEXPORTMODE", "GLOBALLISTPAGELINKMODE", "CREDENTIALRECID", "ISSUERRECID", "ACCOUNTTYPE", "SHOWMODELNAMEINAOT", "DEL_DEFAULTMODELID", "GLOBALFORMOPENMODE", "FILTERBYGRIDONBYDEFAULT", "NOTIFYTIMEZONEMISMATCH", "HOMEPAGEREFRESHDURATION", "PREFERREDCALENDAR", "PREFERREDTIMEZONE", "HELPLANGUAGE", "LANGUAGE", "EXTERNALUSER", "ENABLEDONCE", "NETWORKALIAS", "NETWORKDOMAIN", "SID", "COMPILERWARNINGLEVEL", "REPORTRIGHTMARGIN", "REPORTLEFTMARGIN", "REPORTBOTTOMMARGIN", "REPORTTOPMARGIN", "TRACEINFO", "QUERYTIMELIMIT", "AUTOLOGOFF", "COMPANY", "INFOLOGLEVEL", "PROPERTYFONTSIZE", "PROPERTYFONTNAME", "FORMFONTSIZE", "FORMFONTNAME", "REPORTFONTSIZE", "REPORTFONTNAME", "CONFIRMUPDATE", "CONFIRMDELETE", "STARTUPPROJECT", "DEL_OSACCOUNTNAME", "DEL_PASSWORD", "SHOWAOTLAYER", "DEBUGGERPOPUP", "SHOWTOOLBAR", "SHOWSTATUSLINE", "GENERALINFO", "MESSAGELIMIT", "HISTORYLIMIT", "GARBAGECOLLECTLIMIT", "AUTOUPDATE", "AUTOINFO", "DEBUGINFO", "TOOLBARINFO", "STATUSLINEINFO", "DEL_STARTUPMENU", "ENABLE", "NAME", "ID" FROM "T408425A86B6544BFBB6EBE6C328DCCE5" WHERE "T408425A86B6544BFBB6EBE6C328DCCE5"."CONFLICTS" = 0
The import took 13 seconds, for 1824 records.
What could be the reason for above failure.
*This post is locked for comments
I will recommended you please use DIXF for same. User entity is OOB, you have to create SecurityUserRole custom entity for same.
Also note that Microsoft has a tool for such data refreshes: Test Data Transfer Tool. It can be configured not to overwrite some tables (such as users and roles).
Hi Andre,
Thanks for your reply.
Users are same in both test and prod environments.
No, I have not created any new entity using the DIXF.
Regards,
Aravind Reddy
Hi Aravind,
The object numbers for security roles can be different per environment. So probably it is caused by this. Please compare the object numbers of the roles between your test and prod environment. Also I don't know if the users are the same in both environments.
Have you also tried to create a new entity using the Data Import/Export Framework (DIXF)?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156