OLA Maintenance Jobs implementation

  • Dear all,

    I am implementing the OLA Maintenance jobs (two of them - Integrity check and index defrag).

    I am in the stage of creating the jobs. I have one question: Is it better to execute the checkintegrity before the index defrag or after?

    Thank you

  • Maybe after, so that all your index pages are nice and orderly for DBCC CHECKDB to read.  Not sure it makes all that much difference, though.

    John

  • Thanks. One more question.

    I have created a job to execute the OLA checkintegrity as per above. Now, when I try to execute I get this error:

    ate  06.11.2017 14:35:58
    Log  Job History (100 - Daily Databases Integrity Check of all databases)

    Step ID  1
    Server  ......
    Job Name  100 - Daily Databases Integrity Check of all databases
    Step Name  CheckDB
    Duration  00:00:00
    Sql Severity 16
    Sql Message ID 50000
    Operator Emailed 
    Operator Net sent 
    Operator Paged 
    Retries Attempted 0

    Message
    Executed as user: dbo. Date and time: 2017-11-06 14:35:58  Server: SW.......  Version: 13.0.4001.0  Edition: Standard Edition (64-bit)  Procedure: [ServerStats].[dbo].[DatabaseIntegrityCheck]  Parameters: @databases = 'USER_DATABASES', @CheckCommands = 'CHECKDB', @PhysicalOnly = 'N', @NoIndex = 'N', @ExtendedLogicalChecks = 'N', @TabLock = 'N', @FileGroups = NULL, @Objects = NULL, @MaxDOP = NULL, @AvailabilityGroups = NULL, @AvailabilityGroupReplicas = 'ALL', @Updateability = 'ALL', @LockTimeout = NULL, @LogToTable = 'Y', @Execute = 'Y'  Source: https://ola.hallengren.com [SQLSTATE 01000] (Message 50000)  The module being executed is not trusted. Either the owner of the database of the module needs to be granted authenticate permission, or the module needs to be digitally signed. [SQLSTATE 42000] (Error 15562)  The module being executed is not trusted. Either the owner of the database of the module needs to be granted authenticate permission, or the module needs to be digitally signed. [SQLSTATE 42000] (Error 15562)  Date and time: 2017-11-06 14:35:58 [SQLSTATE 01000] (Message 50000).  The step failed.

    It says :The module being executed is not trusted. Either the owner of the database of the module needs to be granted authenticate permission, or the module needs to be digitally signed. [SQLSTATE 42000] (Error 15562)

    But if I execute the procedure by my self (so, out of the job) it works ok. Can sameone help?

    Thank you

  • When you run the procedure yourself, it runs as you.  When you run it as part of a job, it runs as the SQL Server Agent service account or whatever proxy account you have set up for jobs.  Therefore there must be a difference between the permissions you have and those of the SQL Server or proxy account.  Have a look at this - does it help?

    John

  • Sorry , My bad. I was using the wrong user. Thank you

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply