Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Query usage statistics

Former Member
0 Likes
2,348

Hi,

I don't know if this is the right place to post this but here goes.

In ST03N I've looked at the usage of transactions etc. to try and find the most commonly run queries defined in SQ01.

It tells me how often transaction SQ01/2 have run, but not what query was executed. Is this possible anywhere else?

Cheers,

Russ.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,871

You can use the transaction SM20N to check the query that is being used.

Prior to that you need to make the necessary config in SM19. Check the forums for further details.

BR,

Suhas

PS: If you have the necessary authorizations configuration using SM19 should be a piece of cake.

7 REPLIES 7
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,872

You can use the transaction SM20N to check the query that is being used.

Prior to that you need to make the necessary config in SM19. Check the forums for further details.

BR,

Suhas

PS: If you have the necessary authorizations configuration using SM19 should be a piece of cake.

Read only

Former Member
0 Likes
1,871

Thanks for the info.

Unfortunately I'm only interested in historical queries that have run. Is there no table or transaction that can just say Query - Date - Runby ?

Cheers,

Russ.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,871

>

> Unfortunately I'm only interested in historical queries that have run. Is there no table or transaction that can just say Query - Date - Runby ?

Hi Russ,

Frankly i don't understand what you mean by "historical queries". From your original post i understand you need to check the queries which were run using SQ01.

If the Audit profile was activated in your system (SM19), the query calls would have been registered in the system. AFAIK the audit log is a file in the SAP app server & not stored in some DB table. Guys, correct me if i am wrong.

BR,

Suhas

Read only

Former Member
0 Likes
1,871

Hi,

Yes you did understand me correctly - by historical queries I meant queries that have been run prior to the logging being set up in SM19.

I still can't see however how this transaction can tell me the most commonly run Queries!?

I did find SPRO -> SAP Netweaver -> Application Server -> SAP Query -> Logging -> Determine Infosets for logging which I believe would give me what I'm looking for!?

Cheers,

Russ.

Read only

0 Likes
1,871

Try table D010LINF, it stores history of programs run in past.

Read only

Former Member
0 Likes
1,871

Thanks, but that only seems to be last run date.

Read only

0 Likes
1,871

It isn't even that, it's the timestamp of the last generation of the source code.

Thomas