Add user thru SQL

Johan_007Johan_007 Member Posts: 53
Hi all, i have been accidently locked, deleted my user name, out my clients DB. Can i add my user name and password thru sql :?: :-k :-k

i know it might cause issues but i dont feel like going thru all the troubles of backing up on on of their pcs and recreating the DB.

Answers

  • DenSterDenSter Member Posts: 8,305
    Did you accidentally remove the user from SQL Server or from NAV? If it's from NAV then you're out of luck, that user won't be available. If it's from SQL Server, just put the same login back in, it should still have the NAV permissions in the NAV database. If that doesn't work, then ask the customer if they had a SUPER database login that you then can add to get back into the database.

    Sometimes it will let you in with the SA account
  • Johan_007Johan_007 Member Posts: 53
    see, from some stupid reason i deleted my user name in NAV ](*,) but when i browse thru the SQL DB table _ Member Of, my username is still there but not in the USER table.. so now i cant develop until i get my ursname back in there ](*,)
  • DenSterDenSter Member Posts: 8,305
    Was that the only user in there? You can go through the user tables and remove all user references, and then you should be able to get in with the sa account. I'm assuming that this is your personal local development database that you have on your laptop. You would of course never remove all user references from a production database.
  • Johan_007Johan_007 Member Posts: 53
    nope.. it was the production DB.. but.. i tried and it has worked!! \:D/ =D> but you have to be careful how you add the user thru SQL for NAV.. phew, glad I didn't stuff anything up.
  • Johan_007Johan_007 Member Posts: 53
    looks good now. i know NAV is very sensitive to adding fields to it thru SQL, but it worked!
Sign In or Register to comment.