XTab's Blog

Ged Mead's Blog at vbCity

This blog hosted by:
http://blogs.vbcity.com      
  Home :: Syndication  :: Login

AprMay 2008Jun
SMTWTFS
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

Archives

Topics

Ramblings

VB.NET

        It may be entirely a matter of my own stupidity - let's face it, it often is  -  but I found myself getting very, very  frustrated when I installed SQL Server 2005 Developer Edition and then couldn't find the AdventureWorks Database.   

   "Aha!",  I hear you say, "You need to select the right choices when you first install SQL Server 2005, young Mead.".  

  (OK, so I made up the "young" bit.)

   "Aha back at you!", I say.   I was on to that one, having done a bit of research first.   I *did* scroll down to the end and I certainly  thought that I selected the option to install the OLAP AdventureWorks DB on to the hard drive. 

   But of course after the grinding and clunking that forms the fairly lengthy installation process of SQL Server finally ended, when I went to check out the list of databases in the Management Studio, there was nary a sign of  AdventureWorks .   Ah well, you know the old saying  - "No pain, No SQL Server".

   So, I assumed that maybe I hadn't made the right selection after all, but no problemo, sez I.   I'll just go into Control Panel and select the Change button for SQL server, find that pesky database and have it installed in a jiffy.   

 Or several million jiffys.   But at least I'd get the darn thing installed.

Or not.

 Did that a couple of times but without success.  I checked, double-checked and scoured the Program Files/SQL server folders looking for that elusive msi file or the databases themselves.

  OK then, time to move on to Plan C:-  Get the installation DVD and reinstall/repair, this time making sure I do select the Samples (or, if I'm feeling argumentative, select the Samples again). 


  No can do.   The installer refuses to link to the page needed and simply gives me an
"Error on Page" message.   As I have an MSDN subscription, I had the luxury of a second copy of the installation disc, so I swapped discs and gave that a try.    The disc may have been different , but the result was exactly the same.

   A bit more searching on the web and I find someone has pointed out the exact file I need to home in on  - I think it was SQLRun_Tools.msi, but don't quote me and don't try this at home because (a) I may not have remembered the exact file name and (b) it didn't solve the problem anyway.
  

   If you're still hanging in there with me (what an incredibly patient person you are!) you may be thrilled to hear that I did eventually find a sequence of actions that got the job done.   And so, if you're in the same fix and you've slogged through my moaning and groaning in the hope that I can set you back on the road to sanity, you're patience is just about to be rewarded. 

First go to
http://www.microsoft.com/downloads/details.aspx?FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en

and download the  msi file.
The msi file, did I say?  Actually there's quite a list of them; the differences between
some of them more obvious than others. 


Anyway I decided that AdventureWorksDB.msi (for x86 system in my case) looked the
best bet, and so it turned out to be.


You can either Run it or Save it.  Personally I saved it somewhere safe in case, Heaven
Forbid, I have to do this all over again at some miserable time in the future.


In either case you will end up running it, either straight away or after you've saved it to
your hard drive.


Let it install the files to the default path, which is <drive>:\Program Files\Microsoft SQL
Server\90\Tools\Samples\AdventureWorks OLTP .


  The MSDN pages offer various ways of proceeding from here on in.   Having just been
introduced to the SQL Server Management Studio layout the day before all this excitement happened, I decided to go the SSMS route.   That is, I opened a New Query and then pasted in this code (which you can find on the Microsoft Download site -
http://download.microsoft.com/download/d/8/6/d865cf0c-c44b-401b-b426-b3bf5c628112/SQLServerDatabasesAndSamplesOverview.htm 

 should you need to get at it or want more  instructions):

exec sp_attach_db @dbname=N'AdventureWorks', @filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'

   With fingers crossed and eyes shut, I then hit the Execute Query button.


     And was rewarded with the wonderfully welcome Successful Query Execution message.   
Still no AdventureWorks database in the list, but I wasn't fazed by that because I'd already learned where the Refresh menu item is.  

  In the Management Studio Object Explorer pane, Right click on "Databases" in the list and select 'Refresh' from the context menu.  


Finally!   AdventureWorks database sits there smiling back at me.

Of course - as every DB expert and his brother seem to want to slag off AW as too complex, poorly constructed, yada yada yada  - you may wonder why I wanted it installed in the first place.     Because I'm stubborn, that's why.   It's supposed to be there; it wasn't being there; I wanted it to be there.  

Now that it is there, I suppose I'd better try and find something meaningful to do with it.

But at least it is there now!

------------------------------------------------------------------------------

Afterthought:   I noticed during my various searches later this note on MSDN:  "The OLAP database (Adventure Works DW) cannot be installed unless the data warehouse (AdventureWorksDW) database is selected for installation."   Now, I'm fairly sure I didn't select the data warehouse installation on the basis that it was way too heavyweight for my needs.   Maybe this was the cause of my problems - but I certainly didn't get any kind of "Cannot install A unless B is selected" at the original time of installation, so that has to remain as one more unsolved mystery.

-------------------------------------------------------------------------------------------

Comments:   Although I would welcome your comments, suggestions, war stories, invitations to your SQL Server birthday party, etc, unfortunately I've had to turn off the Comments element for my Blog.   Several of those mindless, hopefully-soon-to-be-put-up-against-a-wall-and-shot porn site purveyors have taken to spamming our comments pages with their unwanted links.   Having become tired of combing through and deleting them several times a week, I've taken the easier option of just turning off comments.

Nothing personal  - at least not to anyone who isn't a pathetic, spamming, scamming moron who thinks it's clever to plaster our blogs with their tacky porn links, that is.

If you really need to feedback anything to me on this blog item, please make a post in one of the VBCity Forums and I'll try and catch up with you there.

 

 

 

posted on Monday, January 15, 2007 8:40 PM