In K2 Workspace > Management Console > SmartObjects > Services > SQL Server Service: Impersonation for the List method does not function correctly.
- Log in with a username that has rights to a SQL database.
- Register a SQL Server Service Instance for that database.
- Register the instance with the Impersonate checkbox set to true.
- Create a SmartObject for the service instance and test it.
- When executing the List method, the following error occurs: "Domain\K2 Service Account" does not have access to the database.
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:
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.
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.