Total Pageviews

Search This Blog

Wednesday, November 28, 2007

Dynamics AX 4.0 SP1 Clustering and Load Balancing

Set up load balancing

Add AOS instances to a cluster and run the cluster without a load balancer.

If you set up a cluster without a load balancer, you can use client configurations to set clients to connect to one or more AOS instances that have load balancing enabled. If an administrator needs to remove a computer from the cluster, and one or more client configuration is pointing to it, the client configuration must be updated. No additional hardware is required for this topology.

Add AOS instances to a cluster and configure one or more AOS instances to be a load balancer.

If you set up a cluster with a load balancer, you must use client configurations to set clients to connect to the AOS that has been set as the load balancer. You can then add and remove instances from the cluster without needing to update client configurations. Additional hardware may be required to set up a computer as a load balancer.

Add AOS instances to a cluster
Open the Server Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX Server Configuration Utility).

Verify that the currently selected (AOS) instance and configuration are the ones that you want to modify.

Select Make this AOS instance part of the load balancing cluster.

Set a value for the maximum number of client sessions that the AOS instance will accept.

Set up an AOS to be a load balancer

Open the Server Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX Server Configuration Utility).

Verify that the currently selected (AOS) instance and configuration are the ones that you want to modify.

Select Use this AOS instance for load balancing only (accept no client connections).

Add an AOS instance to a cluster

Open the Online users form. (Administration > SysUsersOnline).

On the Server Instances tab, select the AOS instance.

Click .

AOS and LoadBalancing Q&A

http://groups.google.ee/group/microsoft.public.axapta/msg/1af5d720424ea1df - Sergey Gerasimov

Dynamics AX 4.0 - COM Class Wrapper Wizard

COM Class Wrapper Wizard is a great too to have. It easily creates wrapper classes to work with COM objects and also type safe when using dynamic binding.

How to use it from Morphx IDE:

Tools -> Development Tools -> Wizards -> COM Class Wrapper Wizard.

Channel 9 Videos on AX

Model driven development in Dynamics Ax
http://channel9.msdn.com/ShowPost.aspx?PostID=235518#235518
Exception handling in X++
http://channel9.msdn.com/Showpost.aspx?postid=273765
Application fundamentals in Dynamics Ax
http://channel9.msdn.com/Showpost.aspx?postid=284365
Dynamics Ax 4.0 – Unit testing
http://channel9.msdn.com/Showpost.aspx?postid=247301
Dynamics Ax 4.0 – 3-tier development
http://channel9.msdn.com/Showpost.aspx?postid=259048
MorphX best practices in Dynamics Ax
http://channel9.msdn.com/Showpost.aspx?postid=292988
Smart customizations in Microsoft Dynamics Ax 4.0
http://channel9.msdn.com/Showpost.aspx?postid=267428

Other Dynamics videos -
Video from Jakob Nielsen, director of UX (User experience) on Dynamics team –
http://channel9.msdn.com/Showpost.aspx?postid=175501
Video from Mike Ehrenberg, Architect of Dynamics Team titled 'Architecting next generation of Dynamics' -
http://channel9.msdn.com/Showpost.aspx?postid=175509
Video from Ulrik Molgaard Honore, Program Manager for the Production Planning team in Dynamics Ax
http://channel9.msdn.com/Showpost.aspx?postid=272229

Thursday, November 22, 2007

Dynamics Ax 4.0 and MSMQ

Writing to a Queue using .Net System.Messaging Assembly

Pre-Requisites:
1. Create a private queue using Computer Management->Message Queuing->Private Queues.
2. In AOT, References, add reference to System.Messaging assembly.

This job sends a message to the created queue:

static void JobMSMQSend(Args _args)
{
System.Messaging.MessageQueue mqsend;
System.Messaging.Message mesg;
;
mqsend = new System.Messaging.MessageQueue('.\\private$\\ax2web');
mesg = new System.Messaging.Message();
mesg.set_Label('AXMesg');
mesg.set_Body('First Message from AX!');
mqsend.Send(mesg);
}

Wednesday, November 7, 2007

Troubleshooting AOS and SQL Server

AOS instance cannot connect to new database

If you are trying to connect to a database that was not created by Setup, the AOS account (the domain account or Network Service account associated with an AOS instance) may not have appropriate rights in SQL Server. The AOS account must be a user in the database and be assigned to the following database roles db_ddladmin, db_datareader, and db_datawriter.

AOS instance does not start after changing databases

When an AOS instance and SQL Server database are installed on the same computer, Setup creates a dependency—the AOS instance does not start unless the SQL Server database is running.
If you change the AOS instance to use a SQL Server on a different computer, you must manually change or delete the dependency using the SC tool (SC.exe) from a command prompt.

To make the AOS dependent on the new SQL Server instance

Open a Command Prompt window and type:
sc config AOSinstancename depend= RpcSs/ sqlserverinstancename

To remove the AOS dependency on SQL Server being started

Open a Command Prompt window and type:
sc config AOSinstancename depend= RpcSs

SQL Server 2005 Pre-Requisites for Dynamics AX

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.

Verify rights

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.


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.

Note:
If you are trying to connect to a database that was not created by Microsoft Dynamics AX Setup, the AOS account (the domain account or Network Service account associated with the AOS service) may not have appropriate rights in Microsoft SQL Server. The AOS account must be a user in the database, and be assigned to the following database roles db_ddladmin, db_datareader, and db_datawriter.