T-SQL Tutorial

Restore entire database - TSQL Tutorial


Restore a full database backup from the logical backup device.

RESTORE DATABASE Syntax:

RESTORE DATABASE { database_name }
[ FROM [ ,...n ] ]
[ WITH
{
[ RECOVERY | NORECOVERY | STANDBY = {standby_file_name} ]
| , [ ,...n ]
| ,
| ,
| ,
| ,
| ,
} [ ,...n ]
]
[;]

RESTORE DATABASE Example:

USE master;
GO
RESTORE DATABASE test_2
FROM test_2;
GO

Messages:
Processed 328 pages for database 'test_2', file 'test_2' on file 1.
Processed 2 pages for database 'test_2', file 'test_2_log' on file 1.
RESTORE DATABASE successfully processed 330 pages in 0.276 seconds (9.333 MB/sec).