Forum Discussion
kdrew098
Dec 07, 2022Copper Contributor
Do I need to uninstall and reinstall the SQL Server engine?
Sorry this is long, but I need to show some context so people will understand that the object of this is for the user to get back to using Dynamics GP 10.0 with the original database. I have an occa...
olafhelper
Dec 08, 2022Bronze Contributor
The problem is that it executes with errors. See attached image.
kdrew098 , the images are to small, I can't see anything. Please post the SQL statement and error messages as text.
- kdrew098Dec 10, 2022Copper ContributorThis is from the picture. Based on that, someone sent me a link that got me closer. I'll put in the new code after that. It gets me a new error but I know I'm closer because I now have used the RESTORE FILELISTONLY query to get the actual names of the .mdf files. I'm still getting errors - but they are new errors.
RESTORE DATABASE [OSD] FROM DISK = N'G:\One Stop Backup\OSD_Nov8-2022.bak' WITH FILE = 1, NOUNLOAD, STATS = 10
GO
(Messages)
Msg 5133, Level 16, State 1, Line 1
Msg 3156, Level 16, State 3, Line 1
Msg 5133, Level 16, State 1, Line 1
Msg 3156, Level 16, State 3, Line 1
Msg 3119, Level 16, State 1, Line 1
Msg 3013, Level 16, State 1, Line 1
----------------------------------------------------------------------
Next attempt:
RESTORE FILELISTONLY FROM DISK='D:\One Stop Backup\OSD_NOv8-2022.bak'
Results
GPSOSDDat.mdf D:\ONE STOP\MSSQL\GPSOSDDat.mdf
GPSOSDLog.ldf D:\ONE STOP\MSSQL\GPSOSDLog.ldf
I created those folders on the D drive to match the above
Now I adjusted the script:
RESTORE DATABASE [OSD]
FROM DISK = 'D:\One Stop Backup\OSD_Nov8-2022.bak'
WITH MOVE 'GPSOSDdat.mdf' TO 'D:\ONE STOP\MSSQL\GPSOSDDat.mdf',
MOVE 'GPSOSDLog' TO 'D:\ONE STOP\MSSQL\GPSODLog.ldf',
REPLACE,
STATS=10
GO
Result:
Msg 3234, Level 16, State 2, Line 1
Msg 3013, Level 16, State 1, Line 1