On the SQL server I want to monitor via AppInsight, I am supposed to run the following script to setup permissions. So I Opened MSQLS Management Studio, connected to the database (Sharepoint 2010, SQL 2008) and clicked "New Query" pasted the script and hit Execute. Nothing I have tweeked or changed has improved the outcome, any suggestions?
USE master
GRANT VIEW SERVER STATE TO AppInsightUser
GRANT VIEW ANY DEFINITION TO AppInsightUser
EXEC sp_adduser @loginame = 'AppInsightUser' ,@name_in_
db = 'AppInsightUser'
GRANT EXECUTE ON xp_readerrorlog TO AppInsightUser
USE msdb
EXEC sp_adduser @loginame = 'AppInsightUser' ,@name_in_
db = 'AppInsightUser'
EXEC sp_addrolemember N'db_datareader',
N'AppInsightUser'
EXECUTE sp_MSforeachdb 'USE [?]; EXEC sp_adduser
@loginame = ''AppInsightUser'', @name_in_db =
''AppInsightUser'''
THE FIRST TWO LINES OF THE ERROR:
Msg 15151, Level 16, State 1, Line 2
Cannot find the login 'AppInsightUser', because it does not exist or you do not have permission.
You must connect to the SQL database server as "sa" or equivalent to create this new user account. This script assumes you have adequate permissions to create a new user account and assign appropriate permissions. Running the SQL query is not required if you prefer to manually assign the appropriate permissions or use an "sa" or account with equivalent privileges.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.