olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 756 forks source link

LogToTable in different database intead of Master #525

Closed celiocf1981 closed 2 years ago

celiocf1981 commented 3 years ago

First let me tell you that your maintenance solution is awesome and i really like.

A very important feature to me is the ability to log all process in a table where i can analyses later the performance and look for improvements. But i think use Master database (system db) as repository is not so good, i prefer to create a new user database and save all logs, store procedures and etc over there.

So is it possible to create a variable in the procedures to the "@LogToTable" in a database that i point ?

Thanks again.

Jonathan-Quilter commented 3 years ago

check the details here - https://ola.hallengren.com/frequently-asked-questions.html

olahallengren commented 2 years ago

You can create the log table and the stored procedures in any database (but the log table and the stored procedures have to be in the same database).