How to access NAV 2018 database with RTC if you do not have user account set up?

This question has arisen for earlier versions many times, and as many times it has been answered as well. In the old times it was easy enough, just delete contents of some tables and voilá, you are in. After three-tier architecture things got a tad bit more difficult.

My answer has been for a long time to use a T-SQL script to add my AD account to all relevant NAV tables so I can just start the RTC client and start using the new database conveniently.

The original script is stolen from Anonymous commenter in Waldo's blog, and during the years I have added all the new fields that have been added to different user related tables during the years. I have also improved its functionality somewhat, so now it is safe to run multiple times without problems.

Please find the script attached to this blog.

 

//Edit 2017-12-28: added tags. Added script to use SQL2015 and later command SUSER_SID to get User SID//

Comment List
Anonymous
Related
Recommended