Good Morning Abhi_patil
That is Simple , Sometimes in order to solve a problem you need to break it into smaller problems. First you need to know how you create a Backup in SQl , and this is how its done
-- backup a database
create PROCEDURE [dbo].[sp_BackupDatabase]
set nocount on
declare @sql varchar(4000)
select @sql = 'BACKUP DATABASE ' + ltrim(rtrim( @databasename ))
select @sql = @sql + ' TO DISK = ''' + ltrim(rtrim(@path)) + ltrim(rtrim(@filename)) + ''' '
select @sql = @sql + ' WITH INIT'
execute ( @sql )
select 'Database successfully backed up!' [Result]
and this Accepts
The First Parameter is the Database you want to Backup and the Second parameter is the Path where you want you database backup to be stored and the last part is the name given to the backup.
and in C# you will call this sp as others.
Simple nee :)
Thank you for posting at Dotnetfunda
Vuyiswa MasekoAbhi_patil, if this helps please login to Mark As Answer. | Alert Moderator