mssql '5 (Access is denied.)' error during restoring database

前端 未结 15 2023
忘了有多久
忘了有多久 2021-01-30 04:08

I want to restore a database from a file (Tasks → Restore → Database; after I select from device and select file) via SQL Server Management Studio.

After that, I get th

15条回答
  •  -上瘾入骨i
    2021-01-30 04:28

    I found this, and it worked for me:

    CREATE LOGIN BackupRestoreAdmin WITH PASSWORD='$tr0ngP@$$w0rd'
    GO
    CREATE USER BackupRestoreAdmin FOR LOGIN BackupRestoreAdmin
    GO
    EXEC sp_addsrvrolemember 'BackupRestoreAdmin', 'dbcreator'
    GO
    EXEC sp_addrolemember 'db_owner','BackupRestoreAdmin'
    GO
    

提交回复
热议问题