Wednesday, September 28, 2011

Visual Studio 11 Ultimate Developer Preview

I'm so excited to hear about the new VS 2011, i've downloaded and played around to create new databases and do some stuff in denali and it has the new JUNEAU featues...
Give it a shot....HERE

Thursday, September 22, 2011

SSRS - An item with the same key has already been added

Ever got this message and wondered what does it means?
The query works fine in SSMS but fails to refresh and update the column names in SSRS !!



It happen to be that I've used the same column names in my query, but SQL handled it as I was using a table prefix in my join.

Just alias your column names !!!  and remember not to select * !!!

Monday, September 12, 2011

SQL Server 2005 Express Tools is blocking SQL 2008 R2 upgrade!!

I was upgrading SQL server 2008 to 2008 R2, the installtion stops with error "SQL Server 2005 Express Tools in installed"  !! please uninstall, but unfortunately I don't have that!! and can't find it under the list of installed programs in the control panel!

Tried the skip check flag "/skiprules=Sql2005SsmsExpressFacet"  with no use !!

I took a backup of the whole registry, and removed the whole "Registry Key 90" folder!
HKEY_LOCAL_MACHINE > Software > Microsoft > Microsoft SQL Server > 90


It worked!!

Thursday, September 8, 2011

SSRS Day name of Date Time

=WeekdayName(datepart("w", Fields!packagestart.Value))

TypeGuessRows for excel! SSIS Excel import NULLS !

I have an Excel file that I want to import into SQL Server.

The package works fine! Except it nulls out some columns. and since these columns are null, it's picking null for the rows.

interesting, you could change the number of rows that's being used for guessing by the jet engine...

http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/54dc94c5-280b-41e5-82fe-26925f9eb95b/

I never had this problem before, so I'm learning now!!

Learned that a TypeGuessRows in registry which is 8 by default, and this is number of rows which Jet engine try to fetch "data type" can be changed up to 16.

At the following location.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\X.X\Engines\Excel

Another property named IMEX which is for Mixed types in excel. actually when Jet engine mark any column as mixed type ( like columns which character and numeric together ), then IMEX=1 excel will always fetch data as text.

so use IMEX=1 and set TypeGuessRows as number of rows which is appropriate.


Related MS KB:
http://support.microsoft.com/kb/189897

Hope that helps someone as it helped me.

Wednesday, September 7, 2011