Driving me nuts that I can’t install RSAT on a machine with SP1 already installed!!!!!!!!
Author Archive | jbmurphy
Mailbox moves and error no. c1034ad6
We have been moving mailboxes to a new Equallogic iSCSI SAN volume. The old information store is almost empty, except for one mailbox that did not get removed at the end of the move. It was sitting there with a red “X”. When we tried to delete it we received the error:
The Operation cannot be performed because this mailbox was already reconnected to an existing user.
ID no. c1034ad6
Exchange System Manager
I found this article, that suggested the it should be automatically removed once the “Exchange maintenance” runs. Since our maintenance runs over the weekend, and our “Keep deleted mailboxes for (days)” is set to 1 days, two weeks later, the mailbox should have been removed. But it wasn’t.
The problem ended up being that we had the check box “Do not permanently delete mailboxes and items until the store has been backed up” checked. This is great, but since there weren’t any mailboxes left in the information store, we had stopped backing it up!!!!
If you get the error above, and
- the lat mailbox has been moved
- you have stopped backing up your information store
- The check box “Do not permanently delete mailboxes and items until the store has been backed up” is checked
Then your last mailbox will never be permanently deleted!!!
Obvious, but maybe someone will run across this and it will save them a couple of minutes scratching their head!
OS X Finder Service to convert Grab.app TIFF files to JPG
It drives me nuts that Grab.app defaults to .tif as the file type. And no matter how many times I try the recommended :
defaults write com.apple.screencapture type jpg
I can not get it to default to save as a jpg (and I tried jpeg). All I can guess is that this command does not work in 10.6. I don’t know. It drives me nuts.
So I sat down and created a quick OS X Service in Automator that takes files as an input and changes them to jpg. First in automator I selected “Service” as my workflow type
Next, I set the Service receives selected “files or folders” in “any application” values. Then I added the “Change Type of Images” action and set “To Type” to JPEG.
Hit save as “ChangeToJPEG” and now when I right click an annoying .tif, I have an option under Services to ChageToJPG
Grab.app is still annoying, but this makes it more tolerable.
Reporting Services report from related data in SQL and a SharePointList via SSIS
This is an older project that I wanted to talk about. I worked on this last June. It was a longer post, so i procrastinated.
I wanted to create a “mash up” of data from a SharePoint List and a set of SQL tables. I tried several things, somehting that should be easy, was not (at least for me).
- First I tried using SharePoint as a DatasSource in a SQL Server Reporting Services. That worked, but I could not figure out how to combine that with a different datasource in a report. Basically I could not figure out how to use “SQL Joins” between two different data sources in SSRS.
- Second I decided to look into combining my data inside SQL server. If I can establish my relationships inside SQL, then the report would be easy. The most efficient way (AFAIK) would be to use a liked server to the SharePoint list. That way the data stays in the SharePoint list, and I am just querying it. I found several articles talking about ODBC or OLEDB connections to a SharePoint list. I just could not get it work. I saw another article strongly recommending against it (I can’t find that link right now). So I scrapped that idea.
- I Finally settled on grabbing the data out of the list and putting into a SQL Table. I am not a SQL guru, and I could not figure out how to use a temp table with SSRS, so I ended just adding a table. This table would be an exact replica of the data in the SharePoint list (not many rows). The data in the table would be erased and then repopulated every X number of hours. The question was how to get the data into SQL.
I decided to use SQL Server Integration Services (SSIS) to pull the data from the SharePoint list. I found the add-in to SSIS that made it easy to get data from a SharePoint List – SharePointListAdaptersSetupForSqlServer2005.msi. I ended up with a SSIS control flow that looked like this:
The first part deletes the contents of the destination table, second is the DataFlow piece:
The Data Conversion piece changes a “double-precision float” to a “unicode string”. All this is put together and creates a dtsx file (LoadSPList.dtsx) that can be executed by a Scheduled task:
DTEXEC.EXE /FILE “C:\LoadSPList.dtsx” /CONNECTION “connectionName”;”\”Data Source=DBName;Initial Catalog=DBName;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;\”” /MAXCONCURRENT ” -1 ” /CHECKPOINTING OFF /REPORTING EWCDI
Finally, I just to created a report that contained a SQL query to relate the two different SQL tables.
Fun project, using three different technologies, SSIS, SQL and SharePoint.
Verify if a Recipient Policy is being applied to a user
We use the excellent Dell EMS Email Continuity product. It is fantastic. All our mail is replicated (via an SMTP sink and vaultbox) to their data center. In the event of and outage, our mail will route to their system, and they provide a way for the mail to be delivered to the user. One of the benefits, is that we only need to keep a limited about of mail on our exchange server (the rest in their archives).
We purge any mail that is over a year old. Maybe it is radical, but it works for us. Users prefer a snappier exchange server to messages from 10 years ago.
I do this using Recipient Policies. I can apply “Delete immediately” for messages older than a certain date, to users in AD groups. For example, I use the following in my filter rule:
memberOf=CN=MailBoxPurge-12M,DC=DOMAIN,DC=LOCAL
To verify that a user is receiving the policy, I do the following:
- open adsiedit.msc
- In the “Select a well known Naming Context”, select Configuration
- Navigate to Services -> Microsoft Exchange -> Organization Name -> Recipient Policies -> Select the properties of the Recipient Policy that you want to verify
- Obtain the objectGUID
- Switch the “Select a well known Naming Context” to Default Context
- Now navigate to employe and select properties
- You will see a value msExchPoliciesIncluded.
If the GUID you looked up in step 4 is in there, then you are good to go.
My adventures in Exchange Log Replaying.
I wanted to restore our exchange environment in an off line VM. One of my goals was to take an information store and mount it – just to prove that I can access the data.
At our off site business continuity location, we have a Double-Take replica of our production Exchange 2003 server, including replicas of all our information stores. Those replicated store are on an Dell Equallogic SAN, which has snapshot capabilities.
I figured I could take a snapshot of the volume that contains the information store I want present it to my offline exchange, and just mount the store. When I tried to mount the store, I realized this would not be be easy. Time to do some learning.
First Error:
The log version stamp of logfile Drive:\PATH\mdbdata\E01.log does not match the database engine version stamp. The logfiles may be the wrong version for the database.
This one was easy. I was too lazy to install SP2 on the recovery server. Seems that I needed to as the logs are stamped with a version number. Quick Fix – install Exchange 2003 Sp2.
Next error:
ESA: The Exchange Virtual Server needs to be upgraded before coming online. From the Cluster Administrator program, select ‘Upgrade Exchange Virtual Server’ from the resource’s context menu to upgrade this Exchange virtual server.
Again another easy one. I just had to go into the cluster admin and right click “Upgrade Exchange Virtual Server”
Next error:
An internal processing error has occurred. Try restarting the Exchange System Manager or the Microsoft Exchange Information Store service, or both
I was using a Standby Exchange Cluster as described here. This error suggested that I did not have al my drives and paths right. For some reason this inherited Exchange 2003 cluster had the exchange program files installed to an “E:” drive. I added another drive and re-installed exchange with Sp2.
Next error:
Database recovery/restore failed with unexpected error -515.
Alright! This was a good one. I suspected my snapshot of a replicated information store might not be happy. How do I make it happy? So begins my adventures in replay logs. Here is the summary of what I learned. I understood how what to do, I just did not know how to do it!
If you suspect you are having an issue with an information store that you can not mount, run (here is your only warning – backup before you try anything.) :
eseutil.exe /mh MailStore.edb
If you see: State: Clean Shutdown – there is something else going on.
If you see: State: Dirty Shutdown – you need to get the mail store to a clean state.
AFIAK, you can get a mailstore to a clean state one of two ways. The first is to replay the missing logs and the second it to repair. The second results in loss of data.
To replay logs, look at the output of the above command again and you will see :
Log Required: 30012-30013 (0x753c-0x753d).
If you have these log files (they will have a prefix like E00 or E01), all you should need to do is run
eseutil.exe /r E01
This will find the files and replay them into the MailStore.
I tried this but I was missing a log file. I received the following error:
Operation terminated with error -515 (JET_errInvalidLogSequence, Timestamp in next log does not match expected) after 4.16 seconds.
Since I was missing a log file, and I had no other option to get it (like from a backup (this is all dev so there was need no to panic)). I had to resort to the “I loss data” method:
eseutil.exe" /p MailStore.edb
This took several hours and the output looks like this:
Initiating REPAIR mode…
Database: MailStore.edb
Streaming File: MailStore.STM
Temp. Database: TEMPREPAIR3692.EDBChecking database integrity.
The database is not up-to-date. This operation may find that
this database is corrupt because data from the log files has
yet to be placed in the database.To ensure the database is up-to-date please use the ‘Recovery’ operation.
Scanning Status (% complete)
0 10 20 30 40 50 60 70 80 90 100
|—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
……………………………………………Scanning the database.
Scanning Status (% complete)
0 10 20 30 40 50 60 70 80 90 100
|—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
……………………………………………Repairing damaged tables.
Scanning Status (% complete)
0 10 20 30 40 50 60 70 80 90 100
|—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
…………………….
Deleting unicode fixup table.
……………………..Repair completed. Database corruption has been repaired!
Repaired!
Now when I run:
eseutil.exe /mh MailStore.edb
I see “State: Clean Shutdown” and I can mount my MailStore. That was fun.
Exchange 2010 SP1 and New-DatabaseAvailabilityGroup
I was progressing along on with my offline Exchange install, and I ran into a problem when creating my Database Availability Group (DAG). I wanted to put the witness directory on a non exchange server and the instructions say:
If the witness server you specify isn’t an Exchange 2010 server, you must add the Exchange Trusted Subsystem universal security group to the local Administrators group on the witness server.
I added the correct group to the correct group and I run:
New-DatabaseAvailabilityGroup DAGNAME -witnessserver nonexchange.domain.local -witnessdirectry c:\DAGFSW
I received the following error:
WARNING: The Exchange Trusted Subsystem is not a member of the local Administrators group on specified witness server nonexchange.domain.local.
But it is in there, believe me I tripple checked. I also tried:
- I rebooted the server, deleted the DAG and tried again. Nada.
- I added the witness machine$ account to the local Administrator’s account – since all it is doing is creating a shared directory. Nope.
- Looked on the witness server, and did not see a shared folder.
- But, I never added a member to the DAG because I thought that the shared folder should be there.
So I started reading and I came across this article. Devin suggests that all you need to do, like the documentation says, is add the Exchange Trusted Subsystem to the local administrators group, and NOT add the witness machine$ account to the Exchange Trusted Subsystem group. I agree with his argument as to why it is not necessary.
BUT. I think there might be a bug in SP1. My findings are:
- If you run the New-DatabaseAvailabilityGroup command and ONLY have the Exchange Trusted Subsystem as a member of the witness’s local Administrators group:
- You will receive this error: WARNING: The Exchange Trusted Subsystem is not a member of the local Administrators group on specified witness server nonexchange.domain.local.
- If your witness folder is a directory or two deep, parent directories will be created
- The witness shared folder will not be created until you add a member to the DAG
- If you run the New-DatabaseAvailabilityGroup command AND have the witness machine$ account in the Exchange Trusted Subsystem:
- You will NOT receive an error.
- The witness shared folder will not be created until you add a member to the DAG
So, in summary, it seems:
- That there is a bug in SP1 in the New-DatabaseAvailabilityGroup command. It incorrectly reports that “The Exchange Trusted Subsystem is not a member of the local Administrators group”, when it is.
- New-DatabaseAvailabilityGroup creates the DAG and even though it spits back an error, everything seems to function once a DAG member has been created – the witness folder is created
- Devin’s article is still a valid recommendation as you do not need to add the non exchange witness machine$ account to the Exchange Trusted Subsystem group to get a DAG up and running.
Of course there could be other things at play, but as of now, this is what I have found.
My SugarCRM install proceedure for CentOS
We are evaluating CRM products at work, and I wanted to get an idea what SugarCRM looks like. Below are the steps I used to install Sugar CRM community edition. I already had LAMP up and running
Download sugarCRM: wget http://www.sugarforge.org/frs/download.php/7746/SugarCE-6.1.2.zip
Extract the zip and move to /var/www. Create a virtual host for it in /etc/http/conf.d/
Upgrade php to a 5.2.x version (I set the repo to disabled by default)
yum update –enablerepo c5-testing
service httpd restart
function SetFolderPerms {
find $1 -type d -exec chmod 775 {} \;
find $1 -type d -exec chown apache {} \;
find $1 -type f -exec chmod 664 {} \;
find $1 -type f -exec chown apache {} \;
}
SetFolderPerms /var/www/sugar/htdocs/config.php
SetFolderPerms /var/www/sugar/htdocs/custom
SetFolderPerms /var/www/sugar/htdocs/data/
SetFolderPerms /var/www/sugar/htdocs/cache
SetFolderPerms /var/www/sugar/htdocs/modules/
Visit the site you setup in the virtaul host and run through the wizard.
Very easy!
My offline Exchange 2010 install script
As I mentioned in my previos two posts, I am creating an offline replica of our Windows environment in order to test migrating from Exchange 2003 to Exchange 2010. Now that I had a replica of our Exchange 2003 server running, I wanted to add a new Exchange 2010 box. I already had a SCCM OSD with 2008 R2 that installs the box and adds it to the domain (in this case it is the fully functioning offline domain). I added the new SP1 to meet all the prerequisites. Then I used the following commands:
#In powershell (I had to do it twice for some reason) Import-Module ServerManager Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart Set-service NetTcpPortSharing -startuptype automatic .\setup.com /PrepareAD .\setup.com /mode:install /roles:mb,ht,ca
Creating an offline replica of our Windows Environment-Part 2
In part one I setup an offline DC with DHCP, DNS, AND and a Windows 7 VM. Next I wanted to create a copy of our exchange server offline. Easy, right? Just install exchange 2003 with DisasterRecovery mode (setup.exe /DisasterRecovery). Easy.
That is when the fun started. I brought up one VM with Server 2003 R2 Enterprise, set the server name to the same as the production server EXCHANGESERVER01 (this is all offline so we are okay) and tried installing with the DisasterRecovery switch. Error.:
The component “Microsoft Exchange Messaging and Collaboration Services” cannot be assigned the action “Disaster Recovery” because: – The server object for this server (“EXCHANGESERVER01”) is a clustered Exchange Virtual Server . You may not perform maintenance on this object from a standalone server. Cluster Admin should be used to perform maintenance on this Exchange Virtual Server.
Crap. Our production Exchange 2003 server is a cluster, and the installer found the AD record (offline) for the mail server. At least we know know what that the correct info is in AD! (note to self, look at EXCHDUMP to find the info that AD has). So I decided to try and trick Exchange 2003 that is being installed on a cluster, but with only one node.
So I added a couple of drives to the 2003 server (and a rename) and changed the ESX SCSI controller to “Virtual”. Tried to boot the VM and . . . Error. Crap.
Power On virtual machine:VMware ESX Server cannot open the virtual disk, “/vmfs/volumes/GUID/OEXCHANGESERVER01/EXCHANGESERVER01-02.vmdk” for clustering. Please verify that the virtual disk was created using the ‘thick’ option.
Turns out you have to create the VMDK drives images from the command line if you want them to act like a cluster and be shared!
vmkfstools -d eagerzeroedthick -c 1G -a lsilogic EXCHANGESERVER01-02.vmdk
I recreated all my drives, and got the VM to boot. Next, I went into Cluster administrator and setup a simple 1 node cluster. Now it was time to try and install exchange 2003 AGAIN. I fired up Exchange’s setup.exe /DisasterRecovery, AGAIN. Error. Crap.
The component “Microsoft Exchange” cannot be assigned the action “Disaster Recovery” because: – Microsoft Exchange setup does not support the use of the DisasterRecovery action when running on cluster nodes.
Seems like I am in a loop. Can’t install exchange via DisasterRecovery on a cluster, and I can’t install exchange on a single machine that has an AD record of it being a cluster. Crap.
I decided to just go ahead and install exchange normally, no DisasterRecovery switch, on the one node cluster. While I went through the setup, I did some surfing. Turns out what I was trying to do is :
Maybe it is just me, but that title does not sound like what I am trying to do – recover a cluster on a single node. Anyway, I continued installing exchange 2003 normally, on my offline single node cluster. Applied service pack 2, and then added a couple of roles to the cluster acording to the article.
- Created an IP address and Network name on the cluster that matched the production server, and brought them online
- Created an Exchange System Attendant resource.
Once I created an Exchange System Attendant resource, the Cluster Administrator tool found the AD records and everything was matched up. All the Exchange system configuration was there. ESM looked like it did on our production servers. Perfect. I borough one of our Information stores online (no data so it just creates a new one)
Now in theory, I can launch Outlook on my Windows 7 VM, and it should create a new mailbox in the right store (for this test, I did not try to restore our edbs – that is my next post.) .
Worked. Very nice.