Wednesday, December 26, 2012

Yet Another Exchange Activesync Issue

A user received a new Android tablet and they wanted to sync their email with the Exchange 2010 server. After configuring everything phone side the phone never displayed the security setting warning and displayed a loading sign that never ended.

On the server side, the exchange server was spewing event id 1008 into the event log.

Other users had no problem, but this was the first time this user had attempted to sync with exchange.

To make a long story short and after some googling I found,  Cannot sync iPhone with Exchange ActiveSync.
This article talks about a permissions problem on the server. The solution was to verify that the user has the "Include inheritable permissions from this object's parent" checked on the Active Directory user's permissions.

1. Open "Active Directory Users and Computers" (dsa.msc).
2. Go to "View" and make sure "Advanced Features" is checked, if it isn't - check it.
3. Find the problematic user and open its "Properties" (right click --> Properties).
4. Go to the "Security" tab and click on the "Advanced" button.
5. Verify that the "Include inheritable permissions from this object's parent" checkbox is checked. If it is, you may try to reset the user's permissions by clicking on the "Restore defaults" button.

After fixing the permissions and then newly adding the email account on the tablet, everything worked but the initial sync did seem to take a little while. It is interesting that this is the same root cause of a similar problem I had before.The interesting thing is that I checked this on all of the users last time and I also checked all of the users again this time. Probably I missed this one user the last time around though....

Tuesday, December 25, 2012

Cannot install to GPT partition

I was attempting to install Windows 7 to a laptop using a flash drive.
The first problem I ran into was that the laptop would not detect my usb flash drive and I could not set the DVD as the boot drive. In the bios I found a setting called csm or something like that. I enabled that setting and on the next boot, the bios detected the usb drive and the DVD drive.

In the Windows 7 installer I attempted to choose the partition for the install but I was greeted with the error, "windows cannot be installed on this disk. The selected disk is of the GPT partition style."
Cutting to the chase, I had to delete all of the partitions before the installer would allow me to install Windows 7.

Tuesday, July 31, 2012

Removing Duplicates in MySQL

I inherited a database that had some performance problems.

To improve performance on one of the tables we added a few indexes based on common searches for that table. The problem was that there were a number of duplicates that prevented creation of the indexes.

To fix this problem I ran the following query all at once in phpmyadmin as temporary tables only last the duration of the connection.



CREATE TEMPORARY TABLE bad_temp AS SELECT DISTINCT * FROM bad_table;
 
DELETE FROM bad_table;

INSERT INTO bad_table(email,nid,timestamp) SELECT email,nid,timestamp FROM bad_temp;

DROP TABLE bad_temp;

This took care of the problem and I was able to add the index.
ALTER TABLE `good_table` 
ADD PRIMARY KEY (`email`, `nid`, `timestamp`)
A nod to Database Journal that gave me the idea.