Wednesday, February 27, 2008

CRM 4.0 upgrade error

While I was upgrading a server from MS CRM 3 to 4, I got this error message on the System Requirements part of the installation:

The attachments missing parent object IDs in database.

Since this did not make much sense to me, I did some research and found that I could launch the setup with a command line parameter:

setupserver.exe /L c:\crmlog.txt

and after reading that log, it appeared that many activities were being scanned and it hit an error:

Check OrphanAnnotationValidator...

the key words here are 'orphan' and 'annotation' which suggested to me that there were records in the annotation table that did not connect properly to another table.

It turns out that one of my programmers had manually converted some activities into the system using SSIS and left the ObjectID field blank on some records in the AnnotationBase table, so I deleted those records using this SQL statement:

delete from dbo.AnnotationBase
where isnull(objectid ,'fd6fc64e-5165-dc11-baa3-001a6b7af693')
= 'fd6fc64e-5165-dc11-baa3-001a6b7af693'

this statement will scan the AnnotationBase table, and for each record that has a Null ObjectID field (my invalid records), it will treat that field as though it has the GIUD 'fd6fc64e-5165-dc11-baa3-001a6b7af693'
(a unique identifier) so that it can compare it with the same GUID, therefore only the records with a null ObjectID will be found and deleted.

and then I re-started the upgrade and it got me past the error so I could continue the upgrade.

SQL 2005 SP2 Error during install

I was updating my SQL Server 2005 with SP2 (SQLServer2005SP2-KB921896-x86-ENU.exe) running on Server 2003, and it kept getting an error on the installation of the Database Services. It gave me a log file to look at located at:

C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB921896_sqlrun_sql.msp.log

and it was HUGE! it took forever, but I finally found this message burried in the log:
---------- clip -----------
MSI (s) (98!44) [22:27:08:640]: Product: Microsoft SQL Server 2005 -- Error 28062. SQL Server Setup cannot install files to the compressed or encrypted folder: D:\Program Files\Microsoft SQL Server\. To continue, make sure that your installation directories are not compressed or encrypted, or specify a different directory, and then run SQL Server Setup again.

Error 28062. SQL Server Setup cannot install files to the compressed or encrypted folder: D:\Program Files\Microsoft SQL Server\. To continue, make sure that your installation directories are not compressed or encrypted, or specify a different directory, and then run SQL Server Setup again.
---------- clip -----------

and sure enough, someone had compressed the entire SQL server folder. So I uncompressed it and re-ran the SP2 update and it worked fine.

Hope this helps!