July 24, 2017 at 2:33 am
Hello All,
I implemented the maintenance solution by Ola Hallengren in order to maintain my SQL Server.
I noticed that the jobs created as SQL Server Agent CmdExec which means that the script on the jobs wrote in one line (it's a must and i can't make any spaces) and with many parameters that related to SQLCMD:
sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d master -Q "EXECUTE dbo.DatabaseBackup @databases = 'USER_DATABASES', @Directory = 'C:\Backup', @BackupType = 'FULL'" -b
instead of create as T-sql script and be more user friendly:
EXECUTE dbo.DatabaseBackup
@databases = 'USER_DATABASES',
@Directory = 'C:\Backup',
@BackupType = 'FULL'
Is there a reason for that? what are the pros\cons that it create in CmdExec ?
Is there any way to automatically create the jobs as T-sql script so they will be more user friendly?
Thanks in advance!
July 24, 2017 at 2:50 am
Yes, I noticed that as well. It disturbs me a little, too. I suppose only Ola knows the reason for it. I have been known to go through the jobs and put the parameters on separate lines. It's not a hugely onerous task, so I don't mind doing it for the sake of neatness.
John
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply