Top Banner
Chapter 5: Database Server 5-1 CHAPTER 5: DATABASE SERVER Objectives The objectives are: Set up the Microsoft Dynamics ® NAV 2009 Server Configure the Microsoft Dynamics NAV 2009 Service with Setup Configure the Microsoft Dynamics NAV 2009 Server after Setup Introduction The new Microsoft Dynamics NAV 2009 Server is a .NET-based Windows Service application that works exclusively with SQL Server databases. It uses the Windows Communication Framework as the communication protocol for Role Tailored clients, and Internet Information Services for Web services that connect with it. It can execute multiple client requests in parallel and serves other clients by providing Web service access to authenticated clients. Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
12

Na2009 enus ic_05

Nov 07, 2014

Download

Technology

Peter Muscat

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Na2009 enus ic_05

Chapter 5: Database Server

5-1

CHAPTER 5: DATABASE SERVER Objectives

The objectives are:

• Set up the Microsoft Dynamics® NAV 2009 Server • Configure the Microsoft Dynamics NAV 2009 Service with Setup • Configure the Microsoft Dynamics NAV 2009 Server after Setup

Introduction The new Microsoft Dynamics NAV 2009 Server is a .NET-based Windows Service application that works exclusively with SQL Server databases.

It uses the Windows Communication Framework as the communication protocol for Role Tailored clients, and Internet Information Services for Web services that connect with it. It can execute multiple client requests in parallel and serves other clients by providing Web service access to authenticated clients.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 2: Na2009 enus ic_05

Installation and Configuration in Microsoft Dynamics® NAV 2009

5-2

NAV Server Setup A key difference between the two-tier architecture with the Classic client and three-tier architecture with the Role Tailored client and the Microsoft Dynamics NAV Server is that business logic runs on the Server instead of the client in the three-tier architecture. A simple example is the FILE.CREATE function. In previous versions of Microsoft Dynamics NAV, files are created on the client when code such as this code is run. With the RoleTailored architecture, the files are created on the service itself.

Microsoft Dynamics NAV 2009 Server provides an additional layer of security between the clients and the database. It leverages the authentication features of the Windows Communications Framework to provide another layer of user authentication and uses impersonation to ensure that business logic is executed in a process that has been instantiated by the user who submitted the request. This means that authorization and logging of user requests is still performed on a per-user basis, and ensures that all Windows authentication and Microsoft Dynamics NAV 2009 roles and permissions that have been granted to the user are correct. It also ensures that business logic–level auditing is still performed.

FIGURE 5.1 INSTALLER

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 3: Na2009 enus ic_05

Chapter 5: Database Server

5-3

NOTE: Do not install the Microsoft Dynamics NAV Server to an encrypted drive. If you do, the NAV Server will not run.

Server Installation

The Microsoft Dynamics NAV Server is installed when you select either the Server Installation Option or the Developer Environment Installation Option in Microsoft Dynamics NAV Setup.

FIGURE 5.2 INSTALLER

Configure Windows Services

Some Microsoft Dynamics NAV 2009 components are Windows services. Specifically, processes that remain in memory, function without user intervention, and serve other processes as needed.

Windows services must log on to an account to access resources and objects on the operating system. If all your Microsoft Dynamics NAV components run on a single computer configuring services are not a problem, but if you have installed different components on different computers, then you may need to configure one or more services to communicate with other Microsoft Dynamics NAV 2009 components.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 4: Na2009 enus ic_05

Installation and Configuration in Microsoft Dynamics® NAV 2009

5-4

The Microsoft Dynamics NAV Server runs as the NT Authority\Network Service account by default. If the Microsoft Dynamics NAV Server and SQL Server are on different computers, Microsoft recommends that you configure the Microsoft Dynamics NAV Server to run as a Windows domain account that is recognized by the SQL Server service. This account should not be an administrator in the domain or on any local computer.

Procedure: Configuring a Service

1. Perform the following steps to configure a service in Windows Server® 2003 or 2008:

2. Select Control Panel, then Administrative Tools, and then Services. 3. In the list of services, double-click the service you want to configure. 4. In the Server Properties dialog box, go to the Log On tab. 5. Select This account and either enter or browse to the account that

you want the service to use. 6. Enter and confirm the password for this account. 7. Click OK to exit the Server Properties dialog box.

Server Configuration During Setup As you run Microsoft Dynamics NAV 2009 Setup, you can provide configuration information for the Microsoft Dynamics NAV Server. This information is then written, by Setup, to the CustomSettings.config file. Assuming you install to the default destination, you can find CustomSettings.config after installing at C:\Program Files\Microsoft Dynamics NAV\60\service.

Configuring during Setup

The NAV Server can be configured while running Microsoft Dynamics NAV 2009 Setup. You must first select the Microsoft Dynamics NAV Server as a component to install. Do this by selecting one of the Installation Options that includes the Microsoft Dynamics NAV Server. There are two possible options:

• The Server Option installs the Microsoft Dynamics NAV Server without any other components.

• The Developer Environment Option installs the Microsoft Dynamics NAV Server along with various other components.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 5: Na2009 enus ic_05

Chapter 5: Database Server

5-5

You can also opt to customize your installation After you specify an Installation Option or customize your component list, you come to the Specify parameters pane in Setup. Click Server (the underscore indicates that this component is configurable) to open an Installation Parameters pane.

FIGURE 5.3 INSTALLER

Installing the Server Option

Select the Server installation option from the Installer Window

The list of parameters displayed in the Specify parameters pane varies, depending on which components you have selected for configuration. The following parameters pertain to the Microsoft Dynamics NAV Server.

Server Port This is the listening TCP port for the NAV Server, which becomes part of the server's URL. Default value: 7046 Valid range: 1-65535.

SQL Server Identifies the computer running SQL Server.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 6: Na2009 enus ic_05

Installation and Configuration in Microsoft Dynamics® NAV 2009

5-6

SQL Database Identifies the SQL Server database.

Web Service Port Identifies the listening HTTP port for Microsoft Dynamics NAV 2009 Business Web Services. Default value: 7047. Valid range: 1-65535.

Click Apply when you have finished entering values to exit back to the Specify parameters pane in Setup.

FIGURE 5.4 CUSTOMSETTINGS.CONFIG FILE

After running Setup you can modify Microsoft Dynamics NAV Server settings by editing CustomSettings.config.

NAV Server Configuration After Setup After you install the NAV Server, configuration settings are stored in the CustomSettings.config file, created C:\Program Files\Microsoft Dynamics NAV\60\service. If you have configured the NAV Server in Setup, your setting values are included in this file.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 7: Na2009 enus ic_05

Chapter 5: Database Server

5-7

In addition to the settings you can configure in Setup, CustomSettings.config contains additional settings for the NAV Server. After you modify CustomSettings.config, you must restart the NAV Server service.

CustomSetting.config File

CustomSettings.config is an XML file that you can edit with any text editor. Quotes are required for all values.

It can be found at: Program Files > Microsoft Dynamics NAV> 60 >Service

The settings are as follows.

Setting Meaning

NetType The network protocol used to access the database. Default value: Default. Valid values: Default, NamedPipes, Sockets.

DatabaseServer Identifies the computer running SQL Server.

DatabaseName Identifies the SQL Server database.

ServerInstance The name of the NAV Server. Default: DynamicsNAV. The only circumstance where you would need to modify this value is if you have more than one NAV Server installed on a single server computer.

ServerPort This is the listening TCP port for the NAV Server, which becomes part of the server's URL. Default value: 70476 Valid range: 1-65535.

WebServicePort Identifies the listening HTTP port for Microsoft Dynamics NAV 2009 Business Web Services. Default value: 85. Valid range: 1-65535.

WebServiceSSLEnabled Specifies whether SSL (https) is enabled for the Web Service Port. Default value: true. Values: true, false.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 8: Na2009 enus ic_05

Installation and Configuration in Microsoft Dynamics® NAV 2009

5-8

Setting Meaning

OperationTimeout Specifies the maximum time the NAV Server can take to return a call from the client. Time span format: [dd.]hh:mm:ss[.ff] Where: • dd: days • hh: hours • mm: minutes • ss: seconds • ff: fractions of a second You can also use MaxValue to indicate no timeout. This is the default.

ProtectionLevel Specifies the security services for protecting the client/server data stream. Default: EncryptAndSign. Values: EncryptAndSign, Sign, None.

MaxConcurrentCalls Specifies the maximum number of concurrent client calls that can be active on the NAV Server. Default: 60 Range: 1 - 2,147,483,647. To disable this setting, use a value of MaxValue.

ClientReconnectPeriod Specifies the grace period during which a client can reconnect to a running NAV Server. Time span format: [dd.]hh:mm:ss[.ff] Where: • dd: days • hh: hours • mm: minutes • ss: seconds • ff: fractions of a second Default value: 00:10:00.

CompressionThreshold Specifies a threshold, in terms of memory consumption, at which the NAV Server begins compressing data sets. Default: 65535.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 9: Na2009 enus ic_05

Chapter 5: Database Server

5-9

Lab 5.1 - Editing the Configuration file for the NAV Server Scenario

You are the consultant implementing Microsoft Dynamics NAV 2009 Clients for Woodgrove Construction. Users of Sales information report that they cannot access their data. You determine that clients are not connecting to the service tier.

Challenge Yourself!

In this exercise you will change the Database Server Name in the configuration file to the correct name for the server that hosts SQL Server 2005, so that clients can connect to their Sales data. The main tasks for this exercise are as follows:

1. Open the configuration file in Visual Studio. 2. Change the server name to the correct name.

Step by Step

Step 1: Access the Configuration File

1. The configuration file is called CustomSettings.config. It is an XML file.

2. Find the file at Program Files > Microsoft Dynamics NAV >6.0>Service.

3. Double-click the file to open it in Visual Studio.

Step 2: Edit the Configuration File

1. Identify the XML tag that contains the SQL Database Server name 1. Change the name to the correct name. 2. Save the CustomSeettings.config file. 3. Launch the RoleTailored client and access the Sales data.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 10: Na2009 enus ic_05

Installation and Configuration in Microsoft Dynamics® NAV 2009

5-10

Summary The NAV Server is a component of the Three-Tier architecture in Microsoft Dynamics NAV 2009.

You can configure the NAV Server while running Microsoft Dynamics NAV 2009 Setup. There are two such options:

• The Server Option installs the NAV Server without any other components.

• The Developer Environment Option installs the NAV Server along with various other components.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 11: Na2009 enus ic_05

Chapter 5: Database Server

5-11

Quick Interaction: Lessons Learned Take a moment and write down three key points you have learned from this chapter:

1.

2.

3.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 12: Na2009 enus ic_05

Installation and Configuration in Microsoft Dynamics® NAV 2009

5-12

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement