Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Backup and Restore

Author  Topic 

karthik_padbanaban
Constraint Violating Yak Guru

263 Posts

Posted - 2008-04-11 : 08:41:15
Hi all.,
How to take Backup for whole database and how to restore it.,
which would be the efficient way.,

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-04-11 : 09:42:39
1 Backup database your_db to disk='path'
2 Restore database your_db from disk='path'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

tomy74
Starting Member

32 Posts

Posted - 2008-04-11 : 09:42:49
Hi karthik,

Use the following t-sql command to backup and restore AdventureWorks DB:

USE [master]
GO

BACKUP DATABASE AdventureWorks
TO DISK = 'C:\AdventureWorks.Bak'


USE [master]
GO

RESTORE DATABASE AdventureWorks
FROM DISK= 'C:\AdventureWorks.Bak'

for more details please check the following URL :
http://msdn2.microsoft.com/en-us/library/ms186865.aspx
http://msdn2.microsoft.com/en-us/library/ms186858.aspx

Regards,

Tarek Ghazali



SQL Server MVP
http://www.sqlmvp.com
Go to Top of Page

karthik_padbanaban
Constraint Violating Yak Guru

263 Posts

Posted - 2008-04-11 : 10:32:24
Thank u its working.,
Go to Top of Page
   

- Advertisement -