Goal
You want to backup your live databases and create test databases on the same SQL Server for Dynamics SL.
Environment
Dynamics SL 7.0.
Issue
You change the Database Name field in the System Tables (Company and Domain Tables). You update views in Database Maintenance. You even sync Security just in case. But you get an error for any report you try to print preview or print. You get a CRPEHLPR.EXE error: You also get a ROI Get RIPARAM failed error:
All reports, all modules.
Resolution
The rptExtra Table contains a single record. It is in the System Database. If you look at it, it has your live database name in the databasename field. You cannot just change the value to the test database name. You have to delete the record then run Synchronize All Ownership and Security in the Database Maintenance Screen. This screen is usually installed under Admin Tools on the server. The screen number is 98.290.00. This will create the record in RptExtra with the proper values for reports to run in Dynamics SL.
Finally you must fix the master60sp user after you run Database Maintenance Synch all Security. It’s a bug. Run this script in all application databases after:
exec sp_grantdbaccess 'Master60SP';
exec sp_addrolemember 'Public','master60sp';
exec sp_addrolemember 'msdynamicssl','master60sp';
exec sp_addrolemember 'db_datareader','master60sp';
Conclusion
Restoring Live to Test needs a few extra steps to get Reports working in Dynamics SL.