Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi I need the menus that help me to back up in sql server 2008? thanks

share|improve this question

migrated from stackoverflow.com Jun 12 '10 at 2:47

This question came from our site for professional and enthusiast programmers.

    
Menus? You mean from in Management Studio? –  OMG Ponies Jun 10 '10 at 20:16
    
I mean the please write like tools> Options>... –  Johanna Jun 10 '10 at 20:17
add comment

3 Answers 3

to backup a database? Right click on the database, click on tasks and then backup

alt text

Or in T-SQL

BACKUP DATABASE YourDatabase TO  DISK = N'C:\Backup\YourDatabase.bak' 
WITH NOFORMAT, INIT,  NAME = N'Full Database Backup', 
SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO
share|improve this answer
    
thanks a lot for your helping!! –  Johanna Jun 10 '10 at 20:21
add comment

To backup a database:

USE master
GO
BACKUP DATABASE MyDataBase TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLExpress\MSSQL\Backup\MyDataBase.bak'
WITH NOFORMAT, INIT, NAME = N'MyDataBase Full Database Backup', SKIP, NOREWIND, NOUNLOAD
GO

To restore:

USE master
GO
ALTER DATABASE MyDataBase SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE MyDataBase FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLExpress\MSSQL\Backup\MyDataBase.bak'
WITH FILE = 1, NOUNLOAD, REPLACE

-- use with next if file names were changed
,MOVE 'MyDataBase' TO
 N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLExpress\MSSQL\Data\MyDataBase.mdf'
,MOVE 'MyDataBase_log' TO
 N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLExpress\MSSQL\Data\MyDataBase.log.ldf'
GO
share|improve this answer
add comment

You might find this MSDN page helpful:

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.