AOS service installation issue

When I tried to install AOS component after installing the Application and database feature, I get the error message:

could not open connections to the host, on port 1433: connect failed

The solution is to enable the TCP/IP protocol on the database server as below:

SQL Server Configuration Manager: SQL Server Network COnfiguration –> Protocols for MSSQLSERVER –> TCP/IP Enabled

Advertisements
Posted in Dynamics AX and SQL Server | Leave a comment

How to Use PowerShell to backup and delete AX application and database

There are many VPCs running in our Virtual Server for the Client Development purpose. As we develop a lot on the AX applicatoins, we need to backup the application and database everyday and also before the main changes in AX.

Here is the powershell scripts we are using to backup AX Database and application backup files.

1. Run the SQL Server maintenance Plan to set up the automatic SQL Server backup.

2. create the Powershell Scripts in the beneath: 

// You can also copy the files to some folders if you don’t like to map network driver

net use Z: \\10.0.0.236\databasebackup pass@word1 /user:Contoso\administrator

move-item -path Z:\* -Destination C:\DatabaseBackUp

net use Y: \\10.0.0.236\AX593 pass@word1 /user:Contoso\administrator

$a = (get-date).month

$b= (get-date).day

new-item C:\Test$a$b -type directory

copy-item -Recurse Y:\* C:\Test$a$b

$Now = Get-Date

//only keep the last three days backup.

$Days=3

$TargetDatabaseFolder = C:\DatabaseBackUp

$TargetApplicationFolder=C:\Test$a$b

$LastWrite = $Now.AddDays(-$days)

Get-ChildItem $TargetDatabaseFolder | where {$_.LastWriteTime -le "$LastWrite"} | remove-item

Get-ChildItem $TargetApplicationFolder | where {$_.LastWriteTime -le "$LastWrite"} | remove-item -recurse –force

3. Add the Powershell scripts to the Task Manager to run everyday or weeekdays.

Posted in Dynamics AX and SQL Server | Leave a comment

CFO Role Center KPIs error in new Financial Year

In the new financial year, CFO or Accountants KPIs may get error message in the Role Center Page as below:

The Value expression for the query parameter ‘Year’ contains an error: Index was outside the bounds of the array. (rsProcessingError).

It looks like the time dimension has not be processed correctly. After processing all the Cubes, we still got the same error message.

After checking the MDX and dimensions, we decided to process the ledger period time transactions dimension.

The issue has been fixed after that.

Posted in SQL Server Analysis Service | 4 Comments

AX Enterprise Portal cannot be accessed in Microsoft Dynamics AX VPC

The AX Enterprise Portal is set to http://sharepoint/ep in Microsoft Dynamics AX VPC and combined with 192.168.0.1 IP.

The EP site cannot be accessed after changing the initial IP to other internal IPs.

The way to fix this issue is add host records in local VPC and check the host headers in IIS.

Step 1.

Go to C:\Windows\System32\drivers\etc and Open the hosts file using notepad.

Add one record in the bottom

127.0.0.1                 sharepoint

Step2.

Go to IIS, Open WebSites –> SharePoint –sharepoint80, Right Click the website and Choose Properties.

In the Web Site Tab, Click Advanced and make sure the sharepoint is in the host header value.

Posted in Microsoft Dynamics AX | 3 Comments

AX Enterprise Portal: Index was outside the bounds

Scope:

When a user with Production Manager Role access the Enterprise Portal, the user get an error on the 30 day capacity view:

An error has occurred during report processing. (rsProcessingAborted) Get Online Help The Value expression for the query parameter ‘prodUnitId’ contains an error: Index was outside the bounds of the array. (rsProcessingError) Get Online Help

The user gets the same Error message by going to SSRS and viewing the reports directly.

Assessment:

"prodUnitId" error happens, if InventSite table has records but ProdUnitTable does not have record which links to InventSite table in the company.

Solution:

Compare those two tales and add data.

Posted in Microsoft Enterprise Portal | Leave a comment

Microsoft Dynamics AX VPC expires

Currently we are facing the Windows Operating System expires issue in the Microsoft Dynamics AX VPC Refresh 1. The OS is Windows 2003 R2 with SP2 evaluation copy and has expired since 7/7/2010. Later than 7 Jun, the VPC will restart automatically every 2 hours around.

We are using standard Microsoft Dynamics AX VPC for demo and test purpose. For different clients, we need to build different AX application and development in varies of VPCs. It will take a lot of time to move those applications to the new VPC Refresh 2 R2 and require more work when R2 expires in Dec 2010.

Due to the OS expires issue, we plan to use the current Refresh 1 VPC and upgrade once. It takes time to do it but we won’t need to do it any more after that.

Here are the steps to upgrade the OS in Microsoft Dynamics AX VPC from evaluation copy to RTM version:

1. download or prepare Windows 2003 Enterprise Version R2 with SP2 DVD. As we are one of Microsoft Golden Partners in Australia, we can download the OS and CD-Keys from Microsoft MSDN website for free.

2. Uninstall the .Net Framework 2.0, 3.0 and 3.5

3. Insert the Windows 2003 Enterprise Version R2 with SP2 Disk 1 DVD into the VPC and choose Upgrade option to install the Windows 2003 OS

4. After upgrading the system successfully, install additional components using the Windows 2003 Enterprise Version R2 with SP2 Disk 2 DVD.

5. Install .Net Framework 3.5 (.Net Framework 20 may need to be installed as well) which is required by Microsoft Dynamics AX

Posted in Windows Server | Leave a comment

Modify default AX Payroll Reports

One of our clients is currently asking to change the default Dynamics AX Payroll Reports—PayrollRegisterSummary as it counts twice in the Total Amount if employee has two same payment methods in the data (e.g. Direct Deposit).

If we open the Payroll Register Summary report and check the Count value expression, it counts the total number of the payment method (e.g. Direct Deposit).

The default code is as below:

="Total " & Fields!PAYMENTMETHODCODE.Value & ":"                        =Count(Fields!PAYMENTMETHODCODE.Value)

In order to modify the count value, we need to change the object to count. In our implementation, we change the PAYMENTMETHODCODE to EMPLOYEEID. After that, they still count the employee twice if they have two same payment method codes.

To avoid this, we need to change the Count method to CountDistinct which can be used to ignore the same value.

After changing the expression to =CountDistinct(Fields!EMPLOYEEID.Value), we can get the correct value in the Payroll reports.

Posted in Microsoft SQL Server Reports Service (SSRS) | Leave a comment