locked
backup and restore on sql-server-2008 RRS feed

  • Question

  • hi
    is there any way to make backup to database on sql-server-2008 in one button press ?
    and any way to make restore to database on sql-server-2008 in one button press ?
    any idea ? or direction ?
    thanks in advance
    Saturday, November 26, 2011 4:29 PM

Answers

All replies

  • You can create in advance script to backup the database:

    BACKUP DATABASE [Demo_Deploy] 
    TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\Demo_Deploy.bak' 
    WITH NOFORMAT, NOINIT,  NAME = N'Demo_Deploy-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
    GO
    
    


    Then, when needed you will click "execute" button to perform backup.

    You can also write similar script for restore.

    Saturday, November 26, 2011 4:49 PM
  • is there any way to make backup to database on sql-server-2008 in one button press ?
    and any way to make restore to database on sql-server-2008 in one button press ?

    In SSMS Object Explorer Right Click Database--> Task --> Backup --> OK (if DISK file is setup). Pretty much a single click.

    How to: Back Up a Database (SQL Server Management Studio)

    Restore can be similarly quick, however, it pays to slow down with restore because you may lose data.

    How to: Restore a Database Backup (SQL Server Management Studio) 


    Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM
    • Edited by Kalman Toth Saturday, November 26, 2011 7:15 PM
    • Proposed as answer by Hasham NiazEditor Saturday, November 26, 2011 9:40 PM
    • Marked as answer by KJian_ Friday, December 2, 2011 7:54 AM
    Saturday, November 26, 2011 6:51 PM