Restoring an SQL Database on an other Server or other domain

garak
Member Posts: 3,263
Often i hearing from customer or other programmers, they wonder why they can't connect to the restored database on new server. Only the database creater / restorer can connect.
Reason: The database creater is the dbowner. But whats with the other users.
So, the problem is, in the backup is also the user identification (SID).
But the identifer on old Server must not be the same on new server (only sa is ever the same). This Id is stored in the master database (also the case sensitivity). The same is for windows User accounts under an AD. The same account, like garak, has not the same ID / GUID on AD1 or AD2. They have different Ids. The identification, inconsequential if SQL login or windows login, is ever by id and not by name.
So only the sa, dbowner or an member of administrators can connect.
Workaround:
Before backup, make an sql script (and navision dataport with navision permission) and transfer the users and sql permissions to an, for example, file. If the users have no specific sql permission, you create an dataport to export the navision windows user (not with field SPID) and there avision permissions. Then delete the Users on database.
Restore the database on new server and import the users with an new sql script on the new server (only when specific sql permission) or with the dataport. Then the useres became autom. the right Sid.
Here is also a link to a script from MS to do this ;-)
http://support.microsoft.com/?scid=kb%3 ... &x=12&y=13
Reason: The database creater is the dbowner. But whats with the other users.
So, the problem is, in the backup is also the user identification (SID).
But the identifer on old Server must not be the same on new server (only sa is ever the same). This Id is stored in the master database (also the case sensitivity). The same is for windows User accounts under an AD. The same account, like garak, has not the same ID / GUID on AD1 or AD2. They have different Ids. The identification, inconsequential if SQL login or windows login, is ever by id and not by name.
So only the sa, dbowner or an member of administrators can connect.
Workaround:
Before backup, make an sql script (and navision dataport with navision permission) and transfer the users and sql permissions to an, for example, file. If the users have no specific sql permission, you create an dataport to export the navision windows user (not with field SPID) and there avision permissions. Then delete the Users on database.
Restore the database on new server and import the users with an new sql script on the new server (only when specific sql permission) or with the dataport. Then the useres became autom. the right Sid.
Here is also a link to a script from MS to do this ;-)
http://support.microsoft.com/?scid=kb%3 ... &x=12&y=13
Do you make it right, it works too!
0
Comments
-
gr8 information helped me a lot.
Regards,
~ SA =D>Regards,
~SA0 -
Point of order ...
If you're restoring and using Windows logins in the same domain (but different machine is okay) you don't need this as the SIDs will be the same. However, you must successfully run a Tool->Security->Synchronize to recreate the Windows users in the master database. If it errors there will be users that cannot login.Robert de Bath
TVision Technology Ltd0 -
How you transfer menu and objects permissions?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions