Search through blog..

Sunday, March 10, 2013

What to do: Only integrated security is supported for AX queries

In Dynamics Ax 2012, Microsoft SQL Server Reporting Services (SSRS) is the primary reporting platform. So all the default preconfigured reports that are shipped with Microsoft Dynamics Ax run on the Reporting services platform.

And therefore, the below installations should be done perfectly:
  1. SQL Server Reporting Services (SSRS - Part of SQL Installation)
  2. Reporting Server extensions (Business Intelligence components of Microsoft Dynamics Ax)
If your installation went wrong somewhere, then there is a chance that you might get the error: Only integrated security is supported for AX queries when trying to open an report in Ax 2012.

Or you might see that the report will be opened, but you will be asked to enter the username and password to proceed further. Below is the related screenshot:

Solution if error occurs for a single report:
  1. Identify the Report name
  2. Open Reporting Services Configuration Manager ( All Programs > Microsoft SQL Server 2008/2012 > Configuration Tools > Reporting Services Configuration Manager)
  3. Go to "Report Manager URL" Tab and click on URL
    Typically, URL will be in the format http://<ServerName>:80/Reports
  4. Select the particualr Report under DynamicsAx Folder
  5. In the opened page, select Data Sources on the left pane.
    And apply Windows integrated security and click Apply.
  6. Now the report should be opened automatically without any error message and also shouldn't ask for any username and password.

Solution if errors pops up for all SSRS Reports:

You can still apply the above approach for all the reports and it will work. But that is not the right approach for obvious reason, will take a lot of time to do that.
More appropriate solution would be to delete all the reports and redeploy all the reports. Steps are as follows:
  1. First step is to delete all the existing SSRS Reports. For doing this you can navigate to DynamicsAx folder and delete the entire folder.
  2. Then go to Report servers form in Dynamics Ax 2012 and click on "create report folder" button to create the Folder DynamicsAx again.
  3. Now you can open Powershell (Administrative Tools > Microsoft Dynamics Ax 2012 Management Shell). Make sure you run Powershell as Administrator.
  4. Deploy all the reports with the help of command:
    Publish-AXReport -ReportName *
  5. And once, all the reports are deployed you should be good to go.
Hope this helps !!

Saturday, March 9, 2013

How to Limit SQL's Memory usage

If you are working with a Dynamics Ax 2012, you would need SQL 2008/2012 to have the database in it. And if you have a Development or a Test environment, you tend to put both SQL and Dynamics Ax in the same Machine. And that is when this post can help you.

I have Dev machine in my local box along side Dynamics Ax 2012 and many other applications. And even though I am not using Major applications I see that the Memory usage of my box goes real high. And I understood that this is because of Microsoft SQL.
Microsoft SQL tends to eat up as much as memory it can get whenever memory is free, and thereby, causing less memory for other applications when needed.

Solution for that would be to limit the Memory usage of SQL to a certain amount based on your usage of SQL. I use SQL only to store Dynamics Ax 2012's data and the memory required for SQL to manage the transactions to and forth Dynamics Ax isn't much. So I limit the memory usage of SQL server to 1024 MB and thereby increase the performance of my Dynamics Ax 2012.

You can limit SQL's memory usage by following below steps
  1. Open your SQL Server with Administrator permissions (Right click > Run as Administration)
  2. Connect to your SQL instance
  3. On the SQL connection node > Right click > Select properties
  4. In the opened "Server properties" window Select Memory from the left pane
  5. Enter desired amount of memory (in MB) as the limitation for SQL Server to use.
  6. Click Ok to apply and you are good to go.
Result of this immediately I clicked Ok button is shown as below. I didn't open any other application, but for SQL Server and the memory usage will dropped to pretty reasonable amount.

Hope this helps !!

Thursday, March 7, 2013

Managing integration ports [AX 2012]

What are Integration ports?
 

Integrations ports are basically the inbound or outbound ports through which external applications can communicate with Dynamics AOS via AIF (WCF).
 
The exchange of data between External/Internal application is divided into:
  1. InBound Exchange 
    • Both Basic and Enhanced Integration ports can be used.
    • Basically to Receive data and create in Ax
  2. OutBound Exchange 
    • Only Enhanced Integration ports can be used.
    • To Send data to ext. applications
    • To Send data to ext. applications in response to their Requests
 How to: Create a Basic Inbound Integration Port [AX 2012]
 
Basic port is used to test the operation of a custom service that does not require any data processing or exposure to the Internet.
Only a developer can create a new basic integration port
  
To create a basic inbound port

  1. Open the Application Object Tree (AOT).
  2. Right-click the Service Groups node, and then click New Service Group.
  3. Right-click the new service group, and then click Properties. Set the Name property to TestBasicPortServiceGroup. Click Save.
  4. Right-click TestBasicPortServiceGroup, and then click Open New Window. Drag one of the custom services from the Services node onto TestBasicPortServiceGroup.
  5. Right-click TestBasicPortServiceGroup, and then click Save.

6. Right-click TestBasicPortServiceGroup, and then click Deploy Service Group.

 


7. After the service group is successfully deployed, a confirmation message appears in the Infolog. And the TestBasicPortServiceGroup port is appended to the Port Names list as a port of the Basic type.


8. To view the basic port you have created, open the Inbound ports form. Click System administration > Setup > Services and Application Integration Framework >Inbound ports.
The TestBasicPortServiceGroup port appears in the Port Names list as a port of the Basic type.


Important: To start this service every time that the AOS is restarted, set the AutoDeploy property for the service group to Yes.


How to manage the Enhanced integration port:

#1: To create an enhanced integration port, follow these steps.

1. To create an inbound integration port, open the Inbound ports form. Click System administration > Setup > Services and Application Integration Framework > Inbound ports.
–or–
To create an outbound integration port, open the Outbound ports form. Click System administration > Setup > Services and Application Integration Framework > Outbound ports.

2. Click New.

3. Enter a name and description for the new integration port. The name of a port must begin with a letter and can contain only alphanumeric characters.



4. Configure the integration port
Click service operations – to select Service operations which you want to perform using this Enchanced port.
Close Select service operations form.



5. Or just click Close to save the default configuration and you can modify the configuration later.

6. Click button Activate


Important:
If you activate or deactivate an integration port, all integration ports on that particular instance of AOS are reactivated. Do not click the Deactivate/Activate button while integration ports are processing messages.

#2: To Edit or delete an enhanced integration port, follow these steps:

To change the settings for an existing enhanced integration port, or to delete the port, you must first deactivate the port.

1. Identify and select the particular Port name field you want to change or delete.

2. Click Deactivate to deactivate the port.

3. Change the configuration settings.
–or–
Click Delete to delete the port.

4. Click Activate to reactivate the integration port.


#3: Configure addresses for Enhanced Integration ports:

Enhanced integration ports use adapters to enable Microsoft Dynamics AX to communicate by using various transport protocols.
The addresses of integration ports are defined by the adapters that you select and the Uniform Resource Identifiers (URIs) of the adapters.
Inbound integration ports have an inbound address that is used for inbound messages, and they can also have a response address that is used for outbound messages.
Outbound integration ports have only an outbound address that is used for outbound messages.


How to Register Adapaters:
An adapter must be registered before it can be used. Adapters that are included with Microsoft Dynamics AX are automatically registered during installation.

Whenever a new adapter is added to the (AOT), you must register the adapter to make it available in the configuration forms for enhanced integration ports.

To register adapters, follow these steps:

1. Click System administration > Setup > Checklists > Initialization checklist.

2. Expand the Initialize system node.

3. Click Set up Application Integration Framework. By doing so, Adapters, basic ports, and services are registered. This operation can take some time to be completed.


How to select Adapaters:

After adapters have been registered, you must select the adapters that you want to use for integration.

In the Address group or the Response address group, click the arrow in the Adapter field, and then select an adapter in the list.
The list by default consists of:

1. File system adapter – Receive or Send

2. HTTP – Send and receive

3. ISABEL SEPA credit transfer – Receive or Send

4. MSMQ – Receive or Send

5. NetTcp – Send and receive

You can select the appropriate adapter for your connection when you configure an enhanced integration port.

How to Specify URIs
Before you can configure an adapter, you must specify its URI. The format of the URI varies, depending on the type of adapter that you selected:

1. For File system adapter and:

a. Address is an inbound address then the URI is the file system path of the directory where the port retrieves documents.

b. And if the address is an outbound/response address, the URI is the file system path of the directory where the port saves documents.
To select a directory, click the arrow in the URI field, and then browse to a folder.
Notes: Make sure that the service account for Application Object Server (AOS) has the appropriate read or write permissions for the directory.
When you submit multiple documents to a port that uses the file system adapter, the documents are processed in order based on the file names. (Workaround if needed, is to use file names that include a sequencing scheme, such as "PO_0001" and "PO_0002")



 2. For NetTcp adapter, the URI is automatically provided by Microsoft Dynamics AX, based on the port name. You can view the URI after you save the port configuration.


3. For MSMQ adapter, the URI is based on the queue that you select. To select a queue, click the arrow in the URI field, and then select a queue in the list.
The server must be configured to provide Message Queuing services, and queues must be defined before they can be used by the integration port.


4. For HTTP adapter type is HTTP, the URI is the Internet address of a website that you added by using the Web sites form. To select a website, click the arrow in the URI field. Then, in the Select Web site form, click the arrow in the Web site field, and then select a website in the list.




How to Configure adapters:


After you specify the URI of the adapter that you selected, you can configure the adapter.

In the Address group or the Response address group, click Configure. In Microsoft Dynamics AX 2012 R2, for adapter types other than NetTcp, to make the Configure AOS button visible you must save the port first.

One of the following configuration forms opens:

1. For the file system adapter, the File system adapter configuration form opens. The Microsoft Dynamics AX user account that is specified should have required rights. For example, User Account Control (UAC) is enabled in Windows, and files are created by an administrator account. For these files, the Owner attribute in the file properties is set to the Windows Administrators group. Similarly, for files that are created from a process that runs on a network service, the owner is set to NT AUTHORITY\NETWORK SERVICE.

2. For NetTcp, HTTP, and MSMQ adapters which are based on Windows Communication Foundation (WCF), the WCF configuration form opens.

The WCF configuration form contains the WCF Configuration Editor tool, SvcConfigEditor.exe, if the tool is installed. This tool is installed as a component of some versions of the Windows SDK and by Microsoft Visual Studio 2010. This tool provides a graphical user interface (GUI) that you can use to create and modify configuration settings for WCF services.

If the WCF Configuration Editor tool is not installed, the WCF configuration file opens in Notepad. You can change the WCF configuration information by modifying the XML code in Notepad. Then save the file.


Information collected from:
http://msdn.microsoft.com/en-us/library/aa496471.aspx .
To learn more about, Customization of service contracts, Processing options, Troubleshooting and security, please go through the above link.