Compartilhar via


Creating Databases

You can create new Dynamics NAV databases in the development environment and by using the New-NAVDatabase cmdlet in the Microsoft Dynamics NAV Administration Shell.

When you create a database you must specify the SQL Server instance for the database and the authentication type.

To download symbols

Before you create a database, you must make sure to download symbols first.

  1. Download the platform symbols, the test symbols, and the application symbols.
    Make a note of the location where you store the files.

  2. Publish the symbol files, one file at a time to the Dynamics NAV Server instance:
    Open the Microsoft Dynamics NAV Administration Shell as an administrator, and run the following command for each of the symbol files:

    Publish-NAVApp -ServerInstance <ServerInstanceName> -Path <SymbolFilePath> -PackageType SymbolsOnly
    

To create a database

  1. In the development environment, on the File menu, choose Database, and then choose New.

  2. In the Server Name field, enter the name of the SQL Server instance. You can choose the up arrow to select the server from a list of available servers or you can enter the server name manually.

  3. In the Authentication field, select the type of authentication that you require. Choose the drop-down arrow to select Database Server Authentication or Windows Authentication.

    • If you select Database Server Authentication, then authentication is performed by the SQL Server instance that you have selected.

    • If you select Windows Authentication, then authentication is performed by the Windows domain controller.

  4. In the User ID field, enter your User ID if you have selected Database Server Authentication.

  5. In the Password field, enter your password if you have selected Database Server Authentication.

  6. To set the network type to be used when connecting to the server, choose the Advanced tab and select the net type from the drop down list box in the Net Type field. However, it is not usually necessary to change the network type from the default setting. The Default net type setting allows Dynamics NAV to connect to a server using the default client network type assigned by SQL Server. You can change the net type with the Client Network Utility, which is part of the SQL Server Client Utilities, if they have been installed on the client computer.

  7. Choose OK to connect to the server and open the New Database window.

    In the New Database window, enter the information about the database that you want to create. The window contains the same tabs as the Alter Database window. The tabs are the following:

    1. Now that you have created a new database, you must configure your Microsoft Dynamics NAV Server instance to access the database and then restart the service. For more information, see How to: Configure a Microsoft Dynamics NAV Server Instance.

    2. You must synchronize the schema for all tables of the new database.

    From the development environment, on the Tools menu, choose Sync. Schema For All Tables, and then With Validation. For more information, see Synchronizing Table Schemas.

    You can also use the Sync-NAVTenant cmdlet of the Microsoft Dynamics NAV Administration Shell.

Warning

You can always enlarge a database later on, but you cannot make it smaller.

After you have created the database, you can enter program objects and company data. Before you can create company data, you must import some basic data from another Dynamics NAV database. The imported data must at least include Data Common to All Companies and Application Objects. For more information, see Exporting and Importing Companies and Other Data.

See Also

How to: Create Companies
How to: Select the Network Type of the Database
How to: Delete Databases
How to: Export and Import Companies and Other Data in Clients