MS SQL Restoring a Database With a Query

If it is desired to restore (return from backup) of a database that has been backed up in MS SQL Server, the following code is run.

RESTORE DATABASE {Our Database Name} TO DISK= {Path of .bak File to Restore from Backup}

Its usage is as follows..

RESTORE DATABASE OurDB TO DISK='c:\OurDB.bak'

After this process is done, the Databases folder in the Object Explorer (left panel) must be right-clicked and "Refreshed" for the change to be seen.



You May Interest

What is the XML Datatype in SQL Server ?

General Information List of All Allowed Databases in MS SQL Serve ...

Getting List of All Server Databases in MS SQL

What is the Maximum Size per Database for SQL Server Express ?

What are OFFLINE Datafiles with SQL Server ?