Copy SQL 2000 Login as a user on a new database on the same SQL server

Copy SQL 2000 Login as a user on a new database on the same SQL server

This question is answered

Hello.  I recently created a new test database on our NAV test server.  I restored from a NAV backup (set of .fbk files).  The users from the OLD database were created in NAV, but not in SQL.  How can I copy the users from the old database to the new one?

Verified Answer
  • Hi Lewis

    When you restore from a FBK the system rebuilds the structure of the database so you can see the users in the NAV side (As those are actually data records) however cannot see them in SQL (As that is structural side)

    Couple of options,

    You can redo the transfer as a SQL backup, this will bing the structure as well

    Capture the users manually onto the new SQL server

    or use SQL scripts to transfer the users (This is pretty complicated so don't attempt unless you have someone with SQL scripting skills)

    Cheers

    Nev

    Neville Foyn
    NAV Developer, Consultant & Trainer (Since 2001)
    MCTS NAV, CRM, Sharepoint, SQL
    MCITP NAV
    MCT 

  • The weird thing is some of the SQL "logins" were copied as SQL "users" for the new database and some were not.

    Here's what worked:

    (1)  With SQL 2000 Enterprise Manager, I went into each user and selected the new database in the database access tab and checked "public"

    (2) I also had to use Query Analyzer to do a sp_changedbowner for my power user and change the database owner to 'sa'.  I was then able to add the user back into NAV and in SQL add the new database as described in step 2,

    (3) In NAV, I changed security from Enhanced to Standard (File  > Database > Alter).  I did not realize it was Enhanced...it has been a long time since I played with that!

    (4) Now I was able to log on and Synchronize security.

All Replies
  • Hi Lewis

    When you restore from a FBK the system rebuilds the structure of the database so you can see the users in the NAV side (As those are actually data records) however cannot see them in SQL (As that is structural side)

    Couple of options,

    You can redo the transfer as a SQL backup, this will bing the structure as well

    Capture the users manually onto the new SQL server

    or use SQL scripts to transfer the users (This is pretty complicated so don't attempt unless you have someone with SQL scripting skills)

    Cheers

    Nev

    Neville Foyn
    NAV Developer, Consultant & Trainer (Since 2001)
    MCTS NAV, CRM, Sharepoint, SQL
    MCITP NAV
    MCT 

  • The weird thing is some of the SQL "logins" were copied as SQL "users" for the new database and some were not.

    Here's what worked:

    (1)  With SQL 2000 Enterprise Manager, I went into each user and selected the new database in the database access tab and checked "public"

    (2) I also had to use Query Analyzer to do a sp_changedbowner for my power user and change the database owner to 'sa'.  I was then able to add the user back into NAV and in SQL add the new database as described in step 2,

    (3) In NAV, I changed security from Enhanced to Standard (File  > Database > Alter).  I did not realize it was Enhanced...it has been a long time since I played with that!

    (4) Now I was able to log on and Synchronize security.

  • Strange one, glad you go it sorted

    Neville Foyn
    NAV Developer, Consultant & Trainer (Since 2001)
    MCTS NAV, CRM, Sharepoint, SQL
    MCITP NAV
    MCT