ISSUE

In K2 Workspace > Management Console > SmartObjects > Services > SQL Server Service: Impersonation for the List method does not function correctly.

  1. Log in with a username that has rights to a SQL database.
  2. Register a SQL Server Service Instance for that database.
  3. Register the instance with the Impersonate checkbox set to true.
  4. Create a SmartObject for the service instance and test it.
  5. When executing the List method, the following error occurs: "Domain\K2 Service Account" does not have access to the database.

WORKAROUND

For this issue to work correctly, it is required that the “Use Native SQL Execution” flag is set to false on the Service Instance Configuration screen:


Fig 1.0 Service Instance Configuration

How “Use Native SQL Execution” works on the Service Instance Configuration screen:

  1. If the flag “Use Native SQL Execution” is set to true, and Impersonate checkbox is selected the performance will be optimal and the K2 Service Account will be used on that database. 
  2. If the flag “Use Native SQL Execution” is set to false, and Impersonate checkbox is selected the performance will be impacted and user specific rights need to be set on that database.