Thursday, December 30, 2010

SSAS: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Today, I've no idea what happend to my SSAS suddenly!! but I got that nasty error while browsing one of my cubes.
Searched it down and found that you'll need to re-install the 'office 2003 web components' Although I'm using Office 2010 for the last 2 Months.
Also if you have time, please read that... will explain more Office Web Components “Roadmap”

Thursday, December 23, 2010

Server Explorer not showing up on Visual Studio 2008

Hello,
VS 2008 is acting up lately on me! nothing happens when you click on "server explorer" from the VIEW menu, or press "Ctrl + Alt + S".

The fix is to open a Visual Studio Command Prompt  and run  devenv /resetsettings or devenv /setup

Friday, December 17, 2010

How to Setup Row-Level Security for SQL Server - Linked Article

Before I used to do it through several 'Views' and grant different permissions to each View, but recently I came across this good article by K. Brian Kelley....
How to Setup Row-Level Security for SQL Server

Friday, December 3, 2010

T-SQL Display Month Numbers and Names

SELECT Number + 1 as [Month Number],
DateName(mm,DATEADD(mm,Number,0)) as [Month Name]
FROM master..spt_values
WHERE Type = 'P' and Number < 12

Tuesday, November 9, 2010

SSIS Get date with the leading zeros

Hello,

Just a quick note on formatting SSIS date expression to display leading zeros for single digits days and months.

With refeence to this article ... http://codingstuffs.blogspot.com/2007/03/pgp-inside-ssis-package.html

The mentioned date variable can be done in a different way..

(DT_WSTR,4)YEAR(GETDATE()) +
SUBSTRING("0" +   (DT_STR, 2, 1252) DATEPART( "MM", GETDATE()) , LEN( "0" +   (DT_STR, 2, 1252) DATEPART( "MM", GETDATE()) ) - 1, 2 ) +
SUBSTRING("0" +   (DT_STR, 2, 1252) DATEPART( "DD", GETDATE()) , LEN( "0" +   (DT_STR, 2, 1252) DATEPART( "DD", GETDATE()) ) - 1, 2 )


or even using a smaller expression

Right( "0" + (DT_WSTR, 2 ) MONTH(Getdate()),2)  + "-" +
Right( "0" + (DT_WSTR, 2 ) DAY(Getdate()),2)  + "-" +
(DT_WSTR,4)YEAR(GETDATE())

Hope that helps.

Saturday, October 23, 2010

Save a copy as is not an option! Visual Studio 2008

Today while I was updating a SSIS package and was ready to upload it to the MSDB, I noticed that "Save a copy as" is not an option under the FILE menu, Referring to my earlier post: Server Explorer not showing up on Visual Studio 2008 , looks like the settings reset must have erased it.
the fix is to add it back on the menu!

Friday, September 17, 2010

ALBHABET in T-SQL

SELECT CHAR([number]) AS [ALBHABET]
FROM master..spt_values
WHERE number BETWEEN  65 and 90

Thursday, July 15, 2010

Saturday, May 29, 2010

Thursday, March 18, 2010

SSIS The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

Hi, ever tried to read or write to an excel file and got that error? 
"The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."

Well it just happened to me today, I just got a freshly built machine, windows 7 ultimate 64BIT, 12 GB RAM, and Office 2010 installed.

Anyway after investigating the issue, just make sure and load the 2007 Office System Driver: Data Connectivity Components from:


That solved the issue for me..

Thursday, March 4, 2010

Create Restore Point in Windows 7

To create a restore point in windows 7:

1-click the Start button (the windows logo round button), right-clicking Computer, and then click Properties, that will give you the system properties.

2-In the left pane, click System protection.

3-Click the System Protection tab, and then click Create.

4-It'll prompt for a description,  type a description, and then click Create.

That's It!!

Thursday, February 18, 2010

MDX & DAX Formating tool.

Sweet and short, like the post title said, it is the online version of the MDX Studio product. The full version can be downloaded from http://www.mosha.com/msolap/mdxstudio.htm
For discussion, bug reports, feature suggestions etc - please visit MDX Studio forum.

http://mdx.mosha.com/default.aspx

Tuesday, January 5, 2010

SQL Server Activity Monitor

I had hard time today trying to find out where Microsoft hed the Activity monitor in SQL 2008, it's in the tool bar itself, as a graph icon, dispite it's old location in 2005 under the tools menu.