Forum Discussion

Orthoducks's avatar
Orthoducks
Copper Contributor
Mar 19, 2025

Import does not display folder, so cannot reach file

I am trying to restore a database using SMSS under Windows 11. I don't recall what version of SMSS (it's on another computer), but I downloaded it less than a week ago, so it should be the current one.

Everything is OK up to the point where I open the Locate Backup File dialog and try to select the backup file I want to restore. The file is in the Documents library, so its pathname begins C:\Users\<username>\Documents\... But when I get to the <username> folder, the dialog does not list any of its subfolders. I can't select the backup file if I can reach the folder that contains it.

I tried pasting the folder's pathname into the dialog's Backup File location field. When I pressed Enter, SSMS displayed an error telling me, in essence that I don't have permission to access the folder or it doesn't exist.

Think about that... I don't have permission to access my own Documents folder, or it doesn't exist.

Yes, the Documents folder does exist, and I do have permission to access it. File Explorer and all of the other applications I've tried know this. SMSS, for some reason, does not.

What is going on here, and how can I straighten it out?

  • SivertSolem's avatar
    SivertSolem
    Iron Contributor

    As olafhelper is suggesting, move the file to a public folder, such as C:\temp (just create a folder if it doesn't exist). Just don't create the folder in a user home (C:\Users\<username>\)

    But to explain why you have permission issues:
    When restoring a database to SQL Server, it is done by the SQL Server engine service account, not your user account. See screenshot of a default installation, using NT Service\MSSQLSERVER.

    SQL Server is telling you that the SQL Server engine service account does not have permission to access your Documents library, which is expected behaviour.

  • olafhelper's avatar
    olafhelper
    Bronze Contributor

    C:\Users\<username>\Documents\..

    That's a private user profile folder, where only the user have access to; not the SQL Server service account.

    Locate the backup file in a (public) folder, where SQL Server has access to.

     

     

Resources