Tuesday 12 November 2013

MS SQL Server 2012: I forgot to add an administrator account

Maybe you had previously the similar problem. You were installing MS SQL Server 2012 and you forgot - missed - or your choice was not correct - to add an administrator account to administer your new SQL Server. I had another problem - I've added Administrators group, not an administrator user. I hoped that it will work for all users in that proper group. Unfortunatelly not.
So I searched google for some solution. Of course, I found a lot of articles about creating new login with sa privileges.
E.g. http://www.practicalsqldba.com/2012/08/sql-server-lost-all-administrator.html

But due to a higher security I've chosen the Windows authentification only. My newly created SQL account didn't work. I had to enable the Mixed authentification on my SQL instance. And I want to share this guide because when I searched it on google I was not successful.

1. Run regedit
2. Locate MSSQL setup

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.'YOUR INSTANCE NAME'\MSSQLServer

3. Modify LoginMode key to value 2.
It means 1 for the Windows authentification, 2 for the Mixed one.

You have to restart your database service.

Then create new login for your windows user, assign him proper role and switch LoginMode back to the Windows authentification.

Saturday 5 October 2013

CRM 2011: "CRM is trying to connect" stuck in Outlook client

WARNING:
Solution of this problem is not included in this article. Unfortunately.

STORY:
Once upon a time I decided that it is the right time to start to play with the MS Dynamics CRM. I've installed new W2003 Server virtual machine, SQL 2005, CRM 4 and MS Office 2003. Everything works nice, web client and outlook CRM client too.

So I tried to create new virtual machine for CRM 2011. I've installed W2008 Server R2, SQL 2008, MS Office 2013 and CRM 2011, applied all SPs. 

The first - clear CRM 2011 (without rollups, I don't know if there is some rollup which supports the Office 2013) doesn't support the Office 2013. So I uninstalled them and installed Office 2003. Everything was fine. 

I started to study some MS course (Introduction to MS Dynamics 2011) and I found out that the Word 2010 should be better for Mail merging. I uninstalled the Office 2003 and installed the Office 2010. Then I uninstalled the CRM client and installed it once more. 

Unfortunately Outlook 2010 crashed with enabled CRM Client add-in. So I uninstalled whole CRM Server and did whole new installation of the CRM Server and the CRM Outlook Client. It didn't help. Outlook was still crashing.

I uninstalled the Office 2010 and installed the Office 2007. Client was reinstalled too. Outlook hadn't crashed anymore but it was unable to connect to the CRM Server. It got stuck on information "CRM is trying to connect". I tried google but there was no useful solution. Nothing worked for me. I thought: Danny, the Office 2003 worked before, try it.

But still it was not possible to connect to the the CRM Server from the Outlook 2003. Still connecting message. Web client worked fine.

Next step was remove that virtual machine. Currently I am installing brand new virtual machine .o)

UPDATE:
I've configured new virtual machine. Order of installation - W2008 Server R2 64bit, Active directory, Office 2010, SQL Server 2008, CRM Server 2011, CRM Client for Outlook. Now it works. It's little freaky.

SUMMARY:
Unfortunately nothing helped me. Only the re-instalation of the whole environment. 

Friday 20 September 2013

Ax 2012: Publikování kódu na server

Pokud upravujete kód, který je prováděn na serveru (batch nebo nějaký jiný server job), pak je vždy po úpravě kódu v Ax potřeba kód publikovat do CIL.
Provede se to použitím tlačítka ve vývojovém prostředí


Ax 2012: System.AccessViolationException error

Problem: Ax client crashes when Ax client starts or user clicks on functionality in Ax client.

Symptoms: New code modification was published on AOS but clients have cached old versions.

Solution: Clear *.auc files and User's usage data.

1. Files should be removed from C:/Users/%user%/AppData/Local. Remove all *.auc files.



2. User's usage data can be cleared by user - Ax Client > File > Tools > Options > Usage data > General > Reset.



3. User's usage data can be cleared by admin - Ax Client > System administration > Common > Users > Users > User detail > Options > Usage data > General > Reset


Source:
https://community.dynamics.com/ax/f/33/t/100707.aspx#.Ujv9c8ZT6k8
http://dynamics-ax-live.blogspot.cz/2010/03/more-information-about-auc-file.html

Ax 2009: Debugging of batch jobs

http://msdn.microsoft.com/en-us/library/cc588679(v=ax.50).aspx

Ax 2012: Debugging of server/batch jobs

All batch jobs and service operations now run in managed code (IL) and require different debugging steps.  Rather than setting breakpoints within X++, you need to set them within the IL code that corresponds to the X++ code and debug in Visual Studio.

  1. Open Visual Studio as 'administrator' and attach the debugger to the Ax32Serv.exe process.



  1. Once done, open up the file you want to debug in Visual Studio. All of the X++ code is compiled into IL and can be found in the following directory after deployment:..\Program Files\Microsoft Dynamics Ax\6.0\Server\AxaptaDev\Bin\XppIL\source\
  2. Set a breakpoint in the file you opened.
  3. Go to Ax and run the process in batch mode, or execute the service operation. This will end up hitting your breakpoint, provided you set it in the right place.
If you make some changes to X++ code and want those changes reflected in the generated IL code, you need to do the following AFTER you have compiled the X++ code.Once done, your changes will be reflected in your next debugging session.

Source: https://community.dynamics.com/ax/b/mafsarkhan/archive/2011/05/30/how-to-debug-batch-jobs-and-service-operations-in-dynamics-ax-2012.aspx#.UjwULcZT6k8

Vítejte

Vítám vás na svém blogu.
Jeho účelem je primárně výměna znalostí.