MsSQL Server: How can I restore DB using T-SQL

0

How can I restore DB using T-SQL?

I'm working on linux(ubuntu)

1 Answer

I't very easy, Just use this example:

RESTORE DATABASE <Local DB name>
FROM DISK = '/<path to DB>/Downloads/BitExperts-15-8-2019.bak'
WITH REPLACE,
MOVE '<DB name from backup>' TO '/var/opt/mssql/data/<Local DB name>.mdf',
MOVE '<DB name from backup>_log' TO '/var/opt/mssql/data/<Local DB name>.ldf'
GO
0

Too many commands? Learning new language?

FavScripts.com is a free tool that allows you to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.

Boost your daily productivity with FavScripts.com!

Post Answer