August 25, 2009

Any CPU vs. x86 vs. x64

If you have ever asked what is the difference between Any CPU, x86 and x64 options in Configuration Manager platform, the answers can be very scarce and scattered through all the Internet.

However, Sayed Ibrahim, a fellow VSTS MVP has gathered in one all the responses he had so far. Check out his MSBuild: Building 64 bit versus 32 bit. Do not get misled that the post is only MSBuild related. Same principles apply for all CLR applications.

August 24, 2009

Overwrite an Olap Database problem

In disaster recovery situation, you may find that you can no longer generate the Project Server 2007 OLAP cube. The following error is logged in PWA log:

ProjectServerOlapCubeGenerator status: ProjectServerOlapCubeGenerator failed with exception: Microsoft.Office.Project.PI.CBSCommon.CBSProcessException: Cannot overwrite an Olap database created outside of Project Server or by another Project Server Site. at ProjectServerOlapCubeGenerator.OlapDatabaseBuilder.VerifySiteOwner(Server dsoAnalisysServer, Database oldOlapDatabase, Guid siteUid) at ProjectServerOlapCubeGenerator.OlapDatabaseBuilder.GenerateOlapDatabase() at ProjectServerOlapCubeGenerator.CMain.Main(String[] args)

Brian Smith wrote some time ago about this error. However it took me good 4 hours until I actually find how to resolve it, so I decided to share my experience here. Unfortunately re-creating the cube to a new name is not possible in all cases if you already have created a lot of views that are using it and they will need to be re-created also. Finding the OLAP database that you are trying to create can be found at the PWA site\Server Settings\Cube\Build Settings\Analysis Services Database to be created.

This error could happen when you move PWA site to a new site, for example as described in my previous post Disaster Recovery of PWA 2007 site. In such case the OLAP repository (the relation DB that contains metadata for your OLAP installation) thinks that you already have created a cube with the same name. Just deleting the cube, as proposed here, will most probably not help since the metadata in the repository is still there. All that you need to do is just to change the metadata as mentioned in Brian Smith’s blog comments.

At the end, the details of how to do this are the following. First - locate the record having column ObjectName with the value of the OLAP database that you are trying to create. Then - you need to replace the Project Server Site ID property in the XML stored in ObjectDefinition column with the new PWA site ID. Both columns are located in OlapObjects table, that is contained in OLAP Repository relational database.

You can locate your new PWA site ID by going to the shared service provider, find the PWA site instance and select Edit. The URL should be in the following format http://localhost:10988/ssp/admin/_layouts/createpwa.aspx?task=Edit&id=ea8ecdc7-bc0c-4788-9abd-5744605d2974 where query string parameter ID is your new PWA site ID.

Disaster Recovery of PWA 2007 site

If you need to move your existing Project Web Access (PWA) web site to a new server, chances that you have only DB backups are pretty good. Also in situation of disaster recovery it is possible that your WSS backup just can not be taken or does not exist. Here are some basic steps that will help you restore your PWA site to a new server:

  1. Restore your DB backups to the new server
  2. Provision a new PWA site on the new server
  3. Make sure that you specify the same DB name and tables names where you restored the backup in step 1.
  4. The PWA provisioning will connect to the existing tables. Make sure that there are not other PWA sites already connected to the same tables. PWA does not support multiple instances over the same tables. I think it is some architectural restriction.
  5. Backup and restore Project Workspaces on a new server if needed using stsadm –o export/import
  6. Change existing link between Project Server and Project Workspaces:

Find the magic number

SELECT     WADMIN_CURRENT_STS_SERVER_UID

FROM         MSP_WEB_ADMIN

Use this magic number in following query:

update dbo.MSP_PROJECTS set WSTS_SERVER_UID='98f19056-ea01-4680-9e13-609c10a83556' where WSTS_SERVER_UID is not null

Thanks to Project Server Blog for the tips.

In a follow up post I will show you how to create PWA with Fully Qualified Domain Name (FQDN).

August 19, 2009

How to Find if Virtualization is Running in Virtual Server

If you still have Virtual Server running, I would definitely recommend that you first migrate to Windows Hyper-V :)

However for the rest of us living in the real world, there is a cool trick to check if virtualization is actually running for your virtual machine.

You need to see the value of the following performance counter on the host machine, not the guest:

Virtual Processor\fVpProcessorInHvmMode

or also found as

Virtual Processor\HVM-VP is in HVM Mode

You can read more how to enable Hardware Virtualization in Virtual PC and Virtual Server in this article.

August 18, 2009

DevReach 2009 is coming this October

It is less than two months when DevReach 2009 will happen again in Sofia, Bulgaria. This is the forth edition of the wonderful conference gathering so many internationally recognized Microsoft Regional Directors, MVPs, INETA and TechEd speakers.

The event will take place on 12-13th of October, in Arena Cinema Mladost, Sofia. We have selected this place in order to allow even more attendees than the last year. However keep in mind that space is still limited and we are expecting even more people to come, so make sure to reserve your seat in good time.

More than 44 sessions presented by more than 20 speakers in not less than 22 hours overall experience spanning in 2 days and 4 tracks. Many new things are still to come in the schedule. They will be announced here very soon.

In a follow up series of posts on my blog, I will try to highlight some of the new speakers that are coming this year. I hope this will give you better idea of how we change the schedule every single year to accommodate your needs.

Meanwhile – do not miss the 20% discount until 15th of September. Check Registration page for more information of different benefits and passes.

August 09, 2009

Search string in SQL Server database

How you can find a string in a SQL database? One option would be to export the database to Excel file and use the Excel searching capabilities. Unfortunately I did not manage to get the export working for me at all. If you want to do it the smart way, here is a query that search all tables and columns in a database written by from Vyas Kondreddi. Another one is available for replacing string in a database.