Create a Microsoft SQL Server database

Dynamics AX 4.0

A Microsoft Dynamics AX database stores your Microsoft Dynamics AX data as part of an existing Microsoft SQL Server. You can set up a Microsoft SQL Server database from any computer, as long as you have appropriate rights to connect to the database server and create databases. The procedure that follows assumes that you are installing a single role on a computer. You can install multiple roles on a single computer, however, the order of the pages in the Setup Wizard changes based on your selections.

This version of Microsoft Dynamics AX supports Unicode collations. The following are the requirements for the Unicode collation you select:

  • Must be case-insensitive

  • Must match the Microsoft Windows locale of the computers running instances of Application Object Server (AOS).

If you are setting up a new Microsoft Dynamics AX installation, we recommend that you choose a Windows collation, rather than a SQL collation. For more information about choosing a collation for a SQL Server database, see the SQL Server documentation.

Setting up a SQL Server database creates a database to store your Microsoft Dynamics AX data structures and creates a SQL Server user login for the AOS account (the domain account or Network Service account that is associated with an AOS instance).

SQL Server must be installed with Windows Authentication, and must be running under the Local System account.

Prerequisites for Microsoft SQL Server 2005

If you are creating a SQL Server 2005 database on a database server that is not on the same computer as the Application Object Server (AOS), configure the database server as follows:

  • Enable remote connections.

    • Open the SQL Server Management Studio (Start > All Programs > Microsoft SQL Server 2005 > SQL Server Management Studio), log in, then right-click the instance you want to connect to.

    • Click Properties, click Connections, and then select Allow remote connections to this server.

  • Enable named pipes.

    • Open the SQL Server Configuration Manager (Start > All Programs > Microsoft SQL Server 2005 > Configuration Tools > SQL Server Configuration Manager).

    • Expand SQL Server 2005 Network Configuration, select Protocols for MSSQLSERVER, right-click Named Pipes, and then click Enable.

  • If the SQL Server computer has a firewall running on it, be sure that port 1433 is open.

After making these changes, you must restart SQL Server.

You must log in with an account that is both:

  • A member of the Administrators group on the computer from which you are running Setup.

  • A member of the Database Creators server role in the SQL Server instance in which you want to create the database.

If you have not done so already, insert the Microsoft Dynamics AX DVD into your drive. If the Microsoft Dynamics AX Setup Wizard does not launch automatically, double-click the Autorun.hta file in the root directory of the DVD.

If you are installing from a network location, share the installation files and connect to the location from the computer on which you want to install the program.

  1. To begin the installation process, click Microsoft Dynamics AX.

    On the Prerequisites check page, Setup validates that the software required to install Microsoft Dynamics AX is present. If it is not, click Install. To continue after the update completes, click Next.

  2. On the Welcome page of the Setup Wizard, click Next to continue.

  3. On the License agreement page, read the license agreement and then click I accept the terms in the license agreement to accept the licensing terms and conditions. Accepting the license agreement activates the Next button. To continue, click Next.


    To end Setup, click Cancel.

  4. On the Select installation type page, click Custom installation, and then click Next.

  5. On the Select computer role page, select Database, and then click Next.


    You can install multiple roles on the same computer. For additional information, see System topology recommendations.

  6. On the Select database type page, select Microsoft SQL Server, and then click Next.

  7. On the Connect to an instance of SQL Server page, in the SQL Server name box, type or select the name of the SQL Server to connect to, and then click Next.

    If you need to connect to a named instance of SQL Server, enter it in the format Servername\Instancename.

  8. On the Create SQL Server database page, in the Database name box, type a name for the database you are creating for Microsoft Dynamics AX to use.

    We recommend that you determine a naming convention and use it for all aspects of an installation, including the database name, AOS name, and application file server directory name.

    A recommended naming convention includes a short form of the customer name, the Microsoft Dynamics AX version, the service pack version, and a code for what you are using the installation for, such as Cust_AX_Live.


Setup places the database and transaction log in the same location. For a production environment, we recommend that you move the transaction log to a different drive. For more information, see the SQL Server documentation.

  1. On the Ready to install page, review the summary of roles for your computer. To proceed, click Next.

  2. On the Installing page, you can monitor installation progress as Setup proceeds.

  3. On the Completing Microsoft Dynamics AX Setup page, you can review the summary of roles for your computer. To exit the Setup wizard, click Finish.

If you want to create a SQL Server database manually to use for your Microsoft Dynamics AX installation, you must first create a database using Setup to use as a model for the manually created one.

  1. Follow the procedure above to create a SQL Server database to use as a template.

  2. Manually create the SQL Server database you want to use for your installation.

  3. Copy all objects, users, and user permissions from the template database you created to the new database.

  4. Specify the account for the AOS instance to use to connect to the database. You can use either the Network Service account of the local computer or a domain account.




    SQL Server and AOS on different computers



    SQL Server and AOS instance on same computer


    Simplified Chinese

    Traditional Chinese




    SQL Server and AOS instance on same computer



    SQL Server and AOS instance on same computer



    SQL Server and AOS instance on same computer



    SQL Server and AOS instance on same computer



  5. Set the following permissions in the database for the account to be used by the AOS:

    • User on the database server (already exists if you are installing on the same SQL Server as the first database).

    • Assign to the db_ddladmin, db_datareader, and db_datawriter database roles.

    • Grant the user execute rights on the createserversessions and createusersessions stored procedures.