Monday 21 November 2016

Error number: 13010 Could not connect to the Transaction Service

“Error number: 13010 Could not connect to the Transaction Service” what means that there is no real-time connection between Dynamics AX 2012 R2 and the Dynamics AX 2012 POS.

This blog explains the steps I took to enable the Retail Transaction Service on the Virtual Machine Dynamics AX 2012 R2 Drop 1, where the transaction service is already installed and configured.
Option 1: verify the Real time service profile settings in Dynamics AX 2012 R2
Start Dynamics AX 2012 (partition initial) and open company USRT (US Retail). Select the option: Retail > Setup > Retail Scheduler > Channel Integration > Real-time service profiles. Verify the settings for Real-time Service profile JBB.
Option 2: verify the used Real-time service profile for your POS
Start the option: Retail > Setup > POS > POS registers and select the Seattle-1 store. Double click and verify if the used Real-time service -JBB- profile is used for this POS Register.
Option 3: push the POS register batch job through the POS systems
Start the option: Retail > Periodic > Data distribution > Distribution schedule. Select job N-1090 and run this job directly. This job pushes the “RetailTransactionServiceProfile” to the POS database.
Option 4: verify the configuration file for the Retail Transaction Service
Open path “C:\Program Files (x86)\Microsoft Dynamics AX\60\Commerce Data Exchange\Real-time Services\6.1\Bin” and select the configuration file “RetailTransactionService.exe”. Open this file with edit and change the value of the object server key to “<add key=”ObjectServer” value=”MicrosoftDynamicsAX@AX2012R2A:2712” />”. Save the file.
Option 5: Restart the Real-time service 6.1
Open the services for the “AX2012R2A” server and select service “Microsoft Dynamics AX Commerce Data Exchange: Real-time Service 6.1″. Restart the service. This service can be set to “start automatically” and it start the “RetailTransactionService executable” from the path above, with the usage of the changed configuration file from step 4.
Option 6: verify the settings of the Commerce Data exchange web service
Open Internet Information Services (IIS) for the “AX2012R2A” server and select the site “CommerceDataExchangeRealtimeServiceWebsite”. Restart this web service via the option “Manage Web Site”.
Option 7: test the Retail Transaction Service
Open the Dynamics AX 2012 POS for store “Seattle 1″ with user “Emma Harris (000137)”. Select the option Sales > Tasks > Inventory >  Inventory lookup. Select option “”Search”, select item “0051″ and push the button “OK”. The inventory for all store is now displayed by using this Retail Transaction Service.
Option 8: Import IIS Certificate
using self-signed certificate, you need export those certificate and revocation list and import them to POS machine.
7
4
5
6


Error number: 13010 Could not connect to the Transaction Service

“Error number: 13010 Could not connect to the Transaction Service” what means that there is no real-time connection between Dynamics AX 2012 R2 and the Dynamics AX 2012 POS.

This blog explains the steps I took to enable the Retail Transaction Service on the Virtual Machine Dynamics AX 2012 R2 Drop 1, where the transaction service is already installed and configured.
Option 1: verify the Real time service profile settings in Dynamics AX 2012 R2
Start Dynamics AX 2012 (partition initial) and open company USRT (US Retail). Select the option: Retail > Setup > Retail Scheduler > Channel Integration > Real-time service profiles. Verify the settings for Real-time Service profile JBB.
Option 2: verify the used Real-time service profile for your POS
Start the option: Retail > Setup > POS > POS registers and select the Seattle-1 store. Double click and verify if the used Real-time service -JBB- profile is used for this POS Register.
Option 3: push the POS register batch job through the POS systems
Start the option: Retail > Periodic > Data distribution > Distribution schedule. Select job N-1090 and run this job directly. This job pushes the “RetailTransactionServiceProfile” to the POS database.
Option 4: verify the configuration file for the Retail Transaction Service
Open path “C:\Program Files (x86)\Microsoft Dynamics AX\60\Commerce Data Exchange\Real-time Services\6.1\Bin” and select the configuration file “RetailTransactionService.exe”. Open this file with edit and change the value of the object server key to “<add key=”ObjectServer” value=”MicrosoftDynamicsAX@AX2012R2A:2712” />”. Save the file.
Option 5: Restart the Real-time service 6.1
Open the services for the “AX2012R2A” server and select service “Microsoft Dynamics AX Commerce Data Exchange: Real-time Service 6.1″. Restart the service. This service can be set to “start automatically” and it start the “RetailTransactionService executable” from the path above, with the usage of the changed configuration file from step 4.
Option 6: verify the settings of the Commerce Data exchange web service
Open Internet Information Services (IIS) for the “AX2012R2A” server and select the site “CommerceDataExchangeRealtimeServiceWebsite”. Restart this web service via the option “Manage Web Site”.
Option 7: test the Retail Transaction Service
Open the Dynamics AX 2012 POS for store “Seattle 1″ with user “Emma Harris (000137)”. Select the option Sales > Tasks > Inventory >  Inventory lookup. Select option “”Search”, select item “0051″ and push the button “OK”. The inventory for all store is now displayed by using this Retail Transaction Service.
Option 8: Import IIS Certificate
using self-signed certificate, you need export those certificate and revocation list and import them to POS machine.
7
4
5
6


Friday 14 October 2016

SQL Tricks

How to Find Duplicate Record in the Table :-  Here I am taking InventItemBarCode Table which is having Item Variants Bar-code, Run below query into the SQL will give you record which is having more than one record.

SELECT ITEMBARCODE,ITEMID,[DESCRIPTION], COUNT(1) as Duplicate
FROM INVENTITEMBARCODE
GROUP BY ITEMBARCODE,ITEMID,[DESCRIPTION]

HAVING COUNT(1) > 1;


How to Shrink SQL database logs :- When you are facing Full disk problem in your Database Server Drive  and you don't have any junk files or folder in your Database Server, but system is showing Disk Full, due to this AX will not run and give you error while you run AX Application, Check database logs and run below SQL Query into you SQL,Change the Database name which logs want to shrink.

USE MicrosoftDynamicsAX;
ALTER DATABASE MicrosoftDynamicsAX
SET RECOVERY SIMPLE;
DBCC SHRINKFILE (MicrosoftDynamicsAX_Log, 0);
ALTER DATABASE MicrosoftDynamicsAX
SET RECOVERY FULL;






How to Compare Two SQL Database :-  To compare two SQL Database free utility.



Monday 12 September 2016

AX Retail Pos Error Number 13000 – Could not load all external service modules

Error number 13000, Error when launching Retail POS: could not load all external service modules









Missing dll in the “C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail POS\Connectors” folder.
From Folder => Copying “Microsoft.Dynamics.Retail.TestConnector.dll” from “C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Connectors” 
TO Folder=> “C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail POS\Connectors”

Sunday 4 September 2016

Getting Error :- Cannot insert multiple records in Security user role (SecurityUserRole). The record already exists.

When Insert Users form System Administration Getting Error :- Cannot insert multiple records in Security user role (SecurityUserRole). The record already exists.

 
 
 

Solution: Open SSMS, SQL DB, Select the MicrosoftDynamicsAX database and run the below query 

Select * from dbo.SecurityUserRole
Delete from dbo.SecurityUserRole Where User_='USERID'

Getting Error When Sync Database Invalid Column Name "DateRequested"

Getting Error When Sync Database Invalid Column Name "DateRequested" in Event Viewer

-----------------------------------------EVENT LOG--------------------------------------------------------------
DataException happenes when updating download session. Error Detail: System.Data.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Invalid column name 'DateRequested'.
Invalid column name 'DateDownloaded'.Invalid column name 'DateApplied'.
Invalid column name 'Status'.Invalid column name 'Message'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

-----------------------------------------EVENT LOG--------------------------------------------------------------

This error getting because of wrong message DataBase settings in Async client settings. Change Async Client Database Selection option Enter new message DB as "Channel Massage Database" as AsyncHoustonMessageDB & select existing store database as Store database option. In Async client settings you may be using Async Server message DB in the message DB option. Use only Store message DB in the Async client settings.


Wednesday 24 August 2016

Install Server Manager Rolls and Features on Non GUI Interface

By entering “sconfig.cmd” at the command prompt then pressing the “enter” key you will arrive at the following screen:
SNAGHTML1d527642
First option we should take is to change the computer name.  Select option 2.  Provide a new name for the computer then hit the “enter” key.  The server will prompt you for a reboot, click on “Yes.”
image
Once the server has rebooted re-launch sconfig.cmd and continue.  You can join the computer to a domain by selecting option 1, for sake of time in this lab, I will not be joining the server to a domain.  I will be providing an IP address however.  Select option 8 and hit the “enter” key. 
image
Select Static “S”, then provide an IP address and DNS servers where applicable to your local subnet then select option 4 to return to the main menu:
image
While Remote Management is enabled we need to run a command on our client machine that will be connecting to the server.  This will be performed on your Windows 8 client machine. To begin we need to get to the Powershell prompt. Return to the main Start screen of Windows 8 by pressing the Windows key. Type in “Powershell” and you should see the following screen, right click on “Powershell” and then click on “Run as administrator” at the bottom of the screen:

Now enter the following command replacing the <YourtargetServernameHere> with the server name both the short name and the fully qualified name(hint this might come from your home dsl router, mine did) of the target server. These will be added with quotations as seen here:
 Set-Item WSMan:\localhost\Client\TrustedHosts -Value <YourtargetServernameHere> –Force
Optional: I added a host file entry for the server name and IP address in my lab since I did not have a DNS server available yet. 
Be sure you can ping your server by name before continuing. Once that is complete you will want to install the Remote Server Administration Tool for Windows 8.  After installing the RSAT suite, we test out the connectivity.  Return to the main Start screen of Windows 8 by pressing the Windows key.   Locate the newly installed suite of icons, I labeled my tile group as “Server Tools” as seen here:
image
Launch Server Manager.  Now click on “Add other servers to manage”
image
It will start searching the domain if your computer is joined to the domain, and you joined your server to the domain then it should find the server in the list.  Since I am operating in a workgroup for this lab, I had to manually enter my server name by clicking on the “DNS” tab, then typing in my server name.  Once you see it populate below with the correct IP address, click on the arrow to move it to the right hand menu labeled “Selected”, then click “OK”:
image
Click on the “All Servers” menu on the left hand side of the Server Manager screen.  You will notice that mine has a Kerberos error.  This is because we need to manage the server as a different administrator since my Server 2012 core machine is not a domain member.   Right click the server and select “Manage As…”
image
Enter in the credentials too match your environment, mine looked like this:
SNAGHTML27abd680
It should take you back to the Servers screen and you will hopefully see this type of “In progress” activity:
image
Once the login process completes your screen should look like this:
image
Now right click the server and see what functions are available to be performed:
image
This will conclude part II of this series.  In our next installment we will turn on some Roles and Features.  If you are anxious to do more, you can always follow some of the other labs that were written for the GUI installation process, since nearly all of that process will work correctly as long as you stick to the RSAT tools as the GUI for your Windows Servers. 

Start Windows Server 2012 Without GUI Server Manager

How to Turn the GUI Off and On in Windows Server 2012

image
When Server Core originally shipped, a lot of Windows admins avoided it because you could only use the command line, but this changes with Windows Server 2012 which enabled the use of a hybrid mode.

Turning the GUI Off

In Windows Server 8 the GUI has kept with the modular nature of recent Windows Server Operating Systems and in turn has become a “Feature”. This makes removing the GUI very easy. To get started launch Server Manager.
image
Click on Manage, and then select Remove Roles or Features from the menu.
image
Click next to skip past the before you begin page, then select your server from the server pool and click next.
image
Since the GUI is not a Role, we can just click next again to skip past the Roles section.
image
When you reach the Features page, you need to uncheck the box next to the “User Interfaces and Infrastructure” option, and then click next.
image
Now tick the “Restart Destination Server” box, then click remove.
image
The GUI will now be removed.
image
After the binaries are removed your server will automatically reboot.
image
Once it comes back up, and you log in, you will only be able to use the command line.
image

Turning the GUI On

Once the GUI has been turned off, you will want to know how to get it back. To do this we use SConfig, so go ahead and type SConfig into the command line and hit enter.
image
You can see near the bottom of the screen that we can use “12” to Restore the GUI, so type 12 and hit enter.
image
You will be warned that enabling the GUI requires a reboot, click the yes button.
image
That will kick off DISM which will start to add the binaries for the GUI Shell.
image
When its finished you will be asked if you would like to restart the computer now, type “y” and hit enter to reboot.

GUI Off with PowerShell

You can do the same thing as we did in the GUI much quicker with a PowerShell cmdlet. To do so, open Server Manager, click on Tools and launch PowerShell.
image
We can use the Remove-WindowsFeature cmdlet to remove the feature:
Remove-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
Since Remove-WindowsFeature is just an alias, you could also use:
Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
image
Not long after you have  hit the enter key, the removal will begin.
image
When it’s done, you will be notified that you need to restart your server to complete the process, which can be easily done from the current PowerShell window by running:
Shutdown –r -t 0
image
When your machine restarts you will only have the command line to work with .
image

GUI On with PowerShell

The first thing we need to do is get into PowerShell, so type PowerShell and hit enter.
image
Now we need to use the Add-WindowsFeature to add the components  back:
Add-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
Again this is just an alias for:
Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
image
When its done, we will need to restart our server by using the Shutdown command:
Shutdown –r -t 0
image
When your server reboots you will have the GUI back.