Minor Update to BIDS Helper for SQL 2008


If you have installed BIDS Helper 1.3 for SQL 2008 in the last few days, you might want to head back to the site and pick up the new 1.3.0.7 build for 2008. There is an issue with one of the assembly references picking up a 9.0 assembly instead of a 10.0 assembly which causes the Variable Window Extensions to throw various error messages.

If you are using the SQL 2005 build you will not be affected by this issue.

author: Darren Gosbell | posted @ Wednesday, August 20, 2008 11:46 PM | Feedback (1)

Error 2738 while trying to install Adventure Works BI sample on Vista


When trying to install the Adventure Works 2008 sample database on my new SQL Server 2008 instance I very quickly got a message box about the installation failing with an error of 2738. For some reason this sounded familiar and sure enough a quick search turned up this post from Mitch (see: The error code is 2738) where he had the same error (with a different installer). It appears to be the same issue as the same fix worked for me and now I am up and running with the new sample database.

 

author: Darren Gosbell | posted @ Wednesday, August 20, 2008 4:08 PM | Feedback (0)

BIDS Helper 1.3 Released (now with support for SQL 2008)


I am pleased to announce that the BIDS Helper team have just released v1.3 which is our first release with support for SQL Server 2008.

With these release we have also improved our international support. All of the features in BIDS Helper still only display in English in their user interfaces. But in previous versions, some of the features of would not work at all in non-English versions of BIDS because of the way we were integrating into BIDS. This has now been fixed and all of the features of BIDS Helper should work regardless of the language in BIDS.

The expression highlighting in SSIS has been expanded to include highlighting variables that have expressions set on them.

image

And you can easily bring up an edit window for variable expressions .

image

And continuing on the SSIS variable theme, we have added support for changing variable scopes without having to delete and re-create them.

image

And there are a number of subtle things like adding a "sort by name" option in various places

image

Below is the full list of the new features in this release.

Analysis Services

Dimension Data Type Discrepancy Check

Non-Default Properties Report

Printer Friendly Aggregations

Similar Aggregations

Smart Diff

Integration Services

Deploy SSIS Packages

Fix Relative Paths

Non-Default Properties Report

Reset GUIDs

Sort Project Files

SSIS Performance Visualization

Pipeline Component Performance Breakdown

Variables Window Extensions

New Deployment Option

Finally, there are 4 different downloads in this release, you have your choice of a SQL Server 2005 version and an SQL Server 2008 version and each of these has the option for either a full install or an xcopy deployment for those people who may want to install BIDS Helper on a machine where they do not have admin rights.

author: Darren Gosbell | posted @ Saturday, August 16, 2008 9:51 PM | Feedback (0)

VS.NET 2008 SP1 is available


The download for VS.NET 2008 SP1 is available now: http://msdn.microsoft.com/en-au/vstudio/cc533448.aspx. This should fix the issue with running BIDS for SQL Server 2008 and VS.NET 2008. I'm downloading just downloaded it - it's tiny at about 500Kb, I hope it's not one of those "web install" stubs as I am going to be disconnected for most of the day and It's going to be frustrating if the SP stops installing part way through.

Update: As I suspected, the tiny file was just a web download, there is a link which I originally missed on the download page to an .iso file which is 830Mb which is more like what I would have expected. It's all downloaded and installed now and I did not really have time this morning to download something that size anyway. :)

author: Darren Gosbell | posted @ Tuesday, August 12, 2008 8:03 AM | Feedback (0)

SQL Server 2008 has been released, but some BI developers will need to wait...


For those of use with MSDN or Technet subscriptions, SQL Server 2008 is available for download now and you have probably heard this from multiple sources already. (is there an echo in here?)

But for anyone that wants to work with the BI tools and who already has VS.NET 2008 installed you will need to wait until VS.NET 2008 SP1 is released (see http://support.microsoft.com/kb/956139) which will hopefully only be a few days. This is because BIDS in 2008 is based on the VS.NET 2008 SP1 build.

If you don't have VS.NET 2008 installed you don't need to worry about this, the setup for 2008 will work just fine.

 

Technorati Tags: ,

author: Darren Gosbell | posted @ Friday, August 08, 2008 7:08 AM | Feedback (0)

SSAS: Scripting out a Process command


image I had a comment recently on one of my older posts (which was about processing a cube with XMLA) asking how I scripted out the process command from SQL Server Management Studio. It is much easier to explain this with pictures than with words alone, hence this post.

If you right click on an object in the object browser in management studio and click on the process option you will get a dialog box like the one below.

 

 

image

This dialog has a "Script" button at the top, like many of the dialogs in Management Studio.

image

Clicking on the button itself will script the action to a new query window or you can click on the drop down arrow next to this button to get a list of other possible places to send the script to.

author: Darren Gosbell | posted @ Sunday, July 27, 2008 9:49 PM | Feedback (0)

MDX ratio of "current parent" issue


Every now and then on the SSAS MSDN forum, the issue of doing a generic "ratio to parent" calculation comes up. Unfortunately there are a number of problems with the premise of giving users a generic "ratio to parent" measure.

The first is that the concept of "parent", by definition, requires a hierarchy and SSAS 2005 supports multiple hierarchies.

Consider this query:

SELECT
  Non Empty [Product].[Product].[Product].Members on Rows,
  {Measures.[Sales Ratio]} ON Columns
FROM [Adventure Works]

I am using the [Product] attribute, which belongs to two user defined hierarchies.

image image

So what does the user want to see? In the context of the Adventure Works DW database, they probably expect to see a percentage of the Product sales for either the Safety Stock Level or Subcategory. However each attribute is also a single level hierarchy it would also be valid to return the ratio of each Product to [Product].[Product].[All Products].

But the fun does not stop there. What about this next query:

SELECT
  [Date].[Calendar].[Month].Members on Rows,
  {Measures.[Sales Ratio]} ON Columns
FROM [Adventure Works]
WHERE [Product].[SubCategory].[Mountain Bikes];

Which "parent" do you think the user wants to see? We know which date hierarchy to use as I have specified the [Calendar] hierarchy, but we are also slicing by the [Mountain Bike] Subcategory, so giving the ratio based on the Bikes category would be another valid interpretation.

And as you can probably guess we can keep getting more and more complicated. A relatively simple query like the following has a dimension on each axis and a slicing member, so now we have 3 possible "parents" that we could choose from...

SELECT
  [Date].[Calendar].[Month].Members on Rows,
  [Promotion].[Promotion Category].[Promotion Category] ON Columns
FROM [Adventure Works]
WHERE (
 [Measures].[Sales Ratio]
,[Product].[SubCategory].[SubCategory].[Mountain Bikes]
);

The problem is that within the multi-dimensional space of the cube there are many parents and MDX really needs you to tell it which parent you are talking about. Even with relatively simple queries you can have multiple dimensions on a single axis and hence multiple potential parents.

It is technically possible to get "kind of" close doing something like the following using the Axis() function: 

CREATE
 
MEMBER CURRENTCUBE.[MEASURES].[Sales Ratio] AS

   
IIF

   
(
       
(
          [Measures]
.[Sales Amount]
        
,Axis(1).Item(0).Item(

         
Axis(1).Item(0).Count - 1).Hierarchy.CurrentMember.Parent
       
)
     
= 0
    
,null
    
,
        [Measures]
.[Sales Amount]
     
/

       
(

          [Measures]
.[Sales Amount]
        
,Axis(1).Item(0).Item(

         
Axis(1).Item(0).Count - 1).Hierarchy.CurrentMember.Parent
       
)
     
   
)
  
,FORMAT_STRING = "Percent"

Which sort of gives us a  "Percent of Row parent" calculation and this is probably the best you can do, but if you crossjoin multiple hierarchies on the row axis we are in trouble again.

The whole idea of "current parent" is really much more difficult than it first appears. In general anything that requires a calculation to have an awareness of the current context of a query should be avoided.

Given all the above it is preferable to look at building specific ratio calculations or pushing this sort of task onto the client. Some client tools will let the user define calculations or if you use Excel you could create these ratios off to one side of the pivot table.

Technorati Tags: ,

author: Darren Gosbell | posted @ Saturday, July 26, 2008 10:18 AM | Feedback (1)

PowerShell and SSIS


Up until now, most of my use of PowerShell has been against SSAS, but I recently had a need to setup a number of SSIS packages for some relatively large CSV files. My problem was that the CSV files had about 125 columns and 120 of them (10 years of monthly figures) need to be inserted into Numeric(18,5) columns in SQL Server. However the connection manager auto-detected these columns on my flat file connection manager as DT_FLOAT. Changing these columns to DT_NUMERIC and setting the scale to 5 quickly proved to be tedious.

So I fired up PowerShell Analyzer and started poking around. Unfortunately I soon found that the combination of SSIS and PowerShell proved to be a little problematic. I think that the issue comes about because PowerShell tries really hard to help you out as far as object types are concerned. It has this concept of Type Adapters which usually make things easier. Unfortunately under the covers it appears that the SSIS API's use a relatively thin .Net wrapper over the top of some COM objects. I don't know for sure, but I'm guessing that the COM might be there as a partial bridge from the unmanaged code through to .Net.

But in the case of PowerShell this is an issue as it seems to be able to "see" through some of the .Net objects and interfaces to the COM based code and no matter how I tried to cast some of these objects as a specific type, PowerShell kept returning them as System.__ComObject.

Not to be one to admit defeat (and being too lazy to edit 120 columns by hand) I pulled together some C# to work with the interfaces that I need and then exposed this as PowerShell cmdlets. This both simplified the script and got around the issue of PowerShell not casting to the interfaces I needed.

The following script opens a package, grabs a reference to the columns property of a given csv connection and then loops through the columns, changing all the datatypes and then finally saves the package.

add-PSSnapin powerSSIS $pkg = get-ssisPackage "C:\temp\Test Package.dtsx" $fileCon = $pkg.Connections["CSV file"] $col = $fileCon.Properties["Columns"].GetValue($fileCon)

 

for ($i = 4; $i -lt $col.Count; $i++) { $name = get-ssisflatfileColumnName $pkg "CSV File" $i if ($name.startsWith("Column")) { set-ssisflatfileColumnName $pkg "CSV File" $i "Mth$($i-2)" $c = get-SSISFlatFileColumn $pkg "CSV File" $i $c.DataType = [Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType]::DT_Numeric $c.DataPrecision = 18 $c.DataScale = 5 } } set-SSISPackage $pkg "C:\temp\Test Package.dtsx"

 

I have highlighted the cmdlets I built in red. There weren't many and the ones to open and save packages were not strictly necessary, they just helped take a few lines of plumbing code out of my script. It was really just the cmdlets that get and set the column name and the one that gets the column object that I could not do in "native" PowerShell.

I am still looking into this as I can't help feeling that there must be a better way of doing this, but at the moment everything I have tried has been unsuccessful.

If anyone has any experience in this area, or thinks that this is either a good or bad idea, I would be interested to hear from you.

author: Darren Gosbell | posted @ Monday, July 14, 2008 12:21 AM | Feedback (1)

MVP for another year!


MVP_FullColor_ForScreenI got an email from the MVP program this morning saying that I have received the MVP award for another year.

And congratulations goes out to Greg Galloway on being awarded as an MVP. Greg and I have work with on BIDSHelper and the Analysis Services Stored Procedure project together and he is one smart cookie :) 

author: Darren Gosbell | posted @ Wednesday, July 02, 2008 7:58 AM | Feedback (1)

Performance Point Monitoring - cannot connect to the specified server


Today I was moving a prototype dashboard off a virtual server onto a development server. I saved the workspace file and copied it over and I got the following error when I clicked the test button in the data source page - "Unable to connect to the specified server. Make sure the address is correct"

image

This was a bit puzzling as it was connecting to "localhost" so it should have worked fine on the dev server.

If you do a search in your favorite search engine for this error you will possibly come across the following Microsoft Knowledge base article http://support.microsoft.com/kb/953107 (I have not set this up as a link so that it does not get any extra "google juice") which recommends uninstalling .Net 3.5, uninstalling PPS and then re-installing PPS before installing .Net 3.5. I'm not even sure if this server has the .Net 3.5 framework installed on it. Luckily I'm a bit lazier than that :) Looking down a few more results in the search turned up a forum post where it mentioned that the name of the PPS server is saved inside the workspace (.bswx) file.

So I opened the options dialogue and checked in the Server tab.

image

And what do you know, the name of my vritual PPS Monitoring server name was embedded in the workspace file and it was this server that Dashboard Designer could not find, not the SSAS server. Once that was fixed everything started working again.

image

If the error message had have said either

"Unable to connect to the specified PPS Monitoring server. Make sure the address is correct"

or better yet, something like:

"Unable to connect to the PPS monitoring server http://virt2k3s:40000/WebService/PmService.asmx. Make check the Server Url in the options dialog and make sure it is correct"

I could have solved this without having to resort to a web search. I have found that PerformancePoint has a few other non-specific error messages like this which are quite frustrating. I know there is the concept of not putting too much detail in the error messages for security reasons, but this error message is almost useless.

Another interesting development that I stumbled across is that the Dashboard Designer does not even seem to know that it stores this setting. If you change only the server details and then close Dashboard Designer without explicitly saving it will not recognize that the .bswx file needs saving and will discard your edits.

Update 21 Jun 08: As Nick points out. He actually covered this issue and much more in his post on connection issues in PerformancePoint, so if you are having other connection issues in PPS you should definitely check out that post. I had read his post when he made it and I knew I had all my identities correct as I had already connect to this server and was able to access other scorecards on it.

The subtle thing that I had missed was that opening a .bswx file could change the connection of a workspace.

I was also using a PC that still had IE7 configured to use live search which I had throught was closing the gap with google, but I just checked and live search ranks Nick's post much lower than google. So I have also just taken the link tags off the url to the MS KB article so that I do not contribute to that particular article's search ranking.

author: Darren Gosbell | posted @ Saturday, June 21, 2008 12:02 AM | Feedback (6)

A Rose by any other name - MDX Formatting


A little while ago Jamie posted about how he formats SQL code which happens to be quite similar to the way I do it. But this then lead me to think about the equivalent formatting for MDX.

So if I get MDX like the following:

with member measures.ptd as 'sum(periodstodate([Date].[Calendar].[Month],
[Date].[Calendar].currentmember),[Measures].[Sales Amount] )',format_string = "currency"
select   {[Measures].[Measures].[Sales Amount] ,measures.ptd} on 0,
{[Date].[Calendar].[Month].&[2003]&[2].children} on 1 from [Adventure Works] where 
([Product].[Product Categories].[Category].&[1])

 

I will tend to change it to something like this:

 

WITH 
    MEMBER measures.ptd AS 
        SUM(
            PERIODSTODATE([Date].[Calendar].[Month]
                         ,[Date].[Calendar].CurrentMember
                         )
            ,[Measures].[Sales Amount] 
            )
        ,FORMAT_STRING = "currency"
SELECT   
    {Measures.[Sales Amount] 
    ,Measures.ptd} ON 0,
    {[Date].[Calendar].[Month].&[2003]&[2].children} ON 1 
FROM [Adventure Works]
WHERE ([Product].[Product Categories].[Category].&[1])

 

When formatting MDX I apply the following formatting guidelines:

  • All keywords are in uppercase
  • The main Keywords WITH, SELECT, FROM and WHERE are the only ones on the left margin, each at the start of the line
  • Each inline MEMBER or SET definition is on a new line and is indented and the expression for those members or sets is indented under the MEMBER/SET line
  • Member and Set definitions are never quoted as strings (unless you are still working in AS2000 where you have no choice in this matter)
  • Each axis is starts on a new line and if I have multiple members or expressions on an axis I will indent them
  • I never mix axis numbers and axis names, if I use ON COLUMNS, I will use ON ROWS, if I have used ON 0 (for the column axis) I will use ON 1 (for the rows).
  • I usually put commas at the start of the line (after indenting) not at the end

I often uppercase functions although I will also use Camel case as the mood strikes me, I find multi word functions like PeriodsToDate() can be a little easier to read in Camel case. And for some reason I prefer to put the comma that separates axis at the end of the line which is opposition to my guideline where I put all other commas at the start of the line. I don't have a good justification for why I do this, it's just the way I do it. :)

Interestingly I am probably not quite as strict with my MDX layout as I am with my SQL. I tend to find that the nesting of functions in MDX often requires decent layout in order to make it readable, but have not really come up with a set of rules that I am 100% happy with. I tend to find that I make compromises between line length and the number of lines.

So, how do you format your MDX?

Technorati Tags: ,

author: Darren Gosbell | posted @ Sunday, June 15, 2008 10:52 PM | Feedback (3)

A new Logo for SQL Server


[via EXEC dbo.LongTermMemory__Archive]

Apparently SQL Server now has a new logo.

 

 

 

 

It's interesting... I think they felt left out at the launch events with Visual Studio 2008 and Windows Server 2008 when they were the only product without a logo.

I'm not quite sure what it's meant to be, but to my eye it seems to have been influenced a bit by the Kookaburra :)

kooka sql

What do you think this new logo is?

author: Darren Gosbell | posted @ Saturday, June 07, 2008 1:08 PM | Feedback (3)

We are hiring


My employer, James & Monroe are currently looking for people with strong skills in the Microsoft BI technologies. We are specifically looking for people to work at the Senior Consultant level that have experience with the SQL Server 2005 BI technologies in addition to experience with .Net programming. There is the likelihood of working with PerformancePoint so any experience in that would be advantageous.  The role would be based in the Melbourne area so you would either need to live in Melbourne or consider moving here. If you are interested and would like to find out more, drop me a note via my contact page. If you are in the market for a job I'm sure that you will find the package and the conditions very attractive.

author: Darren Gosbell | posted @ Friday, May 30, 2008 4:37 PM | Feedback (2)

What's New in SQL Server 2008 BI - Melbourne SQL Server User Group - May 20


If you are on the mailing list for the Melbourne SQL Server User Group you will already be aware of this, but I am doing a talk on Tuesday night on the new BI features in SQL Server 2008. You can find the details here:

http://www.sqlserver.org.au/events/ViewEvent.aspx?EventId=332

If you are going to be in town feel free to drop by and say hello.

author: Darren Gosbell | posted @ Saturday, May 17, 2008 2:11 PM | Feedback (0)

SSAS: Reporting on Metadata


I had a comment recently on one of my older posts that I did about XMLA which asked about listing cubes in a database and whether the cube is processed and it's size.

I have posted about a number of different ways of doing this over the last few years, but I thought I would use this opportunity to consolidate a list all the various ways of doing this that I could think of. Under the covers all these techniques are ultimately issuing some sort of XMLA discover against the SSAS database and returning a result, it's just that they all use different levels and types abstractions.

  • Using XMLA Discover 
    The XMLA discover command returns the results we want, but being an XML result it is not the most user friendly thing to read.
  • Using VBScript
    Vidas has an example which produces nice output in it's own right, but not easy to incorporate into a report.
  • Using Powershell
    Using powerSSAS you can interactively navigate through your SSAS database and inspect objects and properties or you could write a script, but as with the VBScript example, you cannot really use a Powershell script as a data source for a report.
  • Using ASSP
    I built the Discover and DMV functions for the Analysis Services Stored Procedure project that allow you to execute discover commands and return the results as a data table
  • Using ASSP Reports
    This is really a subset of the point above, but using these stored procedures I built a sample report in Reporting Services that displays all the cubes and partitions and their processed status for a given database. I would loved to have incorporated this report into SSMS, but SSMS does not allow custom reports for Analysis Services and it does not allow add-ins like we have in BIDS (ie. BIDS Helper) so there is no supported way to add this functionality at the moment.
  • SSAS 2008 - DMVs
    In the 2008 version of SSAS it will have native DMV functionality which produces similar to the ASSP stored procedures.

 

author: Darren Gosbell | posted @ Tuesday, May 06, 2008 10:08 AM | Feedback (2)