When i provisioned this service in my farm, I started noticing ULS logging for the following:
Failed to Sql Query data XEvent collector on sqldbserver. The error is Object reference not set to an instance of an object.
There was also an event in the system logs ID: 3759 that stated:
Database ‘Master’ on SQL Server instance ‘sqldbserver’ is not empty and does not match current database schema.
The instance 'sqldbserver' is an alias that points to my sql cluster using the hosts file on the system.
I worked with my SQL admin on the problem and we tried small elevations to the permission for my farm account which is running the usage and health data collection service, nothing resolved the problem, Account was set to dbcreator and security admin.
So he ended up giving me sysadmin permissions on the account and i removed then reprovisioned the service with that level of permissions...when i did there was no problems, uls logs were clear and there were no events in the system log.
I gave him the all clear and he removed the sysadmin role from the farm account and the problem came back but with some new ULS reporting...
Creating SQL trace on sqldbserver
Failed to get legacy traces, You do not have permission to run 'SYS.TRACES'.
Failed to check usage db server You do not have permission to run 'SP_TRACE_CREATE'.
Failed to Sql Query data XEvent collector on sqldbserver. The error is Object reference not set to an instance of an object.
So my question is, all i see on the planning guides for SQL accounts in sharepoint is the farm needs dbcreator and security admin to SQL and that's what my account is set to on the farm, why is it needing sysadmin roles to work properly...is this by design?
Should my farm account be set to the default database of "master" under the login properties for the account?
Also under user mappings for the account...should i have any roles to the 'master'db...currently it is just public access for the account.
I don't think i would have to set any of these settings manually.