DBeaver restore SQL Server .bak file

Paul Kruger picture Paul Kruger · Jul 29, 2019 · Viewed 11.7k times · Source

I am just trying to restore a SQL Server .bak file in my DBeaver UI. But I have no idea how to do this - can someone help please?

I created a database, but when I right click on it, there are no restore options.

enter image description here

Answer

FembotDBA picture FembotDBA · Jul 29, 2019

I do not see that option either in my version of DBeaver (6.1.3 - community). What you could do is initiate a restore with TSQL (by clicking on SQL Editor while you are connected to your database). Then in the Script area, use the below, modified for your own environment/database name.

USE [master] RESTORE DATABASE [DatabaseName] FROM 
DISK = N'C:\FolderName\BackupName.bak' WITH  FILE = 1, NOUNLOAD, REPLACE, STATS = 10

For full Tsql options to restore a database, see this: RESTORE Statements (Transact-SQL)