SQL script to create SA Super User in Dynamics NAV
Community Member
Microsoft Employee
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 it. No black magic to it, just two simple SQL insert statements.
The only issue to take care of is creating a “0D” (NAV blank date) in the SQL table, this is done with the SQL date 1753/01/01.
INSERT INTO [dbo].[User] ([User ID] ,[Password] ,[Name] ,[Expiration Date]) VALUES ('SA', '', '', '1753-01-01') INSERT INTO [dbo].[Member Of] ([User ID] ,[Role ID] ,[Company]) VALUES ('SA', 'SUPER', '') GO
This was originally posted here.
*This post is locked for comments