Backing up a SQL Server 2000 database through VB.NET 2005

Tags:
Backup
SQL Server 2000
VB .NET
VB.NET 2005
How might I backup a SQL Server 2000 database through VB.NET 2005?

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’m not sure why you would want to do this. You would be better setting up a schedule on SQL Server to run backup when required. If it is to respond to an event you could set up an alert to carry out a backup in SQL Server. However if it is really necessary – create a stored procedure to backup the database then call the procedure using SqlHelper.ExecuteNonQuery(DBConnectionString, “BackUpProcedureName”

the stored procedure would be something like:

USE Master
GO

SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE PROCEDURE [dbo].[BackUpProcedureName]

AS
BACKUP DATABASE [DBName]
TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Test\DB_Test_backup_200807130000.bak'
WITH NOFORMAT, NOINIT,
NAME = N'DB_Test-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following