Categories
Business Intelligence Geeky/Programming

ADOMD.NET: Could not load file or assembly Microsoft.AnalysisServices.AdomdClient

If you are developing a .NET/ASP.net solution using ADOMD.NET locally, and everything works great, and you go to release to a production server and end up with this error:

Could not load file or assembly ‘Microsoft.AnalysisServices.AdomdClient, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.

You need to install the “Feature Pack for Microsoft SQL Server 2005” which you can find here: http://www.microsoft.com/downloads/details.aspx?FamilyID=50b97994-8453-4998-8226-fa42ec403d17&DisplayLang=en

Categories
Business Intelligence Geeky/Programming SQLServerPedia Syndication

Microsoft BI: Creating Local OLAP Cubes using XMLA and ascmd.exe

Most people, when using OLAP cubes, are hitting the live version that is located on SQL Server Analysis Services (SSAS). They hit it with Excel, or some other reporting tool, etc. I have blogged previously about offline cubes and how you could possibly use them.

Now, the blog I did before, I talked about creating them with Excel, and that works great for end users. But what about automating the process? What about filtering dimension members, or measure groups, etc?  Now that you can use the Panorama Gadget for Google Apps/iGoogle (http://google-pivot-tables.blogspot.com/2008/04/panorama-analytics-gadget-for-google.html) you can upload .cub files and do BI in the cloud, how cool is that!

506479481_683e31e6db

Well, one option is purchase CubeSlice – http://www.localcubetask.com/  and use that to create your .cub files. CubeSlice works great, and is a good option if you want something with a ton of options and ease of use.

You can also create .cub’s using CREATE GLOBAL CUBE syntax in MDX, and you can also use XMLA to create a .cub. Options galore! Chris Webb blogged a few years about about using XMLA to create .cub’s here – http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!877.entry  He was using the MDX Sample App (I believe that comes with SQL 2000?)

What I was looking for was an easy way to us GLOBAL CUBE or XMLA and automate it, CubeSlice is nice, but there has to be a way to replicate (at least in a basic way) what they are doing. Thinking about XMLA – as to me it seems more powerful, that was the route I chose. I didn’t want to install the MX Sample App from SQL2K, and what Chris Webb says in his blog, and other things I read, basically the problem with using XMLA to create you .cub in SQL Server Management Studio is that you can’t specify a connection string, you have to connect to an SSAS instance. Using the MDX Sample App, you can specify a local file, and then run the XMLA and it will create the .cub file. So I just need to replicate that. 

I have also blogged about using ascmd.exe here . ascmd comes with the SSAS Samples with SQL 2005 (usually located here: C:Program FilesMicrosoft SQL Server90SamplesAnalysis ServicesAdministratorascmd) . You just need to compile it and you can use it to execute XMLA. So I decided to try that. I created an XMLA file to create my cube, and then executed it with ascmd.exe

ascmd -S c:MyOfflineCube.cub -i c:MyOfflineCube.xmla

In seconds, you have an offline cube. Now, in your XMLA you can have filters, etc. You could create an XMLA file that has some kind of variable, and you could create a replace task to replace that with what you wanted filtered, think maybe based on location, or employee, etc, and then kick out personal cubes for users, etc.

One thing I didn’t really get into is how to get your XMLA script. You could figure it out for yourself, but I actually just used CubeSlice for this example. You can create an offline cube with CubeSlice and actually see the XMLA code and use that. Maybe creating the XMLA script manually/yourself would be good info for another blog post 🙂

Categories
Blogging

5 Years Ago Today…

Wow, two “X years Ago Today” this week..

5 Years ago today, I started this blog. June 19th 2004. I wish I would have started earlier. I was addicted to reading them (like crack) from like 2001-2003, and finally bit the bullet and started one in 2004. First on Blogger, then moved to WordPress (wow I jacked my SEO on that one), but then a few hosting providers later, even my own server, and here I am. Media Temple is my current hosting and I have never been happier with a hosting provider.

I do need a new theme, I wish someone would help me out! I would even pay – 50 bucks? Who wants to? I did add the “ads” about a year or so ago, and surprisingly it brings in decent money, not huge $$ but enough to pay for hosting for the year for sure.

I love blogging, I love my blog too. Why? Because it’s mine. I can blog about whatever, and it’s mine. It has been with me through 7 apartments, 3 girlfriends, 5 cities, 5 computers, 4 OS’s, 1 baby, 5 jobs, and much more. It’s always there.

People say “blogging is dead” and I don’t agree. Blogging may be dead, for the lazy. I can “tweet all day” but if I have something to really say, or put out there and think through and share, the blog is the place. I see so many A-list bloggers just let their blogs die because of Twitter/FriendFeed. For Shame. Don’t you have anything share that is longer than 140 characters? Come on.

Anyways, this blog will be around for a while, looking back I just wish I would have blogged more. Make it a ritual. Share knowledge. Share with the community (does that make me a communist? oh noes!) Have fun!

Thinking back 5 years ago, I can’t even remember much of what I was doing. in St. Cloud, MN. Working for St. Cloud Wireless Holdings. Doing ASP Classic/SQL 2000. Reading blogs with RSS Bandit and other tools. Using a PPC 6601 as a phone. Driving a Chevy Silverado 1500. Had a 1 bedroom apt, bachelor pad. Was starting to play guitar again. Never thought I would be where I am right now, never. And 5 years from now, I bet I will say the same thing 🙂

Happy Blogging! 🙂


Categories
Geeky/Programming

iTunes DJ – iPhone, Remote App – Party!

Not sure when this came about, but I just realized that there is an “iTunes DJ” in iTunes now. It obviously lets you just play a random selection it picks. But what I didn’t know, is allowing anyone on your wifi network to connect with their iPhone and the Remote App. Once you connect with the Remote app, you can browse the library, and request a song. Multiple people can request a song, and vote it up. Totally awesome!!



I also pump out the output from my MacBook to the MacBook and AppleTV through iTunes so I get total surround sound.

So the Apple Remote app, iPhone, iTunes DJ = ultimate geek iPhone party! Who’s game?


Categories
Geeky/Programming

Bookmark Bar – Uber Micro Sharing

I use pretty much every browser. I switch between them depending on mood, system I am on, phase of the moon, etc. But there are some essential “bookmarklets” that I always want to use/set up.


There are a few things I wish I could tweak though. Like with Yammer, the ability to choose a group before it hits the page. Also with the Yammer bookmarklet there is about a 50/50 chance the URL/title wont come through so you have to do it manually.

With the Gmail This one, on Safari, it opens in a tab instead of a popup, and loading Gmail is kind of slow (IMHO) when you want to just write a mail from out of no where.

What bookmarklets do you use? Are you a share-a-holic?


Categories
Geeky/Programming

One Year Ago Today…

One Year Ago Today, I bought my MacBook Pro. And guess what? It is still running, on the original config, original boot, no reformatting, no repaving, no major surgery, nothing. And it still runs great. I have a ton of apps installed, but just enough, just what I need.

What is funny though, is that using VMWare Fusion, I have reformatted or redone my Windows VM’s multiple times because of issues. Is that just how things are? I think so.

This is probably the longest time EVER that I have had a machine without reformatting it. I think back when I was eleven years old, like 1991, reformatting our 386 25Mhz Packard Bell every 6 or so months with Windows 3.11

I have to say, the MacBook Pro is an awesome machine. Every time I use it, I wish I could just run a Windows VM for work on it, off a USB drive, just take it back and forth, and that is one less physical machine I would have to worry about.. someday..

What is the longest you have went without reformatting, voluntary or involuntary?


Photo Courtesy of Alistair Israel


Categories
Business Intelligence SQLServerPedia Syndication

SQL Job – Check Cube Valid Data as Last Step

Running a SQL Agent job to do an ETL/Cube Processing, you might also want to check the status of the cube after you process it, just to make sure.

Create a job step that is a T-SQL type, and

image

DECLARE @forecast VARCHAR(10)

    SELECT  @forecast = CAST("[Measures].[Forecast-Part]" AS VARCHAR(10))
        FROM
    OPENROWSET(‘MSOLAP’, ‘Data Source=localhost;Initial Catalog=ComponentForecast;’,
        ‘SELECT { [Measures].[Forecast-Part] }  ON COLUMNS FROM [ComponentForecast]’)

IF @forecast = ‘0’ OR @forecast IS NULL
RAISERROR (‘Cube Data Not Loaded Correctly’, 17, 1)

 

Of course your MDX query in the OPENROWSET will need to be different depending on your cube. If you get more complicated, you can also just call a stored procedure and let your imagination run wild with what you can do.

* update – fixed sql code – changed from BIGINT to VARCHAR(10)

Categories
Geeky/Programming Life

New Bike, iPhone, RunKeeper

Since working at Trek, I have been hounded to get a new bike, even more so than by my friends in Portland when I lived there, and EVERYONE has like 5 bikes there.

So, I finally decided to pick up a new bike, a Trek 7.2 FX, Newport Blue, 22.5 inch. It’s a Hybrid – not a road bike, not a MTB, but somewhere in between.

Some pictures are here, of the bike building process, because when you work at a bike company, you take 25 minutes of out of the day to build a bike.



http://www.flickr.com/photos/scaleovenstove/sets/72157619164047726/

So after getting my bike, I had to get some more gear. The usual, helmet, lights, pump, bag, tools, all that stuff. Most other people will get a “computer” for their bike, a little electronic device to track speed, etc. Guess what? I already had one, it is called an iPhone (what doesn’t the iPhone do.. “there’s an app for that”.. is true.)

I jumped on Amazon and looked for a good armband for the iPhone 3G, with good reviews. This is the one I ended up with

So what other parts are there to this equation? The app of course. RunKeeper Pro. (http://www.runkeeper.com) It lets you set your activity type, you start the music before you start RunKeeper, lock the GPS on, and start your activity. You can “lock” the screen so you dont bump it, and then tap it to get pace/speed info. It will also tell you every 5 minutes and/or every mile what your speed/pace is. Once you are done with your activity, you upload it to their site. It maps it out, elevation, speed, nice google map interface. Aggregates miles over weeks/months, and lets you share with your friends.

Here was a ride I did the other day, http://www.runkeeper.com/ui/activities/1000402


RunKeeper really keeps you motivated. I haven’t used Nike+, but I am guessing it is pretty similar. But Nike+ doesn’t work on the iPhone, just iPod Touch.

I really like my bike, there was a Gary Fisher I had my eye on though, so maybe that will be my next bike. Using my iPhone and RunKeeper, I can keep track of my rides, miles, and share with my friends (which kind of helps you stay motivated too). Fun Stuff – Go By BIke!


Categories
Geeky/Programming Product Reviews

Pen Tablet Blog Post

Today, I picked up a Bamboo Fun Pen tablet by Wacom.

image

As you can see, I wrote this post using nothing but the tablet, pretty sweet!

Categories
Business Intelligence SQLServerPedia Syndication

Microsoft Business Intelligence Development in a Team Environment

Today I received an email asking to some extent best practices on development with SQL Server Integration Studio (SSIS) and Business Intelligence Developer Studio (BIDS) in a team environment. Here is part of the email:

Me and another DBA belong to the same team, we have a SQL server with SSIS running. We use the SSIS transfer data among multiple data sources. In SQL 2000 DTS, both of us can save the package on the server and open/edit it in the enterprise manager. In SQL 2005, I can see the package on server, but can’t open it directly. We came out a solution: create a shared folder on the server called ‘SSIS Projects’, both of us can access to it. We run the ‘SQL Server Business Intelligence Development Studio’ on local PC, to open the project in that shared folder. When done with the change, save the package to the SSIS server. Now, we have more than 50 packages in a project. Problem is: it’s very slow when open a project, ‘Business Intelligence Development Studio’ tends to open/verify every single package inside a project, takes up to 10 mins and getting worse. We really miss the SQL 2000 DTS, but we have to turn to SQL 2005.

  1. Are we doing the right thing? Is there any better solution for SSIS developing in a team environment?

  2. When open a project, does ‘Business Intelligence Development Studio’ has to open/verify every package?

 

This got me thinking, and I figured instead of write an email back, it would be good info for a blog post. So here is what I think and some things I have done that have worked.

First, yes, SQL 2000 DTS allows you to just edit on the server, do more than SSIS, is just way better than SSIS. Wait, what? Well, yeah some people will say that, because it does one thing that might be a little rigmarole in SSIS, but no, SQL 2000 DTS is not better than SSIS, just wanted to clear that up.

So, the is meant to be a starting point, by no means all encompassing, and as always, YMMV.

One thing that I first thought about is this: Yeah, if BI devs and SQL devs have never really worked in a team environment, developing software, how would they know what to do, or best practices? They would just go about “making it work” until everything breaks or who know what.

 

So how to develop Microsoft Business Intelligence Solutions in a team environment?

 

1) Standardize on Versions

 

First, figure out what “versions” you are going to support, and what you are going to use, and get standardized on them. I am guessing majority of BI devs right now are on the 2005 stack. Yeah, there is still probably a bit of 2000 legacy stuff out there, and some people are now getting into the 2008 stuff, but 2005 is pretty much the norm from what I see, at least at this point.

So, 2005. Get all your dev’s on 2005 on their machine – same patch level, etc. Get BIDS up to the same level. Get BIDS helper installed everywhere. Strive to get all your ETL packages in SSIS 2005, get all your cubes to SSAS 2005, etc, etc. Come to a consensus on things like config files for SSIS, naming conventions, within your development and on disk – folder structure is key! With a smaller number of versions of things floating around, it makes it easy for anyone on the team to open up a solution and start hammering away without tons of setup.

2) Get Source Control

 

This is crucial! I have talked about source control in the past, and also about some that aren’t so great. Really it doesn’t matter what you use, I prefer SVN. I install Tortoise SVN, SVN proper (to do scripting etc if I need to using cmd line) and also purchase Visual SVN, an add on to Visual Studio that integrates with SVN. for 50 bucks you have your source control system. Visual Source Safe works but is outdated, honestly I hate it. Team Foundation Server is good, but expensive. Other solutions might be using something like GIT, etc. Whatever you do, just get a source control system going, and learn it well. Learn how to create repos, commit, update, revert, merge, etc. Set up a user for each BI dev and make sure they commit often, and make sure they leave comments in the source control log when they commit, history is your lifeline to go back to something if you need to! Note: exclude .suo, bin, obj directories, .user files, etc. Anything that changes every time you build, open, etc, you want to exclude from source control.

 

3) Development Box

 

You now have your version standardized, and your source control setup. You can get most of your work done on your machine, but you need somewhere to test deployments, run scenarios, etc, etc. Make sure you have a comparable box to your production server. Set it up the same, same software etc. Make sure its backed up. Let all the devs know its a dev box, it can be wiped at any time for any reason if need be. It can be rebooted 5 times a day if need be. Its a dev box! But you can test and develop and tweak and change settings to your hearts content and not have to worry about breaking Mr. Executives reports.

 

4) Developing, Merging, Committing, Collaborating, Communicating.

So now you have your setup, well.. setup. Start creating stuff. SSIS Packages, ETL’s, SSAS Cubes, SSRS Reports, the whole MSFT BI Solution. This is where stuff can start to get tricky in a team environment though. SSIS/SSAS/SSRS isn’t as clean cut as something like C#/VB.NET, etc. Everything is in some form of XML behind the scenes, and with graphical based editing, you can move stuff around and it changes the files. Things like that are going to be your enemy. This is why you need to collaborate and communicate. Usually one person should be working on one project at a time. You can get really good at communicating and then in SSIS at least have multiple people working on different packages. Also in SSAS dimension editing and stuff can be done by multiple people at the same time as long as the dim is already hooked up to the cube. But you want to make sure that you communicate, “Hey, I am checking this in, you might want to do an update”, or “Is anyone working on this or are they going to? I want to modify something, and I will check it in so you all can see it”

You want to make sure you have your folder structure, and solution/project structure set up well. C:Projects  ..  and then maybe a folder for each major project “CompanySales” and under that, “ETL”, “Cube”, “Reports” and have a solution under each with 1 project of each type. You can also have a generic SSRS solution with many projects, which might work well for you. In any case, just come up with a standard and stick to it. Trust me it will make your life easier. The question from the email above, it sounds like they have every package in one solution, one project. Sounds like it needs to be split, multiple solutions, multiple projects.

 

5) Deployment Scenarios and Strategies

Now that you have everything developed, tested, checked in, what do you do?

Personally for SSIS I like xcopy deployments. One folder on the server, not on the C drive, but another drive, lets say “E:SSIS” under that a folder for each project. Put your dtsx and configs in the same folder. 99% of the time you are going to call the dtsx from a SQL Agent Job, and most likely you are going to run into a scenario
where you need uber rights to execute it, so learn how to create a proxy/credential in SQL security so you can run the step as that. Once you have this folder and subfolders setup, you can use something like Beyond Compare to compare the folder on the server to the one you have locally that matches. Remember to copy files from the bin directory of your project after you build it, not the files directly on your project. As far as BIDS validating every package, there are workarounds out there you can do, here is one.

For SSAS, I try to lean towards using the Deployment Wizard that comes with SQL Server. You can use BIDS deployment, but if you start doing anything advanced with roles, partitions, etc, you are going to run into trouble. Take control and use the deployment wizard. I usually like to deploy, and then process manually when developing. And then later use SQL Agent or and SSIS package to actually do processing when it comes to a scheduled processing.

SSRS, I have become used to the auto deployment from Visual Studio. To really do this though, you need a project for every folder in SSRS, which can become a pain. You can always just upload the .RDL file and connection and do it manually, but if you start off right with using the deployment from BIDS, it can make your life easier.

 

So that is just a 10 minute overview of everything to kind of get started. Everything depends on your infrastructure and the way your team is setup, etc. But I think the biggest thing to take from all of the above is to standardize on things. If you standardize on as much as possible, SQL versions, setup of machines, naming conventions, layouts, design patterns, etc, everyone can do things faster and pretty soon it will start running like a well oiled machine!