Dear Devolutions,
I have made an export (RDM file) of our production datasource, and now i want to import it in our test datasource.
However, before each entry imported i get the following SQL syntax error (see attachment).
First i thought it had to do with the security groups not created in the test datasource. But that's not the case. The security groups were created automatically?!
We use DLVS3.2.1.0 With RDM client 11.7.6.0. I'm logged in as a full RDM administrator.
Any idea what's going wrong? :)
Thanks in advance.
RDM_SQL_error.png
Hello,
Unfortunately, Security Groups, Roles and Documents are not exported in the .rdm file.
For all of your documents, you will have to save them first and then import them in the test data source.
For the Roles and the Security Groups, the two PowerShell scripts joined to this post will help you to transfer them in the test data source.
Here are the steps to run these scripts. Your entries must have already been imported into the test data source.
1- In RDM, open the PowerShell (RDM CmdLet) in the Tools menu.
2- Select the data source you want to export with the cmdlet Set-RDMCurrentDataSource.
3- Execute the script Export_SecGRP_Roles.ps1
4- Select the test data source with the cmdlet Set-RDMCurrentDataSource.
5- Execute the script Import_SecGrp_Roles.ps1
The only thing that you will have to do is to set the permissions on the Security Groups for each Roles.
Best regards,
Érica Poirier
Import_SecGrp_Roles.ps1
Export_SecGrp_Roles.ps1
Hi Erica,
Thanks for your reply. I will try the scripts after my holiday.
You say the entries must have already been imported into the test datasource.
Any idea what causes the sql error to be thrown? when i click on the OK button, the entry is nonetheless impprted succesfully. But i'm not going to click 2000 times on the OK button :P
Any update on this one? What exactly is causing this SQL error?
Thanks in advance.
The export contains the ID of the security group from the old database. When you import into the new database, which doesn't have matching security groups, it tries to insert the connection but the database constraint prevents the connection to be saved due to missing information.
If you simply recreate the security groups in RDM using the UI, they would be assigned new IDs so that won't solve it. That is why using PowerShell is your only option at this time. It allows you to recreate the security groups while keeping the same IDs as the original database.
I've added a feature request to see what/how we can improve the workflow.
Best regards,
Stéfane Lavergne
Thank you so much for the clarifcation! Now it's clear to me why it happens:)
Like Erica already pointed out, i will try the scripts, which will do the trick.
Thank you all.
Kind regards,
Valid Operations
Hello,
I have made an improvement in the Import_SecGrp_Roles script to keep the old GUID of each Security Groups. The script is attached to this post.
You can import your entries in the new data source after you run these scripts.
Best regards,
Érica Poirier
Import_SecGrp_Roles.ps1