Ian Beckett

RSS feed

    Recent comments

    Authors

    check if CDC is enabled in SQL 2008

    Change Data Capture (CDC) is disabled by default in SQL 2008.  To check if it is enabled for a given DB use this SELECT:

    -- if column is_cdc_enabled exists in the result, then CDC is enabled for the database

    select name, is_cdc_enabled from sys.databases


    Posted by ibeckett on Saturday, February 28, 2009 4:23 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    Light weight photo shop... Paint.NET

    Lately I've been trying to improve my graphics skills but photoshop CS4 gives me a GUI headache.  I've ended up using Paint.NET (http://www.getpaint.net/download.html) a lot for simple web effects stuff.  It's nice to have an easy to use and powerful graphics program that will run swiftly even on a 5 year old lap top.

    Posted by ibeckett on Thursday, February 12, 2009 2:53 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    End of beta is in sight for Windows 7

    Microsoft has confirmed that it will not be releasing any more beta versions of Windows 7, with the next release likely to be the first release candidate of the eagerly anticipated operating system.

    The successor to Vista has been very well received since it arrived in beta, which will come as an almighty relief to Microsoft after the failure of Vista to hit the heights that were expected for it.....

    -http://www.techradar.com/news/software/end-of-beta-is-in-sight-for-windows-7-516516


    Posted by ibeckett on Monday, February 02, 2009 5:49 AM
    Permalink | Comments (0) | Post RSSRSS comment feed

    View a pivot table's underlying MDX query in Excel

    After running these scripts you can easily view the underlying MDX query for any pivot table that uses a SSAS cube for its datasource:
     

    Use the following script to add a show MDX Query option when you right click a pivot table in Excel 2007:

    Private Sub Workbook_Open()
       Dim ptcon As CommandBar
       
        Set ptcon = Application.CommandBars("PivotTable context menu")

    insertDisplayMDX:
       Dim cmdMdx As CommandBarControl
       For Each btn In ptcon.Controls
           If btn.Caption = "MDX Query" Then GoTo doneDisplayMDX
       Next btn
      
       ' Add an item to the PivotTable context menu.
       Set cmdMdx = ptcon.Controls.Add(Type:=msoControlButton, temporary:=True)
      
       ' Set the properties of the menu item.
       cmdMdx.Caption = "MDX Query"
       cmdMdx.OnAction = "DisplayMDX"
          
    doneDisplayMDX:

    End Sub 



    And put this in a seperate module:
    Sub DisplayMDX()
        Dim mdxQuery As String
        Dim pvt As PivotTable
        Dim ws As Worksheet
      
        Set pvt = ActiveCell.PivotTable
        mdxQuery = pvt.MDX
       
        ' Add a new worksheet.
        Set ws = Worksheets.Add
        ws.Range("A1") = mdxQuery
    End Sub

    Works great!

    The code comes from http://sqljunkies.com/WebLog/sqlbi/archive/2007/01/18/26875.aspx


    Posted by ibeckett on Sunday, February 01, 2009 6:04 AM
    Permalink | Comments (0) | Post RSSRSS comment feed