000025873 - How to enable SQL Statement tracing in SQL Server?

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000025873
Applies ToRSA Key Manager Server
IssueHow to enable SQL Statement tracing in SQL Server?
SQL Server statement tracing
Resolution

For RSA Key Manager 2.0.x

If you need to look at the SQL statements generated by Key Manager Server, use SQL Server Profiler.

Start Microsoft SQL Server SQL Profiler
Create a new trace
Click on the "Event Selection" tab
Check "Show all columns"
Select the event "Stored procedure -> RPC:Completed" and select only the columns "TextData", "DatabaseName" and "StartTime".
Click on "Column filters"
Select "DatabaseName"
Expand 'Like' and type (with no quote)
   "kmsDataStore" for 2.0.x Key Manager Server
   "RKM" for 2.1.x Key Manager Server
Select "TextData"
Expand 'Like' and type (with no quote)
   "declare%"
Click Ok
Click Run

Now all requests to the database will be logged. Use the pause and clear buttons to manage the trace.

If you have to view only GetKeyByID requests, use the following TextData Filter if you are using RKM Server 2.0.x:
  declare%FROM CryptoKeys, Ciphers, KeyClass, ApplicationGroup WHERE CryptoKeys.keyClass = @P0  AND CryptoKeys.keyID = @P1%


For RSA Key Manager 2.7

Start Microsoft SQL Server SQL Profiler
Create a new trace
Click on the "Event Selection" tab
Check "Show all columns"
Select the event "Stored procedure -> RPC:Completed" and select only the columns "TextData", "DatabaseName" and "SPID".
Click on "Column filters"
Select "DatabaseName"
Expand 'Like' and type (with no quote)
   "RKM"
Select "TextData"
Expand 'Like' and type (with no quote)
   "declare%"
Click Ok
Click Run

Legacy Article IDa38750

Attachments

    Outcomes