+44(0)1908738254
YOUR EXPERT RPA PARTNER

Team up with our RPA strategy and tech specialists for maximum automation impact

Find out more
Harness the power of UiPath in your business.
WATCH NOW

Save money and spend more time on priority work.

Book consultation
READY, SET, AUTOMATE

Let's choose, design and deploy a process automation solution for your business.

Find out more
TRANSFORM YOUR BUSINESS

Let's analyse your business to discover opportunities for innovation and automation.

Find out more

Begin your business transformation journey

Book consultation
AUTOMATE EVERY FUNCTION

Automate where it matters most. Scale to solve challenges in every area

Find out more
GIVE EVERY TEAM THE TOOLS FOR SUCCESS

Equip people with user-friendly solutions that save time and make work easier

Find out more

Which business problem
can we solve first?

Book consultation
17 May 2015

SQL User Impersonation with K2

SQL User Impersonation with K2

SQL Server impersonation, or context switching, is a means to allow K2 to assume the permissions of a given user or login when executing your SQL queries. Under the covers this functionality makes use of K2 Pass-through Authentication.

To enable SQL Server impersonation you first need to register the SQL server service instance, by right-clicking on the ‘SQL Server Service’ in the ServiceObject Explorer, and then select ‘Impersonate as your Authentication Mode, as indicated in the screenshots below:

1 Register a new SQL Server Service Instance in K2

1 Register a new SQL Server Service Instance in K2

K2 Automated Testing Software

BenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.

 

Free K2 Five Upgrade Review

sql user impersonation with k2

2 Set SQL Server Service Instance to Impersonate in K2

For this functionality to work you then need to create a database user in the specific database, and then grant the K2 Service Account impersonation rights on the login you created. the following SQL accomplishes this.

3 Grant SQL Impersonation rights

3 Grant SQL Impersonation rights

Note that although you can grant login’s to the database on a windows group level, impersonation rights need to be giving for each specific user, and will not work on a group level.

Read more about K2 and creating business applications

Need further technical advice or support?