hai,
i want to get database backup and restore in sql server 2008 r2 by using asp.net c#
can any one help to get it plzzzzzzzz
I want to get database backup and restore sql server2008r2
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 3, 2013, 4:11 AM EDT
as asp.net is web technology and you will accesses it from remote location.
sql server will create back up in its installed system. if you try to backup the database from remote location it will not create backup in your system but it will create it where sql server is installed.
if you are running application in local system then it will work.
Better to do it in Windows form application.
srujana thallam67 reputationPosted Sep 3, 2013, 6:34 AM EDT
I thnk this is help ful for BackUp DataBase.
DataBase BackUp
----------------
BACKUP DATABASE [DataBaseName]
TO DISK = 'Full path of your storingFolderLocation'
ForExample:
BACKUP DATABASE [PikeStorm]
TO DISK = 'D:\Backup\PikeStorm.bak'
if you want to call this in programatically
Just place it into a stored procedure, and call it from ASP.NET web pages
just as calling an ordinary SP
CREATE PROCEDURE [dbo].[DB_BackUp]
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
BACKUP DATABASE [PikeStorm]
TO DISK = 'D:\Backup\PikeStorm.bak'
END