|Read more about this book|
(For more resources on this subject, see here.)
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:
- Run the Microsoft Dynamics AX Setup installation program and select your language:
- 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:
- 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.
- 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 <AXVersion><Company>_<Instance> or >AXVersion<_<Company>_<Instance>.
- 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:
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.
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:
- 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.
- In the database engine, create a new database by right clicking on the Databases folder and then clicking on New Database....
- 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.
- 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).
- 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....
- 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.
- Next we need to assign the permissions on two stored procedures. To do this, go to the Securables page.
- 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.
- The Select Objects window will open, click on the Object Types... button to search for specific object types.
- 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.
- 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.
- 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.
- Verify that the Select Objects window has the two stored procedures listed, then click on the OK button to add the Securables.
- 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.
If the NT AUTHORITY\NetworkService or LocalSerivce account are the AOS service accounts, then the account login should follow the format <AOSServer>$, where <AOSServer> is the server that the AOS is running on. For example, AX2009-AOS$ would be a valid account login to add to the database.
|Read more about this book|
(For more resources on this subject, see here.)
Installing the Dynamics AX Application files
The Dynamics AX AOS requires the Application files server component because that is where all the application code, label files, and system files are stored. The best practice is to install the Application file server on a dedicated server. When setting up multiple Dynamics AX environments, such as a development, test, or training system, each environment should have its own Application file folder. However, when setting up a clustered or load-balanced environment, essentially the same environment with multiple AOSs, all of them will share a single Application file folder. The following steps outline the process of installing the Application files base server component:
- Run the Dynamics AX setup. In the Add or modify components screen, mark the Application files in the Base component and click on the Next button.
- In the next window of the wizard, specify the appropriate folder to install the Application files. Verify that the location is appropriate for your setup and then click on the Next button.
- The next step is to specify the Application Instance Name. This name will also be used as the name for the Application Instance's Application file folder. The database, Application Object Server instance, and Application file folder need to have the same name.
- Click on the Next button and finally complete the wizard to create the Application file folder by clicking on Finish.
Now that the Application files have been installed, the next step is to create a network share of the Application file folder, so that the AOS server can access the Application files. Furthermore, this is also necessary to have in place when setting up multiple AOSs in a load-balanced or clustered setup as they will all access the same Application file directory. The following steps describe this process:
- Go to the top level folder in which the Dynamics AX Application files were installed.
- Right-click on the 50 folder and go to Share with | Advanced sharing....
- In the 50 Properties form, click on the Advanced Sharing... button to assign sharing permissions.
- In the Advanced Sharing window, mark the Share this folder checkbox to enable the sharing Settings section. Then, click on the Permissions button to assign permissions to this share.
- We will now need to add a user. Click on the Add... button to add a user.
- The Select Users, Computers, Service Accounts, or Groups window will open.
- Type in the AOS service account name and click on the OK button.
- Now that the AOS service account has been added, assign Full Control permission access to the folder so that the AOS service can modify the directory. Click on the OK button to save the changes.
- Now we are back in the Advanced Sharing window. Click on the OK button.
- Now we are back in the 50 Properties window. Click on the Close button to complete the sharing and permission setup.
- Now that the folder has been shared, we need to ensure that the permission has been set to the root folder, subfolders, and files. To do this, right-click on the 50 folder and go to Properties.
- In the Properties window, click on the Security tab.
- In the Security tab, click on the Edit... button to modify the permissions.
- Click on the Add... button to add permissions to the Dynamics AX AOS service. Add the AOS service and click on the OK button.
- In the 50 Properties window, assign Full Control to the Dynamics AX AOS Service Account and click on OK to apply and save the modifications.
If the AOS service account is NT Authority\NetworkService or LocalService, then provide the <AOSServer>$ instead. For example, if the AOS server is AX2009-AOS, provide AX2009-AOS$ as the account name.
|Read more about this book|
(For more resources on this subject, see here.)
Installing the Application Object Server (AOS)
Now that the database and application files base server components have been installed and configured, the next step is to install and configure the AOS. First we will start by creating a single AOS and then progress into a more sophisticated setup and arrangement of multiple AOS servers either for a clustered or load balancing environment. The following steps describe this process:
- Run the Dynamics AX setup program. In the Add or modify components screen, mark the Application Object Server (AOS) and click on the Next button to start the installation of the Dynamics AX AOS. A message may pop up notifying you that you don't have a Windows Firewall/Internet Connection Sharing (ICS) setup, you can override this message and continue with the installation process by clicking on the Yes button.
- On the Select database type screen, you will be prompted to select the appropriate type of database that the AOS will be connected to, as shown in the following screenshot. There are specific calls and routines that the AOS must utilize for SQL Server and Oracle. After selecting the appropriate database brand, click on the Next button to progress to the next step:
- On the AOS: Connect to a SQL Server Database screen of the AOS installation wizard, you can select the appropriate SQL server hostname and instance as well as the database we created earlier, as shown in the following screenshot. Upon selecting the appropriate SQL Server, the installation program may select the database with a matching AOS name. However, if the name is different, select the correct one. When complete, click on the Next button to progress to the next step:
- In this section of the AOS installation wizard, you will need to specify the folder in which you installed the Application file directories, as shown in the following screenshot. If your application files are in a separate folder than the server in which you are installing your AOS, you must specify the Network Share directory. When you have set the correct directory, proceed by clicking on the Next > button:
- Once you have specified your application files directory, the next step is to set the appropriate port for the AOS to listen and communicate through. The initial and default port is 2712. However, if you already have an AOS installed on that port, the wizard will automatically detect that and select the next available port by incrementing up by 1. In this example, we already have an AOS instance installed on port 2712; therefore, the wizard has automatically set the port to 2713, as shown in the following screenshot. When you have completed this step, click on the Next button to proceed forward:
- Next, we will provide the account that will run the AOS service. It is recommended to use a dedicated account. You can create an AOS account on your Active Directory domain controller. It must have permissions to access the SQL Server database, as described in the Manually installing and setting up the Dynamics AX Database section and permissions to access the Application files folder, as described in the Installing the Dynamics AX Application files section, found earlier in this article. The Network Service account is an acceptable option for the AOS service account. However, it is recommended that you use a dedicated domain account to run the AOS service. Once you have specified the AOS service account, click on the Next button and then click on the Install button to complete the installation of the AOS:
- Once the AOS installation wizard is complete and there are no errors, we will need to confirm that the AOS service has been created. The AOS service should have started if you have marked the option to start the AOS service after the install completes option. We will then need to open the Windows Services program by going to Start | Administrative Tools | Services. Your AOS service name will follow the following format: Dynamics AX Object Server 5.0$<AOS NUMBER>-<AOS NAME>, where <AOS NUMBER> is the number of the AOS created, relative to the sequence it was created in and <AOS NAME> is the name for the AOS that was provided during the install.
Now is not only an appropriate but convenient time to install any Hotfixes (for example, latest hotfix rollup) and/or Service Packs (for example, SP1). This ensures that all the base server components and the client are up-to-date before use or initialization. It will also save additional steps in the future.
In this article we have covered:
- Installing the Dynamics AX database
- Installing the Dynamics AX Application files directory
- Installing the Application Object Server (AOS)
- Testing Workflows for Microsoft Dynamics AX 2009 Administration [article]
- Setup and Configuration of the Workflow for Microsoft Dynamics AX 2009 Administration [article]
- Microsoft LightSwitch Application using SQL Azure Database [article]
- Microsoft SQL Server 2008 - Installation Made Easy [article]
- Debugging AJAX using Microsoft AJAX Library, Internet Explorer and Mozilla Firefox [article]
- Microsoft WCF Security [article]