4.2 Installing the Data Director
4.2.7 Configuring the NAV Plugin
In the same wizard, Plugins/Controls group are available in the upper right corner having three buttons, one for the Dynamics NAV plugin, one for the MS SQL Server plugin and one for the Client Controls.
First two buttons will be enabled or disabled according to plugins included in the license and are used to configure the respective plugin. For example, if the license only contains the NAV plugin, the Dynamics NAV button will be enabled and the MS SQL Server button as disabled. Since the test license includes all available plugins, both buttons are enabled. The Client Controls is always enabled.
Dynamics NAV Plugin
On click of Dynamics NAV, the screen with the options to configure NAV plugin will be shown as:
FIGURE 4.2 – 6: MICROSOFT DYNAMICS NAV PLUGIN SETTING To Load NAV License
1. Click on Load NAV License to load a new NAV license which makes it available for the DD to use. Once the license is loaded here, the Administration is used in the NAV scheduler database to set up the distribution of the license to other DDs.
2. A license can be installed manually by putting it in the cfront plugin root folder and the version folder that matches the version of NAV.
Other Settings Parameters at NAV Plugin
Following are the other parameters for the FinPlugin, that are used to access Microsoft Dynamics NAV databases (both native and SQL).
Property Description
Codeunit Permission This specifies the codeunit in NAV from which the plugin can inherit permissions. This can be important in cases where there is an end-user license and a need to replicate data into a write-protected table such as the Item Ledger Entry.
Codeunit 99001483 contains permissions to write into most of the write protected tables. If left as 0, the plugin cannot write into protected tables.
Multilang. Workaround It provides a fix for an error in NAV that occurs when the source and destination databases are not using the same language.
Clear Illegal SQL Dates It corrects illegal dates so it can be written into NAV date field. It only affects NAV using SQL Server as the database.
Ignore Extra Fields If this is checked, packages will not cause an error even if some included fields do not exist in the destination table. They are just ignored.
Fix Decimal Precision This fixes Decimal Rounding where decimal values
may be replicated with large number of decimal places. Type in the number of decimal values you want to replicate in the Round To Decimal field.
Load NAV License Enables to load a new NAV license for the DDs use.
TABLE 4.2 -1 MICROSOFT DYNAMICS NAV PLUGIN SETTING Client Controls
The Client Controls button will open up the screen that contains the Register and Unregister buttons which will register or unregister the ActiveX client controls that the NAV client uses to talk to the DD.
FIGURE 4.2 – 7: DATA DIRECTOR CLIENT SETTING
Register Client Controls
1. Click Register to register the ActiveX client control.
Unregister Client Controls
1. Click Unregister to unregister the ActiveX client control.
Normally, there will be no need to manually register these controls as it should be done at installation, but under certain circumstances while upgrading the DD, the old clients might be locked when the upgrade
1. Log Mode can be enabled by placing a check mark in the Log Mode box. This will enable client controls to maintain a log of what they are doing which can be useful when
troubleshooting. If this option is enabled, please make sure that the Log Dir directory exists.
2. DD creates three log files and will rotate through them when the Max. Lines limit has been reached for each log. On startup, the DD will make a copy of the old logfiles by appending .old to their names. This is useful if the DD service has been set to automatically restart on failure – the failure will then be in the old log files.
To Specify Log Level
Log Level specifies the detail level of debug information included in the Log file.Checking Error & Main usually is enough for basic debugging, but more details might be required in some cases.
1. Log Level specifies the detail level of debug information included in the Log file. Usually the Error and Main marks are enough but greater log detail might be required in some cases.
Error: Logs all errors reported from DD
Main: Show main functionality in DD
Actions: Shows detailed actions performed within DD
Detail: Show very detailed information about what DD is doing
Fields: Show database field values and information.
Functions: Extreme Debugging for programmers‟ use only.
Note
Log level Field & Functions will produce a lot of information in a busy system and should not be left on for long. If a log file exists, new entries will be appended to it.
Since there are various different client components used, like DD Client and Transaction Client, each component will produce its own log file, named after the component name.
Once all the settings at Register Data Director Settings are done, click Next to move forward with settings of DD Service.
To Define Data Director Mode
1. The Data Director Mode drop down list configures this service instance to run as a Data Director, a Forwarder (2nd Stage DD) or as a Transaction Server.
FIGURE 4.2 – 8: DATA DIRECTOR SERVICE CONFIGURATION
When the DD is running as a Transaction Server, the number in the Transaction Srv. Port field is used for all communications.
If running as a Forwarder (2nd Stage DD), the service will only forward packages to their destinations and will not be able to receive any packages. This means that at least one service must be running in DD mode which will be working as package owner and one or more running in Forwarder mode. The forwarder can be on a separate computer but make sure that the log database where the incoming and outgoing messages tables are stored is accessible from there. The name assigned to the forwarder is the name used in the Scheduler to indicate which forwarder should handle this location and should also be defined in the DNS or hosts files. This name is to be given in the Forwarder field of the Distribution Location card.
To Define Server Application Path
1. The Server Program field displays the path to the executable of the service application. This needs to be changed very rarely.
To Define Ports
1. DD Port (Port used by Data Director Service), the Telnet Port (Port used by telnet) and the Monitor Port (Port used by Data Director monitor explained later) for the DD service can be defined for the DD Service shown in Server Name. The values shown below are the default values.
Data Director Port 16750
Transaction Srv. Port 16752
Telnet Port 23
Monitor Port 16751
TABLE 4.2 -2 DATA DIRECTOR SERVICE CONFIGURATION
Note
If more than one instances of the service need to be run on the same computer, these values need to be changed so that it should not conflict with other DD services. Please note that all the ports including the telnet and monitor ports should be changed.
If Telnet server on the computer is run, then another port should be assigned to DD telnet interface to avoid conflicts.
On the click of Next, Data Director Specific Properties window will be opened where a number of properties need to be specified that affect the behavior of the DD. The following table describes these properties in more detail.
FIGURE 4.2 – 9: DATA DIRECTOR SERVICE CONFIGURATION
Property Description
Server name Displays the name of the service being configured
System Connection Specifies the connection string the DD uses to connect to the Log Database. By default, the DD installs a Microsoft Office Access database to use as a Log Database. Dynamics NAV or MS SQL Server can also be used but then needs to specify another connection string.
Working Directory The path to the directory that the DD uses to store temporary (package) files.
Incoming Table The name of the table DD uses for incoming messages.
Outgoing Table The name of the table DD uses for outgoing messages.
Days Message Exist Specifies the number of days processed incoming/outgoing messages should be kept. 0 means forever.
Timer Interval The DD checks for packages that need to be reprocessed (communication errors) at predefined intervals. The length of that interval can be specified here.
Limit Job Process (cnt) Limits the number of job records the DD will process per connection (to databases or remote DDs). Using this feature can be beneficial in systems experiencing heavy load to prevent the DD from going into a live lock. If the first job record destined to a connection has an error, the rest of the packages will be skipped for this run and the next connection will be processed. This enables the DD to handle virtually an unlimited number of waiting packages (space allowing) in linear time.
As a guideline, the number should be set low when the average package size is high and be set higher when the average package size is low. Set to 0 to disable (not suggested).
TABLE 4.2 -3 DATA DIRECTOR SERVICE CONFIGURATION Data Director Connection Strings
Below are several examples of connection strings that can be used in setup. In most cases, it is just a matter of copying the string listed below and changing the database name, user and password.
The DD connection string consists of three sections: database specific connection string, plugin ID and a plugin-specific string. These three parts are separated by the | symbol. Each section is configured with parameters that can be different for each plugin and each database.
Use different database connection strings for different database servers.
Syntax: <database connection string>|<plugin id>|<plugin specific string>
Following are few examples of connection strings. These are the strings that have been used in the past for each plugin.
Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Program Files\LS Retail\Data Director\data\msg.mdb;|ado|none
On click of Next, Data Director & Transaction Server Properties window will be shown with following properties
FIGURE 4.2 – 10: DATA DIRECTOR SERVICE CONFIGURATION
Property Description
Hold Connections The number of connections to the source database that the DD should reserve.
Idle Conn. Time Specifies the idle timeout for the reserved connections in Hold Connections.
Maximum Sessions Specifies the maximum number of simultaneous connections that the Transaction server can use.
Session Timeout Specifies the timeout for queries involving the Transaction server.
Thread timeout Specifies the timeout for threads used in connecting to remote locations.
Max. Forw. Threads Specifies the maximum threads used when the DD is in Forwarding mode.
Max. Hop Counter Specifies the maximum number of hops a single package can take between DDs. This prevents endless loops if the DD names are configured wrong.
Socket Timeout Specifies how long the DD will wait for the network to finish a particular send or receive operation. Socket Timeout = 0 will disable this check. Note: This should always be set lower than the Thread Timeout to prevent the DD from killing itself if it is just waiting for the network.
Password The password required to get an access to the DD service remotely.
Use Processor x This is the CPU number used by DD Service.
Allow File Trans When this is checked, the DD allows transfer of files using the MonitorClient from Dynamics NAV.
TABLE 4.2 -4 DATA DIRECTOR SERVICE CONFIGURATION
On click of Next, Server Debugging Properties window will be shown where various debug options for the DD service can be set.
FIGURE 4.2 – 11: DATA DIRECTOR SERVICE CONFIGURATION
Property Description
Keep Package Files DD will not delete the temporary files in the work folder. Do not leave this on for long time otherwise you will run out of disk space and prevent the DD from operating correctly.
Exception Dump Creates Memory dump file if DD crashes.
Log/Dump Dir. Folder where the log files will be saved in. Make sure the folder exists.
Max Lines / Logfile DD creates three log files and will rotate through them when the Max Lines has been reached for each log. On startup the DD will make a copy of the old log files by appending .old to their names. This is useful if the DD service has been set to automatically restart on failure – the failure will then be in the old log files.
Log Level Log Level specifies the detail level of debug information included in the Log file. Usually the Error and Main marks are enough but greater log detail might be required in some cases.
Error: Logs all errors reported from DD Main: Show main functionality in DD
Actions: Shows detailed actions performed within DD
Detail: Show very detailed information about what DD is doing Fields: Show database field values and information.
Functions: Extreme Debugging for programmers use only.
TABLE 4.2 -5 DATA DIRECTOR SERVICE CONFIGURATION
Note
These checks should be used only for a short term for debugging purposes and do not leave these options On for long in a production environment, especially the Keep Package Files option. Otherwise disk space may run out and prevent the DD from operating correctly. The Log/Dump Dir should be a directory that exists and the log mode works in the same way as the log mode for the client controls described earlier. This is the last configuration screen of the Data Director Service configuration and can be closed by either clicking Finish or OK.