Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (30 sloc) 756 Bytes
USE msdb;
GO
SELECT
j.name,
s.step_name,
s.step_id,
s.command
FROM
dbo.sysjobs j
JOIN dbo.sysjobsteps s ON s.job_id = j.job_id
WHERE
j.name = 'DatabaseBackup - USER_DATABASES - FULL';
GO
DECLARE
@Directory NVARCHAR(100) = '/home/corread',
@SQL NVARCHAR(MAX);
SET @SQL
= N' EXECUTE [dbo].[DatabaseBackup]
@Databases = ''USER_DATABASES'',
@Directory = ''' + @Directory
+ N''',
@BackupType = ''FULL'',
@Verify = ''Y'',
@CleanupTime = NULL,
@CheckSum = ''Y'',
@LogToTable = ''Y''';
EXEC dbo.sp_update_jobstep
@job_name = 'DatabaseBackup - USER_DATABASES - FULL',
@step_id = 1,
@command = @SQL;
You can’t perform that action at this time.