Tuesday, September 9, 2014

Ax 2012 sync error - Unable to convert data types to anything but character field type (0 to 4).


Ax 2012 sync error:
After upgrading the Ax 2012 i got the below error in sync the database.
Illegal data conversion from original field LEDGERJOURNALNAME.VOUCHERALLOCATEDATPOSTING to LEDGERJOURNALNAME.VoucherAllocatedAtPosting: Unable to convert data types to anything but character field type (0 to 4).
the only way i found to solve it was:
1- Backup the original table using:
    SELECT * INTO newtable [IN externaldb] FROM table1;
2- Delete the original tables.
3- Sync database to recreate the tables.
4- Compare columns between the two tables. 
     you can use: https://www.diffchecker.com/
5- reinsert the data from the backup table into the original one.
6- re-sync the database didn't issue any error.

Cannot drop the database because it is being used for replication

Error:
Cannot drop the database because it is being used for replication.
Solution:
sp_removedbreplication ‘dbname’

Thursday, July 17, 2014

Windows Server 2012 Activation using CMD:

Open CMD as administrator:

> Slmgr.vbs –ipk your product key
> Slmgr.vns –ato

To “rearm” Windows on the any demo virtual machine after the expiration:

> slmgr -rearm
Restart
> Slmgr.vns –ato

To open the activation screen:

> SLUI 3


Sunday, March 30, 2014

Error while opening "SQL Server Configuration Manager" - Error: 0x80041010

Error while opening "SQL Server Configuration Manager"
Error:
Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 and later servers with SQL Server Configuration Manager.
Invalid class [0x80041010]


Solution:
start a command prompt (as administrator):
>cd "C:\ProgramFiles (x86)\Microsoft SQL Server\100\Shared\"
> mofcomp sqlmgmproviderxpsp2up.mof

Sunday, January 19, 2014

Get SID using CMD

1. 
>wmic useraccount where name='username' get sid

2. 
>wmic useraccount where name='%username%' get sid

3. 
>whoami /user

4.
>wmic useraccount get name,sid

Wednesday, January 15, 2014

Configure SQL after change computer name

After changing the computer name for a machine that has a SQL installed there is some additional step required:
1- select @@servername 
     > to view the current server name
2- sp_dropserver "Old_Server_Name" 
     > to remove the old server name
3-  sp_addserver "New_Server_Name", local 
      > to add the new server name

Cisco - Access List for internet access only

how to configure ACL on Cisco switch for internet browsing only:

VLAN 60 > Guest VLAN
Network Address: 192.168.60.0
Subnet Mask: 255.255.255.0
Gateway: 192.168.60.1

DHCP configuration:
ip dhcp excluded-address 192.168.60.1 192.168.60.50
ip dhcp pool Guest
   network 192.168.60.0 255.255.255.0
   default-router 192.168.60.1
   dns-server 8.8.8.8
!

Configure ACL:
access-list 102 permit udp 192.168.60.0 0.0.0.255 any eq domain
access-list 102 permit udp 192.168.60.0 0.0.0.255 any eq bootpc
access-list 102 permit udp 192.168.60.0 0.0.0.255 any eq bootps
access-list 102 permit udp host 0.0.0.0 eq bootpc host 255.255.255.255 eq bootps
access-list 102 permit tcp 192.168.60.0 0.0.0.255 any eq www
access-list 102 permit tcp 192.168.60.0 0.0.0.255 any eq 443

Apply ACL on the Vlan interface:
interface Vlan60
 ip address 192.168.60.1 255.255.255.0
 ip access-group 102 in

Tuesday, January 14, 2014

Cisco VPN client minimized

How to solve Cisco VPN client issue when it stayed minimized to taskbar.

Edit vpnclient.ini located in "C:\Program Files (x86)\Cisco Systems\VPN Client" for Windows 7 64 bit
Change WindowX and WindowY to:
WindowX=129
WindowY=60
This should solve this issue.