hiii..
I have a mysql database. I want to take backup of database programatically in asp.net. Is is possible??? How???
Plz help me
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ankit ShuklaRank #2,120 · 672 reputationPosted Aug 1, 2015, 3:58 AM EDT
Raja TRank #685 · 3.5K reputationPosted Aug 1, 2015, 4:02 AM EDT
https://mysqlbackupnet.codeplex.com/
http://www.codeproject.com/Articles/256466/MySqlBackup-NET
http://www.dotnetspider.com/resources/19537-MySQL-Database-Backup-Restore-from-C-NET.aspx
Ghanshyam Baravaliya137 reputationPosted Aug 1, 2015, 4:49 AM EDT
AS
BEGIN
DECLARE @BackupSQLScript nvarchar(max)
DECLARE @SQLBackupFileName nvarchar(400)
DECLARE @DatabaseName sysname
DECLARE @SQLBackupFolder nvarchar(400)
SET @DatabaseName = 'DB'
SET @SQLBackupFolder = 'C:\'
SET @SQLBackupFileName = @DatabaseName +'-'+REPLACE(REPLACE(Convert(VARCHAR,GETDATE()),' ','-'),':','-')+ '.bak'
SET @BackupSQLScript = '
BACKUP DATABASE [' + @DatabaseName + ']
TO DISK = ''' + @SQLBackupFolder + @SQLBackupFileName + ''' WITH INIT'
print @BackupSQLScript
EXEC sp_executesql @BackupSQLScript
Abhay ShankerRank #375 · 6.7K reputationPosted Aug 1, 2015, 6:53 AM EDT