Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Honored Contributor.. Tom Meier Honored Contributor..
Honored Contributor..
251 views

DB Query Monitor Problem with MS SQL 2012 Server

Jump to solution

Hi all,

I’m using a DB Query Monitor for checking blocking-ID on a SQL 2005 Server.

This query worked fine till we changed to SQL 2012 Server.

 

I could connect to the DB and also could query some tables.

 

But to get the blocking ID I have to query sys.dm_os_waiting_tasks.

 

On this view I get the error:

Step 4: Attempting to Execute Query... Statement created. ***ERROR***: The supplied Query will not execute because it is either invalid, the table does not exist or some of the columns do not exist.

 

But within SQL-Manager I get the same result as on SQL 2005.

 

Here the query I use:

select session_id, wait_duration_ms, wait_type, blocking_session_id from sys.dm_os_waiting_tasks where blocking_session_id <> 0

 

Database driver:

com.microsoft.sqlserver.jdbc.SQLServerDriver

 

 

I also already tried to change the jdbc driver version.

I tried sqljdbc4.jar; sqljdbc41.jar and sqljdbc42.jar

Any idea how to solve the problem?

 

Many thanks in advanced

Tom

0 Likes
1 Solution

Accepted Solutions
Honored Contributor.. Tom Meier Honored Contributor..
Honored Contributor..

Re: DB Query Monitor Problem with MS SQL 2012 Server

Jump to solution

Hi all,

now I got the solution! ( grant SiteScope User "view server state" on SQL Server )

You are right with permissions. I tried the query in SQL management studio with our sitescope user and got

permission denied on some tables but not all.

Then I found this:

https://social.msdn.microsoft.com/Forums/en-US/3cde0fbd-cc65-4d72-aa40-68e5e0a182f2/297-error-in-sql-server?forum=sqlgetstarted

and then I grant to our sitescope user the permission "view server state" and the sitescope monitor works fine!

many thanks

 

Tom

0 Likes
3 Replies
Absent Member.. Mauricio_M_SIS Absent Member..
Absent Member..

Re: DB Query Monitor Problem with MS SQL 2012 Server

Jump to solution

Hello Tom

Could we please try the following: 

Use the SiteScope Database Connection tool, and post the output of the test.  

Try to use third party drivers . 

Also, are you using a Custom Database Monitor or the SQL server monitor? 

Mauricio Fernandez | SW Support Engineer

SiteScope

Mail: mauricio.fernandez.villegas@hpe.com

0 Likes
JamesII Honored Contributor.
Honored Contributor.

Re: DB Query Monitor Problem with MS SQL 2012 Server

Jump to solution

What about permissions?  What account are you using in SiteScope to run the query?  Are you using the same account in SQL-Manager?  Have you tried the jdbc:mercury:sqlserver driver?

0 Likes
Honored Contributor.. Tom Meier Honored Contributor..
Honored Contributor..

Re: DB Query Monitor Problem with MS SQL 2012 Server

Jump to solution

Hi all,

now I got the solution! ( grant SiteScope User "view server state" on SQL Server )

You are right with permissions. I tried the query in SQL management studio with our sitescope user and got

permission denied on some tables but not all.

Then I found this:

https://social.msdn.microsoft.com/Forums/en-US/3cde0fbd-cc65-4d72-aa40-68e5e0a182f2/297-error-in-sql-server?forum=sqlgetstarted

and then I grant to our sitescope user the permission "view server state" and the sitescope monitor works fine!

many thanks

 

Tom

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.