.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Sql Server
What I'm doing wrong? WinowsXP sp2 ,MSSQL express 2008 sp1 , netFramework 2.0 sp2 , Adwenturework 2005 in Directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ 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' query  select*from adress  returns "Invalid object name 'adress'".

View Complete Post

More Related Resource Links

sql server 2008 adventureworks database


dear Friends

For my MCTS 70 -433 examination, I recently installed sql server 2008 and installed the sample databases too. but my issue is, in that book they have mentioned a database called "AdventureWorks2008" and the nice thing is I don't have a such a database with me in my sql server 2008. 

And the query is 

-- MERGE Statement
USE AdventureWorks2008
MERGE INTO	Sales.SalesOrderDetailHistory AS SODH
USING Sales.SalesOrderDetail AS SOD
ON SODH.SalesOrderID = SOD.SalesOrderID
AND SODH.SalesOrderDetailID = SOD.SalesOrderDetailID
INSERT (LineTotal, SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty
, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount
, rowguid, ModifiedDate, Cancelled)
VALUES(LineTotal, SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty
, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount
, rowguid, ModifiedDate, DEFAULT)
UPDATE SET SOHD.Cancelled = 'True'
OUTPUT $action , inserted.* ;	

Please help me to overcome this issue and let me know where can I download that database too.

Thanking you

happy Coding

AdventureWorks and Visual Studio 2008

Would someone please tell me how to get Visual Studio to automatically create the correct SQL statements so that I can stop getting the following error:"there was an error executing the query. please check the syntax of the command and if present the types and values of the parameters and ensure they are correct. Invalid object name 'Product'" 'Product'  gets replaced with whatever table name I drag onto my web form from the server explorer. The only information that may help that I know is that I noticed that Visual Studio creates the following select statement: "SELECT * FROM [BillOfMaterials]" and this generates an error. Where as when I manually type "SELECT * from Production.BillOfMaterials;" Everything works fine. The only issue with this is i would hate to have to manually enter all of the SQL statement into my web app.  Any help would me great appreciate. SQL2008.AdventureWorks_All_Databases.x64 - this is the version of AdventureWorks that I downloaded and installed on my machine.

Business explainfor tables and hierarchy in AdventureWorks database and REAL_Warehouse_Sample_V6 cub

AdventureWorks (ProductModel table, what is this table for) ------------------------------ REAL_Warehouse_Sample_V6 (Periodicity(only have one attribute:period)) (Replen Strategy(three level hierarchy(strategy type:backlist,frontlist);(strategy:Modeled,Buyer Managed,No replenishment,Store Managed)) Another one is what is the difference and relation between buyer and customer in cube REAL_Warehouse_Sample_V6? -------------------------------------------- I can not understand the business meaning behind these tables and architecture,can any one help explain the meaning for upper hierarchy and table? happyMan

Deploying AdventureWorks sql 2005



While deploying the following msg is received (Windows 7 platform)

Error 1 Errors related to feature availability and configuration: The 'Perspectives' feature is not included in the 'Standard Edition' SKU.  0 0 

then : "The Database 'AdventureWorksDW' not found on the server' ...

Newbie question about adventureworks database


Hi Guys,

I downloaded the Adventurworks2008 database and the AdventureworksDW2008 database for practice with SSIS.  I was wondering what the difference between the two databases is, because in the exercises im following it is stating that i will need to extract data from  the Adventureworks2008 database to the AdventureworksDW2008 database.

Is the the AdventureworksDW2008 an empty database and we are just extracting OLTP data to it? Please any help in clarifying this will be highly appreciated. Thanks!

Average delay between 2 sales (AdventureWorks)



In the Adventurework FactInterSales table, there's an "orderDateKey" key. 

Imagine that I want to add a new calculated measure, in order to be able to get the average delay (in days) between sales, in general or by customer...

How would you do that ? A new calculated member ? a script command ? Or do I have to do this with SSIS when importing the data ? I hope no...

I've been searching on the net, the DATEDIFF function seams to be the solution, but I couldn't make it work successfully

Thanks a lot for your help


ALTER DATABASE AdventureWorks SET ENABLE_BROKER takes too long to finish, how long does it run

try to run ALTER DATABASE AdventureWorks SET ENABLE_BROKER ;
but still running after 8mins, is this normal, what is approximate time? can it be cancelled?

Unable to install Adventureworks 2008



I am getting 'fatal error' when installing the msi Adventureworks samples.

I have all the prerequisities done:




is 1

The filter daemon is started.

Filestream is enabled.

Facing Problem while installing Adventureworks DB

Hello All,

I   have already installed sql server 2005 express and management studio 2005 express edition . Now i want to install the  Sample database provide by microsoft(AdventureWorksDB) .  Even this also i have  downloaded from the codeplex.  When i tried to run the MSI , i  am getting an error . Please find the error below.

  ERROR 1335: the cabinet file 'Data1.Cab'  required for this installation is  corrupt and cannot be  used.  This could indicate network     error , an error reading from the CD-ROM , or a problem with this package.

One more thing , i am using Windows 7.

Please Provide me a solution for this  or any pointers for downloading Adventure work db  2005 for windows 7  are also  appreciated.


Error while trying to install AdventureWorks 2008 R2


Hi. I downloaded the Microsoft AdventureWorks 2008 R2 Databse from the codeplex website



When I try to run the exe, the follwoing error is being thrown

"A fatal error occured during installation. Details: Object reference not set to an instance of an object"

I have SQL Server 2008 R2 installed. I also have SQL Server 2005 on the same machine.

It would be great if anyone could advise me on how to proceed.


Adventureworks DW


1. Can someone please explain how Facts/dimensions/measures? 

2. why are there a dozen keys on FactResellerSales Fact table?

3. Are these keys in relation to the separate dims?

4. How are the surrogate keys created in these tables?

5. Does a surrogate key give uniqueness to a table or to each id field?

6. Isn't the fact table supposed to have all measures? 

I am so confused. Please help. Kimball books are just filled with talks. can you please refer a step by step book that shows how to put it all together. Thank you.

Why Won't GetOleDbSchemaTable Work In SQL Server Express On AdventureWorks?


I have installed the AdventureWorks sample database in my copy of SQL Server Express 2008.  I can connect to AdventureWorks and query the database.  I can use GetOleDbSchemaTable to query other databases running in the same copy of SQL Server Express.  But when I call GetOleDbSchemaTable for AdventureWorks it returns no rows in the DataTable and no error.  What is wrong here?



MCSD VB developer in Dallas, Texas

cannot install AdventureWorks


I downloaded and installed SQL Server 2005 express Edition with advanced services.


My attempt to install the AdventureWorks from "Add or Remove Programs" failed for I was not able to see the "Documentation, Samples, and Sample Databases" node from "Feature Selection".


After reading a little bit I discovered that I had to download AdventureWorks from http://msdn2.microsoft.com/en-us/librry/ms144235.aspx


First I downoladed and installed SqlServerSamples.msi and then AdventureWorksDB.msi however I cannot find AdventureWorks.mdf to attach to my instance? Inside the folder C:\Program Files\Microsoft SQL Server\MSSQ.1\MSSQL\Data I have AdventureWorks_Data.mdf and AdventureWorks_Log


Can you please help?







Backing up and restoring AdventureWorks database


Hey there,

I have 2 servers. Each have SQL Server 2005 installed on them. I have the AdventureWorks database on Server 1. I want to test database mirroring. So I backed up AdventureWorks to a network drive, then copied it over to a directory on Server 2. I logged into Server 2 and tried to do a restore pointing to the directory the .bak file was copied to and it errors saying 'Create database permission denied in database master'

I don't understand. For the destination db, I put in AdventureWorks.

What am I doing wrong?

Thanks for your help!!

cannot open adventureworks database do not have sufficient permissions


i can open adventureworks on one computer but not the other i am using visual web developer


adventureworks windows7 visual web developer


im running windows 7 home, have installed visual web developer 2008 express and the full sql server2008 enterprise trial software, then downloaded the advetureworks 2008 samples, using ssms everything seems ok - the database is there ok but when i try to connect to adventureworks using vswebdev on a gridview control i can find the .mdf file ok but i get an error saying either 'i dont have permission to open file and need to contact the owner' - im an administrator so why does this happen, im new to win7 and have set all this up on winxp before no probs- any advice would be appreciated as im trying to get on with learning stuff?


How to get database (other than AdventureWorks) to connect to SQL server 2008 Analysis services for


I am making a project on Data Mining, I am using the Office 2007 Excel, SQL server as a sample mining tool, i have practiced and understood using Adventure works database , but i NEED a different Database so as to connect it to analysis service and demonstrate data mining using excel in my own project, WHAT AND HOW DO I GO ABOUT IT?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend