Difference between revisions of "MSSQL Database stuck in restore state"
From DevOps Notebook
Line 4: | Line 4: | ||
RESTORE DATABASE [YourDatabase.Name] | RESTORE DATABASE [YourDatabase.Name] | ||
FROM DISK = N'C:\PathToBackupFiles.bak' WITH RECOVERY | FROM DISK = N'C:\PathToBackupFiles.bak' WITH RECOVERY | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | With in-memory database: | ||
+ | <syntaxhighlight lang="sql"> | ||
+ | USE [master] | ||
+ | |||
+ | RESTORE DATABASE [YourDatabase.Name] | ||
+ | FROM DISK = N'C:\PathToBackupFiles.bak' WITH RECOVERY, | ||
+ | MOVE N'XTP' TO N'C:\MSSQL\Data\XTP' | ||
+ | GO | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 09:13, 6 September 2022
USE [master]
RESTORE DATABASE [YourDatabase.Name]
FROM DISK = N'C:\PathToBackupFiles.bak' WITH RECOVERY
With in-memory database:
USE [master]
RESTORE DATABASE [YourDatabase.Name]
FROM DISK = N'C:\PathToBackupFiles.bak' WITH RECOVERY,
MOVE N'XTP' TO N'C:\MSSQL\Data\XTP'
GO