I'm trying to restore a SQL Server database using SSMS, and I'm stuck.
I’m running Windows 11 Pro. I’m using SQL Server 2008, version 12.0.4237.0. (Before you tell me to upgrade to something newer and try again… to keep it short, I’d love to upgrade to a newer version, but I can’t do it until I solve this problem.)
I'm following the instructions at Restore a Database Backup Using SSMS, under heading A, "Restore a full database backup." I'm copying the instructions, with comments on what happened in parentheses.
-
In Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that instance.
-
Right-click Databases and select Restore Database...
-
On the General page, use the Source section to specify the source and location of the backup sets to restore. Select one of the following options... (I selected *Device*.)
-
Select the browse (...) button to open the Select backup devices dialog box.
-
Backup media type: Select a media type from the Backup media type drop-down list... (I selected File.)
-
Add (I click Add, and it opens a File dialog.)
-
Depending on the type of media you select from the Backup media type drop-down list, clicking Add opens one of the following dialog boxes...
File: In this dialog box, you can select a local file from the tree or specify a remote file using its fully qualified universal naming convention (UNC) name.)
This is where things go off the rails. My backup is in a subdirectory of the Documents library, whose pathname should be C:\Users\\Documents. But the File dialog reports that C:\Users\\ is empty.
It's not, of course. File Explorer shows all the stuff in C:\User\\ that should be there, including a Documents directory, and I can drill down all the way to the backup file that I want to restore. But as far as SSMS's Open dialog is concerned, none of that exists.
The description of "File" says I can "specify a remote file using its fully qualified universal naming convention (UNC) name." In other words, its absolute pathname. I entered the backup file's absolute pathname in the File name box and clicked OK. SSMS returned to the Restore Databases dialog. I think it should have added the backup to the Backup sets to restore list, but instead it just displayed the backup file's pathname in the text box that follows the Device radio button.
At some point a message appeared at the top of the Restore Backups dialog that said, "An exception occurred while executing a Transact-SQL statement or batch." That puzzles me, since I can't get to the the point of telling it to restore anything.