Answered by:
SQL Management Pack - login to databases required?

Question
-
I've recently imported the SQL Management Packs (version 6.5.4.0) and discovery has been working fine - Databases are being discovered and displayed in the Databases view in the SCOM console. On one of the 2012R2 SQL servers, I noticed these errors in the OpsMgr Event Log (see below)
The information that the MP needs for the Database properties (DB Free space, source log shipping, etc.) seems like it could be achieved without having to login to each individual database. Is there a reason why the SQL MP requires this type of intrusive mechanism for querying information? Is there a way to disable these login scripts but still obtain the information about databases?
Thursday, February 26, 2015 6:27 PM
Answers
-
You can find the content of the monitoring script here http://systemcentercore.com/?GetElement=Microsoft.SQLServer.2012.DBSizeRawPerfProvider&Type=DataSourceModuleType&ManagementPack=Microsoft.SQLServer.2012.Monitoring&Version=6.5.1.0
I don't have toroughly reviewed it, but if you do you'll probably find how it works and why it needs to log into every database.
Now, if you do believe that you can obtain the same informations using WMI and without logging into the DBs, you'll have to disable every monitor that tries to connect into them and write your own ones...
- Proposed as answer by LeroyJenkinsB Monday, March 2, 2015 3:45 PM
- Unproposed as answer by LeroyJenkinsB Monday, March 2, 2015 3:46 PM
- Marked as answer by Yan Li_ Thursday, March 5, 2015 1:53 AM
Thursday, February 26, 2015 6:48 PM
All replies
-
This is because with SQL 2012, local system and local admins are not automatically SQL instances admins anymore.
You can read more here : http://blogs.technet.com/b/kevinholman/archive/2010/09/08/configuring-run-as-accounts-and-profiles-in-r2-a-sql-management-pack-example.aspx
Thursday, February 26, 2015 6:35 PM -
Thanks for the link, and I've been over that blog post quite a few times now.
But my original question - why does the MP need to log in to each database to get information? My DBA thinks this might be too intrusive, and other 3rd party tools are available to get that information without logging into each db. Even WMI queries could get that information.
Do you or does anyone know why this is needed in the first place?
Thursday, February 26, 2015 6:39 PM -
You can find the content of the monitoring script here http://systemcentercore.com/?GetElement=Microsoft.SQLServer.2012.DBSizeRawPerfProvider&Type=DataSourceModuleType&ManagementPack=Microsoft.SQLServer.2012.Monitoring&Version=6.5.1.0
I don't have toroughly reviewed it, but if you do you'll probably find how it works and why it needs to log into every database.
Now, if you do believe that you can obtain the same informations using WMI and without logging into the DBs, you'll have to disable every monitor that tries to connect into them and write your own ones...
- Proposed as answer by LeroyJenkinsB Monday, March 2, 2015 3:45 PM
- Unproposed as answer by LeroyJenkinsB Monday, March 2, 2015 3:46 PM
- Marked as answer by Yan Li_ Thursday, March 5, 2015 1:53 AM
Thursday, February 26, 2015 6:48 PM -
SQL Management Pack required action account that has permission of login to database.
Required login to database to can monitor database and tables and show any issue in sql.
Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"Mai Ali | My blog: Technical | Twitter: Mai Ali
Thursday, February 26, 2015 10:49 PM -
Hi,
As well, this SCU session could be helpful:
Natalya
### If my post helped you, please take a moment to Vote as Helpful and\or Mark as an Answer
- Edited by Natalya Vank Friday, February 27, 2015 3:55 AM
Friday, February 27, 2015 3:54 AM