bradlee27514
asked on
How to simply restore a real company to a newly created test company
I just created a test company. I simply want to take yesterday's backup from a real company and restore it into the new test company. When I try to do this it says 'The backup file you selected refers to a database other than the one you are trying to restore'. I want to test something with real company data, but am having trouble finding a way to do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
"And you will want to make sure that you verify the "Restore As" file paths and file names under the options tab."
Should these reference the current file paths for the live company db or the test db?
Should that script be run against the test company db, or against the system db?
I have to be 100% certain I am not affecting the live company db.
Should these reference the current file paths for the live company db or the test db?
Should that script be run against the test company db, or against the system db?
I have to be 100% certain I am not affecting the live company db.
ASKER
Thank you so much! I couldn't track this down for the life of me
Hi,
Good questions.
The Restore As file paths should point to the Test database that you want to replace / restore into. I've been meaning to research those fields more to determine if they are really necessary when you do a Restore As, but I always just set them out of habit.
And you should run that script against your Test company after you have completed the restore.
Let me know if you have any other questions.
Thanks,
Steve Endow
Dynamics GP Certified Trainer
Dynamics GP Certified Professional
Good questions.
The Restore As file paths should point to the Test database that you want to replace / restore into. I've been meaning to research those fields more to determine if they are really necessary when you do a Restore As, but I always just set them out of habit.
And you should run that script against your Test company after you have completed the restore.
Let me know if you have any other questions.
Thanks,
Steve Endow
Dynamics GP Certified Trainer
Dynamics GP Certified Professional
ASKER
Everything seemed to work well until running the sql script. it wouldn't run and i got:
Msg 2627, Level 14, State 1, Line 1
Violation of PRIMARY KEY constraint 'PKSVC00010'. Cannot insert duplicate key in object 'dbo.SVC00010'.
The statement has been terminated.
Msg 2627, Level 14, State 1, Line 1
Violation of PRIMARY KEY constraint 'PKSVC00010'. Cannot insert duplicate key in object 'dbo.SVC00010'.
The statement has been terminated.
ASKER
when i check that table i have a record for 'TPAI' and for 'TESTX', shouldn't there only be a record for the test company?
I believe that you will want to check the "Overwrite the existing database" checkbox under the Options page of the Restore Database window.
And you will want to make sure that you verify the "Restore As" file paths and file names under the options tab.
Also, after you restore, make sure to run the script provided in KB Article 871973. It will correct old company references throughout the database that can cause GP to behave very strangely.
Thanks,
Steve Endow
Dynamics GP Certified Trainer
Dynamics GP Certified Professional
Open in new window