geniusnsa.blogg.se

Adventureworks2012 data warehouse mdf codeplex
Adventureworks2012 data warehouse mdf codeplex













The DimDate table already had dates through the end of 2010, so I only had to generate 2011-2013. In step 3 I tackle the biggest task of inserting new rows into the date dimension. Note it also does some bounds checking, etc that really wasn’t needed here, but like I said I did a grab and reuse. I probably could have done this using some version of FORMAT but I already had the routine written so I just grabbed and reused it. I have a handy little routine that converts a traditional datetime data type to an integer, using the traditional YYYYMMDD common for data warehouse date keys. This might be good if you want an easy way to reset your 2013 version, if not alter the script for your needs. Be warned, if you have run this before and AdventureWorksDW2013 exists it will be deleted. I then do a restore, renaming it to AdventureWorksDW2013. Not wanting to mess with the original AdventureWorksDW2012, in Step 1 (these steps are numbered in the script below) I make a backup of the existing 2012 version. Speaking of which, I use the default paths for everything, you’ll need to alter if you used other paths. It could easily be adapted for 2008R2 by tweaking a few paths. Next, please note this script was written with SQL Server 2012 in mind. (I don’t think Wrox will mind, as I and many of my co-workers have written books for them, nice folks.) Instead he suggested the version stored at.

adventureworks2012 data warehouse mdf codeplex

When he just grabbed the mdf file and tried to create the database using the attach_rebuild_log option it came out corrupted. He had some issues with the version of AdventureWorksDW2012 located at. A friend and co-worker, Bradley Ball ( | blog ) pointed out one issue which I’ll pass along.

adventureworks2012 data warehouse mdf codeplex

First, you will need to have AdventureWorksDW2012 installed on your system.

adventureworks2012 data warehouse mdf codeplex

The script, below, turned out to be pretty simple.īefore you begin though, a few prerequisites. Below is a script which will add five years to each date in AdventureWorksDW2012. I scoured the search engines but couldn’t find anyone who had taken time to come up with a way to update the database. This script is for the Data Warehouse version, AdventureWorks DW2012. This is especially irritating when demonstrating features reliant on the current date ( think GETDATE() or NOW() ).īefore you read further, let me stress again this is NOT for the typical AdventureWorks2012 database. I think you’d agree though it’s gotten a little long in the tooth. Being a BI guy, I specifically use the AdventureWorksDW2012 version, the Data Warehouse of Adventure Works. Like many of my fellow MVPs and Presenters, I use the Adventure Works sample data from Microsoft to do my presentations.















Adventureworks2012 data warehouse mdf codeplex