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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
srujana thallamPosted Sep 3, 2013, 10:34 AM
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
Sanjeeb LenkaPosted Sep 3, 2013, 8:11 AM
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.