How to install the Microsoft Dynamics AX database

0
277
5 min read

Although the installation program provides a lot of self-governance, when it comes to installing each component, it does not do everything. At times, you will have to perform some manual tasks to get the components working the way you intend them to work.

Although many components can be installed at the same time, which speeds up the installation process, it is far better to avoid this approach as you have less control over the integrity of the installation.

Installing the Dynamics AX database

The very first component that must be installed is the Dynamics AX database server component. The database server component is a SQL database that will store all the Dynamics AX data for quick retrieval. To install and set up the database server component, perform the following steps:

    1. Run the Microsoft Dynamics AX Setup installation program and select your language:

      Microsoft Dynamics AX 2009 Administration

    2. After clicking on the OK button, you will now be in the Dynamics AX installation wizard. With all the defaults set, click on the Next button until you arrive at the Add or modify components screen:

      Microsoft Dynamics AX 2009 Administration

You can either create a database automatically using the installation wizard or manually. If creating a database manually, ensure that the appropriate permissions are set, as described in the following steps.

  1. To start creating a database using the wizard, check the Database (Microsoft SQL Server) option in the Base section of the wizard and then click on the Next button.
  2. The next screen Database: Create new SQL Server database, will enable you to perform the actual creation of the new SQL Server database. Although it’s not required to have Dynamics AX working, you should name your database with the same name you intend to use for your AOS instance. In this instance, since we are creating a development environment, the database name will be AX2009_INGNOMICS_DEV01. It is best practice to have the same name for the database, Application Object Server, and Application file directory. It is also best practice to name the database as &ltAXVersion>&ltCompany&gt_&ltInstance> or &gtAXVersion&lt_&ltCompany&gt_&ltInstance&gt.

    Microsoft Dynamics AX 2009 Administration

  3. The final screen indicates whether the installation was performed successfully. The color of the box on the right side of the component installed can be green, orange, or red. Green indicates that the installation was successful, orange indicates that there was a warning, yet the component was installed, and red indicates that there was a fatal error and the component did not install at all. If there is either a warning or error, check the Open the log file when Setup closes option and click on the Finish button to view the reasons for the warning and errors:

    Microsoft Dynamics AX 2009 Administration

Manually installing and setting up the Dynamics AX database

Manually installing and setting up the Dynamics AX database is preferred when there is a desire to understand the permissions and setup involved. For example, in instances where demo data is copied or when you copy an existing Dynamics AX database from one server to another, it is likely that the permissions may be set up differently. In this case, understanding what permissions need to be set on which object will prevent lots of unnecessary issues. From now on, understanding how the Dynamics AX database is set up is not only useful but essential as well. Once understood, you will be able to create the Dynamics AX database more quickly. This procedure covers the process of manually creating and installing the database in Microsoft SQL Server 2008 or 2008 R2. To do this, you will need to perform the following steps:

    1. As an administrator, access SQL Server using SQL Server Management Studio and log in to the server that you want the database to reside in.
    2. In the database engine, create a new database by right clicking on the Databases folder and then clicking on New Database….

      Microsoft Dynamics AX 2009 Administration

    3. In the New Database window, provide the appropriate Database name and location on the disk to store the database. Once complete, click on the OK button to create the database.

      Microsoft Dynamics AX 2009 Administration

    4. Once you have specified the name you want for your database, you can click on the OK button in the New Database wizard to create the database you specified. The database will now appear below the Databases folder, (you may need to refresh).

      Microsoft Dynamics AX 2009 Administration

    5. Now that you have created the database manually, you will need to set the permissions manually as well. First, the service account name that will be running the AOS must be added as a valid SQL login. Expand the Dynamics AX database and right-click on the Security folder and click on New | User….

      Microsoft Dynamics AX 2009 Administration

    6. In the Database User – New window, provide the AOS service account name in the User name and Login name fields and assign the login to db_datareader, db_datawriter, and db_ddladmin in the Database role membership section.

      Microsoft Dynamics AX 2009 Administration

If the NT AUTHORITYNetworkService or LocalSerivce account are the AOS service accounts, then the account login should follow the format &ltAOSServer>$, where &ltAOSServer> is the server that the AOS is running on. For example, AX2009-AOS$ would be a valid account login to add to the database.

  1. Next we need to assign the permissions on two stored procedures. To do this, go to the Securables page.

    Microsoft Dynamics AX 2009 Administration

  2. Click on the Search.. button, and the Add Objects window will be displayed. Ensure that the Specific objects… radio button is marked and click on the OK button.

    Microsoft Dynamics AX 2009 Administration

  3. The Select Objects window will open, click on the Object Types… button to search for specific object types.

    Microsoft Dynamics AX 2009 Administration

  4. The Select Object Types window will open, mark Stored procedures and then click on the OK button. This will filter our search to only include stored procedures in the database.

    Microsoft Dynamics AX 2009 Administration

  5. Now that we are back in the Select Objects window, click on the Browse… button to view the list of stored procedures in the database.

    Microsoft Dynamics AX 2009 Administration

  6. In the Browse for Objects window that pops up, mark the CREATESERVERSESSIONS and CREATEUSERSESSIONS stored procedures in order to modify permissions. When complete, click on the OK button.

    Microsoft Dynamics AX 2009 Administration

  7. Verify that the Select Objects window has the two stored procedures listed, then click on the OK button to add the Securables.

    Microsoft Dynamics AX 2009 Administration

  8. The Securables page will now have the two stored procedures listed. Grant Execute permissions to the account on both of the stored procedures. When complete, click on the OK button to finalize the permission settings on the Dynamics AX database for the account.

    Microsoft Dynamics AX 2009 Administration


Subscribe to the weekly Packt Hub newsletter

* indicates required

LEAVE A REPLY

Please enter your comment!
Please enter your name here