Add my Windows login to the database from SQL

poppinspoppins Member Posts: 647
Hi everyone,
I have restored a .bak file for a NAV 2009 SP1 database.
When I tried to access the database, I couldn't make it.
What shall I do to log in?How can I add my Windows login to the database from SQL?
Thanks in advance :)

Answers

  • krikikriki Member, Moderator Posts: 9,112
    You can do that but you need to know your SID.

    It is easier to just delete all records from the security tables.

    NAV2013:
    delete FROM [dbo].[Access Control]
    delete FROM [dbo].[User]
    delete FROM [dbo].[User Property]
    
    delete from dbo.[User Personalization]
    delete from dbo.[User Metadata]
    

    PRE-NAV2013:
    delete from dbo.[Member Of];
    delete from dbo.[User];
    delete from dbo.[Windows Access Control];
    delete from dbo.[Windows Login];
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • poppinspoppins Member Posts: 647
    Thanks a lot :mrgreen:
Sign In or Register to comment.