Hi there; So this week’s Learning Curve is Upgrading NAV 2009 R2 to 2013 and boy is there a lot of confusion out there J. So let’s get started. First thing is first I say please don’t follow Microsoft’s guide on the Application Code conversion the rest its good , but that one man I say they can write it better I just couldn’t get it to work with what is written out there.
Upgrading the to NAV 2013 has at list 4 stages
- Preparation for upgrading
- Upgrading the Application Code
- Upgrading the Data
- Specific are changes.
Preparation for upgrading Challenges
The Preparation guide for upgrading is well written but you might find yourself confused and lost when trying to assign the user db_datareader, db_datawriter, and db_ddladmin database roles.
If your case of problem is
Or
When you are trying to add a user with your login
Then Let me help you. If the above two problems are the one’s you are facing then the problem is with how you are understanding the unnecessarily over complicated user setup and security of SQL server. So follow me.
According to the Guide it says insure that the user we are using have the db_datareader, db_datawriter, and db_ddladmin database roles and also the user has the Sysadmin Server Role for the instance of SQL Server that is hosting your Microsoft Dynamics NAV database.
The thing is as I understand it there are two levels with SQL Login and Users. Logins are what you find under your instance and under the security folder next to the database folder.
And a login represents the Account we login to the instance so once we get connected to the instance the different databases get to setup different user policies for the same users and they manage this through the users under them.
The First Thing we will do is create a Login with your System account you are using now most probably (domain\Admin). To do that right click on the Logins folder and add a login.
On the General page select your Login.
On the Server Roles Page Select (Check) SysAdmin
We will get back to the rest of the pages later on, Say ok and Close the Dialogue.
Next Go to your database and Security -> Users Folder , Right Click on the folder and Click on New User. Here, what you do is select a Login and give it a Custom name. So give it a user name of your liking and choose your Login you Created and say ok. When you say ok if you get the same Error message as the secnd error message shown above then the problem is that the db owner of the database is your domain account and the user dbo in your users list has your login by default and it makes sense that it says a the login has already an account.
Go an double click on the dbo user inside your database and you will see the Login is the same as the one you are using to create your user with. The Reason this happens is that every time we open Classic / Developer Environment and say create Database the database owner of that database becomes the account we logged in the client with and most of the time it’s the same account we try to do everything with.
So to fix this go to the database right click on it and say properties and from the Select page choose Files and change the owner to some other login like the sa.
The Next thing we have to do and the second is now create the user inside the database expand the database Security -> Users right click and add the user with your Login you created previously or you had in there and on the database role memebership choose db_datareader , db_datawriter , db_ddladmin and press ok and it should work fine. If you were getting the first error shown above then the reason you got the error was for some reason I don’t understand being the dbo you can’t assign that to yourself. I don’t know why ? maybe I will one day. Or if you know why please do leave a comment below.
Upgrading the Application Code Challenges:
Now this is where the problem really started for me and I couldn’t follow Microsoft with its guide and I have found many people complaining about this too. So I choose to understand the concept behind what they are doing and got on with a simple way. So the steps I followed goes on as follows.
- Create a NAV 2013 Database you are gone migrate too and make sure it has the SQL roles and privileges we discussed earlier and any other mentioned in the appropriate Microsoft guide to preparation to upgrading.
- Using the TextFormatUpgrade2013.exe tool export your custom objects (50000 >= range objects) from 2009 R2 in to a txt file to understand more about this tool follow this link http://msdn.microsoft.com/en-us/library/jj551752(v=nav.70).aspx
- Next backup the Cronus Nav 2013 database with only application objects don’t include those in the range Permission Set [2000000004] …. [2000000203] in .fob format.
- Next import the exported txt file from the new NAV 2013 database
- Restore the above backup of Cronus on your new NAV 2013 database you created at step 1
- Compile your objects and everything should be ok if not anything missing it would be easy to handle
From here on Follow the Upgrading the Data Guide http://msdn.microsoft.com/en-us/library/hh168112(v=nav.70).aspx from Microsoft it shouldn’t be hard moving forward.












