Arunhclite Super Contributor.
Super Contributor.
469 views

Need to view the SQL Query used in SQL policies

Jump to solution

Hi,

Is it possible to view the screipts/Queries which executes the polices to fetch data.?

More precisely , need to check on the SQL query/script used in a SQL Job monitor policy. 

Where can I locate it? Can I edit and update the script?

 

Kindly update me.

HP OMi 10.10

MSSQL management Pack 1.01

 

Thanks,
Arunkumar.K

0 Likes
1 Solution

Accepted Solutions
Acclaimed Contributor.. KAKA_2 Acclaimed Contributor..
Acclaimed Contributor..

Re: Need to view the SQL Query used in SQL policies

Jump to solution

in MP, filter are set using parameters. you can apply parameter on aspect level or on policy level. for metric 3216, filter parameter is: "Transaction Log Space Used Filter"

"name not ........." (it is actually a where clause of a normal sql query)

filter_parameter.png

HTH

-KAKA-

6 Replies
Acclaimed Contributor.. KAKA_2 Acclaimed Contributor..
Acclaimed Contributor..

Re: Need to view the SQL Query used in SQL policies

Jump to solution

Check the instrumentation folder on local node. for job monitoring i guess it uses dbspi_all_job_status.sql or dbspi_active_job_status.sql but i am not sure.

to make sure, i would enable trace for the metric in which you are interested and then in this trace file you will see the query executed to collect the data.

HTH
-KAKA-

0 Likes
Arunhclite Super Contributor.
Super Contributor.

Re: Need to view the SQL Query used in SQL policies

Jump to solution

Hi Kaka,

 

Thanks for the response.

Found these 2 files dbspi_all_job_status.sql or dbspi_active_job_status.sql . So if this is the query which gets executes by the policy, can we uopdate it to fetch only few specific jobs?

Also kindly let me know the steps to enable  trace and check the data.

 

Thanks,

Arunkumar.K

 

0 Likes
Acclaimed Contributor.. KAKA_2 Acclaimed Contributor..
Acclaimed Contributor..

Re: Need to view the SQL Query used in SQL policies

Jump to solution

I would not recommend you to change any query directly. if your requirement is just to monitor few specific jobs then you should use FILTERS.

how to create filter or enable trace i would suggest you to read out old SPI documents (i have attached one). MP documents are not well written and provide no much information on these topics.

HTH
-KAKA-

0 Likes
Highlighted
Arunhclite Super Contributor.
Super Contributor.

Re: Need to view the SQL Query used in SQL policies

Jump to solution

Hi Kaka,

 

Thanks for the response. Checked the document it has been mentioned to apply th filters in Tools → DB-SPI → Admin   in the Database Configuration Manager.

But I couldn't find that option in OMi (10.12).

Moreover I raised a case with HP, they have shared a document, where it has mentioned what needs to added to include filter as below.

MSSQLServer_3216 Transaction Log Space Used Filter Filter database object. Mention instance name to skip. Ex: instance_name not in ('master', 'pubs')

 

But there is no clear instructions where to apply and how to apply.

Kindly let me know where to apply these filters and how to apply these filters for MSSQL monigtors.

 

Thanks,
Arunkuamr.K

0 Likes
Acclaimed Contributor.. KAKA_2 Acclaimed Contributor..
Acclaimed Contributor..

Re: Need to view the SQL Query used in SQL policies

Jump to solution

in MP, filter are set using parameters. you can apply parameter on aspect level or on policy level. for metric 3216, filter parameter is: "Transaction Log Space Used Filter"

"name not ........." (it is actually a where clause of a normal sql query)

filter_parameter.png

HTH

-KAKA-

Outstanding Contributor.. Mayur_Khardikar Outstanding Contributor..
Outstanding Contributor..

Re: Need to view the SQL Query used in SQL policies

Jump to solution

You should make use of UDM feature to configure custom queries in MP.

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.