There is a new setup process for the Inspector, below we have outlined the steps required to get you started.
- Grab a copy of SQLUndercoverinspectorV1.sql from GitHub
- Run the setup script in the context of your logging database
- You have now created the Inspector schema and InspectorSetup stored procedure in your logging database, the messages tab will look like the below.
- If you are ready to upgrade/Install now, copy the contents of the messages tab and paste into to a query window, these are a bunch of default values but change them as you please, optional Parameters will be ignored when @InitialSetup = 0. For more details regarding individual Parameter settings during setup our Getting started with the SQLUndercover Inspector guide is still relevant for this.
- Forgot to copy and paste the example procedure call? not to worry just run the following code for an example procedure call.
EXEC [Inspector].[InspectorSetup] @Help = 1
- When you are ready execute the InspectorSetup procedure, this procedure will create all Tables, Indexes, Procedures, Views and agent jobs required by the Inspector.
Do not worry if you forgot to set @InitialSetup for your first install, we added code to validate this setting during execution where it gets changed to a 1 if required.
Upgrading from V1 or V1.1?
Nothing more you need to do.
Installing for the first time?
You should now have a bunch of new tables and stored procedures in your logging database and four new SQL Agent jobs with no schedules.
Set schedules for your jobs and that’s it!
I would recommend setting the Collection jobs to run approx 5-10 minutes before the Report jobs to allow sufficient time for the collections to run.
To give it a test kick off the agent job ‘SQLUndercover Inspector Data Collection’ (for all servers if using linked servers) once complete start ‘SQLUndercover Inspector Report’ , if you are using linked servers then this will only produce the report on the target of the linked server.
If you set an email address during the setup or directly in the settings table then you will be receiving an email shortly with the report (make sure you are on the target of your linked server if using linked servers otherwise you won’t be receiving a report). If you didn’t set an email during setup or set in the Inspector.Settings table then you will find the html code stored in the table Inspector.ReportData.