How to create SQL Server 2008 database full backup programmatically in desired folder with using Microsoft visual studio 2010 c#
-
3possible dublicate -> stackoverflow.com/questions/3953598/…Andrew Orsich– Andrew Orsich2010-12-16 23:52:33 +00:00Commented Dec 16, 2010 at 23:52
-
@Bugai13 that is about how to restore. but i have to learn how backup first :)Furkan Gözükara– Furkan Gözükara2010-12-17 01:29:12 +00:00Commented Dec 17, 2010 at 1:29
Add a comment
|
1 Answer
Just execute SQL Server command
BACKUP DATABASE database_name TO DISK='d:\path\to\backup\file\on\the\server.bak'
6 Comments
marc_s
And just remember that you can only backup to drives attached to your SQL Server machine (including UNC paths); you cannot back from a server to a local drive on your PC
Furkan Gözükara
so it is this much easy. i will try now :)
Furkan Gözükara
ok i tried and it works great. but 2 questions. can there be any timeout problem because my database is really big ? also is this same with ms sql server management studio right click desired database tasks backup full ?
Alex
1) probably yes; and 2) yes, created backup has exactly the same format.
Ciaran Gallagher
Hi, does this command also work with SQL Server 2005? Must either SQL Server 2005/2008 have to have any particular components installed (e.g. SMO components)? Thanks
|