{"id":693,"date":"2010-10-11T16:03:16","date_gmt":"2010-10-11T23:03:16","guid":{"rendered":"http:\/\/45.63.48.66\/?p=693"},"modified":"2019-05-02T14:52:19","modified_gmt":"2019-05-02T21:52:19","slug":"sql-script-to-create-sa-super-user-in-dynamics-nav","status":"publish","type":"post","link":"https:\/\/gotcal.com\/index.php\/2010\/10\/sql-script-to-create-sa-super-user-in-dynamics-nav\/","title":{"rendered":"SQL script to create SA Super User in Dynamics NAV"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-697\" title=\"superman\" src=\"\/wp-content\/uploads\/2010\/10\/superman1.jpg\" alt=\"\" width=\"221\" height=\"158\">Restoring SQL backups from customers is a easy process in SQL Server. But in order to standardize your logins for the databases, it is easier if all databases have the same database login.<\/p>\n<p>So after restoring your SQL backup, this little script inserts a SA user in the User table, and assigns SUPER permissions to it. No black magic to it, just two simple SQL insert statements.<\/p>\n<p><!--more--><\/p>\n<p>The only issue to take care of is creating a &#8220;0D&#8221; (NAV blank date) in the SQL table, this is done with the SQL date 1753\/01\/01.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nINSERT INTO &#x5B;dbo].&#x5B;User]\n(&#x5B;User ID]\n,&#x5B;Password]\n,&#x5B;Name]\n,&#x5B;Expiration Date])\nVALUES\n('SA',\n'',\n'',\n'1753-01-01')\n\nINSERT INTO &#x5B;dbo].&#x5B;Member Of]\n(&#x5B;User ID]\n,&#x5B;Role ID]\n,&#x5B;Company])\nVALUES\n('SA',\n'SUPER',\n'')\nGO\n<\/pre>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Restoring SQL backups from customers is a easy process in SQL Server. But in order to standardize your logins for the databases, it is easier if all databases have the same database login. So after restoring your SQL backup, this little script inserts a SA user in the User table, and assigns SUPER permissions to [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[27,33,21],"class_list":["post-693","post","type-post","status-publish","format-standard","hentry","category-navision","tag-how-to","tag-script","tag-sql"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/posts\/693","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/comments?post=693"}],"version-history":[{"count":10,"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/posts\/693\/revisions"}],"predecessor-version":[{"id":1024,"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/posts\/693\/revisions\/1024"}],"wp:attachment":[{"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/media?parent=693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/categories?post=693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gotcal.com\/index.php\/wp-json\/wp\/v2\/tags?post=693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}