Transact-SQL Restore Latest Backup File

Restore Latest Backup

Here the very basic steps to restore latest SQL backup file on the backup media location using the below Transact-SQL statement (T-SQL Statement).

  1. Open SQL management studio and make sure the SQL Server Agent is running.  If its not go to windows services.msc and start SQLSERVERAGENT service or use “net start SQLSERVERAGENT” cmd.
    Screenshot 2016-02-25 13.04.20
  2. Expand the Management from object explorer section and right click Maintenance Plans  to create create new maintenance plan.
  3. Drag and drop the Execute T-SQL Statement Task tool from Toolbox windows to design panel.
    Screenshot 2016-02-25 12.52.41
  4. Right click the task to put the below T-SQL statement on it
    Screenshot 2016-02-25 12.52.22
  5. Save the task and run from Jobs under SQL Server Agent
    Screenshot 2016-02-25 12.53.52
    Screenshot 2016-02-25 12.54.03
  6. Make sure the job successfully completed and check the database updates.

Cheers…!


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.