Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How create backup and restore sql server in c# ???
when I create backup then backup will be append in existing backup???

[edit] phil.o : removed spurious bold [/edit]
Posted
Updated 20-Nov-13 0:38am
v3
Comments
phil.o 20-Nov-13 6:31am    
What exactly do you want to backup?
kashifjaat 20-Nov-13 6:34am    
I have written proper question but every time missing some words

I want to Create SQL server backup in c#

 
Share this answer
 
Backup:
MSDN - BACKUP (Transact-SQL)[^]

Restore:
MSDN - RESTORE (Transact-SQL)[^]

Just call those commands with an SqlCommand

Take care that the paths you include into the query are alway local to the server not to the client. If you want to backup to or restore from any other location than the drives from the server you need a network share where the server has access to.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900