Create Backup of an SQL database through asp.net+vb web application

Posted by Baijuep under Regular Expressions on 2/23/2011 | Points: 10 | Views : 3387 | Status : [Member] | Replies : 7
hello all I am new in this forum. i have a web application which is used for managing a workshop activities. i am willing to make a backup otion so that the database back (SQL) can be made. pl help me

Baiju EP


Responses

Posted by: Madhu.b.rokkam on: 2/23/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
you can execute the below command using ADO.Net

BACKUP DATABASE yourdb TO DISK='C:\yourdb.bak' WITH FORMAT



Thanks and Regards
Madhu

Baijuep, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baijuep on: 2/24/2011 [Member] Starter | Points: 25

Up
0
Down
Thank you it works effectively when it is executed from SQL management studio query
i excuted the command as under and it works effectively
BACKUP DATABASE workshop TO DISK='C:\workshop.bak' WITH FORMAT

But i want to excecute this from my asp.net+vb web page so that user can make backup for their data and afterwards thay can restore the data from the backup (all functions from web it self)



Baiju EP

Baijuep, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.b.rokkam on: 2/24/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Please go thru link

http://www.codeproject.com/KB/database/SQL_Server_2005_Database.aspx

it will solve your issue..

Thanks and Regards
Madhu

Baijuep, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baijuep on: 2/25/2011 [Member] Starter | Points: 25

Up
0
Down
i checked the link the same is in C# and i am using vb in my web page. can u suggest the link to a vb script for backing up & restoring a SQL databse

Baiju EP

Baijuep, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.b.rokkam on: 2/25/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
you can use this link to convert the c# code to vb.net code

http://www.developerfusion.com/tools/convert/csharp-to-vb/

Thanks and Regards
Madhu

Baijuep, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.b.rokkam on: 2/27/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Your problem got resolved or not ??

Thanks and Regards
Madhu

Baijuep, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baijuep on: 2/28/2011 [Member] Starter | Points: 25

Up
0
Down
No i was not able to rectify the problem. I converted from C# to vb and still the script is not working

Baiju EP

Baijuep, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response