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

0
=
0
+
0
No specific Bitcoin Bounty has been announced by author. Still, anyone could send Bitcoin Tips to those who provide a good answer.
0

How can I restore DB using T-SQL?

I'm working on linux(ubuntu)

1 Answer

1
=
0
=
$0
Internet users could send Bitcoin Tips to you if they like your 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
SEND BITCOIN TIPS
0

Too many commands? Learning new syntax?

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

Boost your productivity with FavScripts.com!

Post Answer