Reputation: 11972
Using SQL Server 2000
I want to take the database backup at application running time.
In my application i have database backup option, when i click the button it has to take the database backup upto current time.
How to make a query for taking the database backup
Need Query Help
Upvotes: 0
Views: 205
Reputation: 1120
Also, you can choose what type of backup (full, differential, log) you need to perform with the "Backup database..." command.
Examples:
Full backup:
BACKUP DATABASE "database_name" TO DISK = 'D:\backupDatabase-Full.bak' GO
Differential backup:
BACKUP DATABASE "database_name" TO DISK = 'D:\backupDatabase-Diff.bak' WITH DIFFERENTIAL GO
Upvotes: 0
Reputation: 11
Personally, I recommend todo backup for price. it offers comprehensiv backup solution for SQL server/ Exchange server. for more information, you can go its website.
Upvotes: 1
Reputation: 2666
use BACKUP DATABASE statement, for example:
BACKUP DATABASE myDatabase -- myDatabase is your database name
TO DISK='d:\backup\myDatabase.bak' -- this is the path to backup
Upvotes: 2
Reputation: 44595
Usually a statement like BACKUP DATABASE databasename does the trick but check Sql server help for info about all options and parameters like backup location, mode, compression etc...
Upvotes: 0