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.
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.
Abhay ShankerPosted Aug 1, 2015, 10:53 AM
Ghanshyam BaravaliyaPosted Aug 1, 2015, 8:49 AM
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
Raja TPosted Aug 1, 2015, 8:02 AM
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
Ankit ShuklaPosted Aug 1, 2015, 7:58 AM