Could Anyone Test This On SQL2005 AdventureWorks

Nov 2, 2006

SELECT TerritoryId,
[2003-01],[2003-02],[2003-03],[2003-04],[2003-05],[2003-06],
[2003-07],[2003-08],[2003-09],[2003-10],[2003-11],[2003-12],
[2004-01],[2004-02],[2004-03],[2004-04],[2004-05],[2004-06],
[2004-07]
from ( select TerritoryId,
CONVERT(CHAR(7), h.OrderDate, 120) AS theDate, d.LineTotal
FROM Sales.SalesOrderHeader h JOIN Sales.SalesOrderDetail d ON h.SalesOrderID = d.SalesOrderID
) p
pivot (
sum(LineTotal) for theDate in ([2003-01],[2003-02],[2003-03],[2003-04],[2003-05],[2003-06],
[2003-07],[2003-08],[2003-09],[2003-10],[2003-11],[2003-12],
[2004-01],[2004-02],[2004-03],[2004-04],[2004-05],[2004-06],[2004-07])
) pvt
order by TerritoryId

The code is based on a sample from Pro SQL2005 (Apress). The book is great BTW.

While modifying it for a testdrive I think I made an error but where. Inner select executes in less than a second. However applying the pivot it takes 5-6 seconds.

Total row count is around 121K. All it does with PIVOT is to sum and crosstab. If I do this taking raw data from inner select outside and do pivoting myself it's much faster. So is it my code here or PIVOT is really an unoptimized addition?

TIA

View 8 Replies


ADVERTISEMENT

How Do I Get AdventureWorks To Show In Sql2005.

Jun 18, 2005

How do you make the AdventureWorks sample show up (June ctp)?  I already installed it using the msi file:

View 11 Replies View Related

DB Engine :: Replicate A Master Test Database To 100 Test Environments?

Oct 12, 2015

We are setting up a test lab environment with 100 machines.  We want one master testing db that gets replicated to each to run scripted application tests nightly.  

My goal is to minimize the amount of work to move this thing to each of the 100 test machines.  I am wondering if we need to even have the sql local and invest in a monster db server with 100 copies of the db we restore and each test machine point to their own db on that server, or if I should use db mirroring or something to get the master test db to each of those machines instead.

View 6 Replies View Related

Unit Testing For SSIS - To Test Or Not To Test?

Oct 17, 2006

Now that we have a good programming model in SSIS - the question is whether to write automated unit tests for your packages, and would it generally be a good idea for packages?

Also - if yes to write tests - then where to find more informations regarding How to accomplish that?

View 1 Replies View Related

How To Test SSis Package And What Are The Things I Need To Test It ?

Nov 27, 2007



hi every one,
i need to test SSIS pacakge which will import data from different database where record count is around 5 millions.
iam planning to test it through c# code as well as manually also.
SSIS source : consist of 7 tables
SSIS destination :consist of 7 tables
Using c# code iam trying to run ssis package through batch file.
i am putting expected rowcount, column count in an excel file and comparing same with destination tables by writing query implementing ADO.Net concept.
am i going right way ,can any one suggest best and productive way to test the ssis package .
what are the other things i need to test it.
do any one can add test cases to it.






S.No

Test Case


1

Verify all the tables have been imported.



2

Verify all the rows in each table have been imported.



3

Verify all the columns specified in source query for each table have been imported


4

Verify all the data has been received without any truncation for each column.



5

Verify the schema at source and destination



6

Verify the time taken /speed for data transfer


7

Fields truncated due to difference in length of the field at destination.
Regards
Arif shareef

View 9 Replies View Related

Sql2005 Database Restore From Another Sql2005 Backup File Error.

Dec 15, 2005

hi

i try to restore a bak file from another sql2005 server to my sql2005 server, but it show the error message as below :

 

 

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------
ADDITIONAL INFORMATION:

Cannot open backup device 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBackupackup.bak'. Operating system error 5(error not found).
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3201)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=3201&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


 

 

 

pls some one can help me ???

 

thanks

chaus

View 62 Replies View Related

Can You Open A Database Created In SQL2005 In SQL2005 Express?

Oct 12, 2007



Can you open/use a database created in SQL2005 in SQL2005 Express?

Thanks for the help!

Max

View 4 Replies View Related

SQL 2012 :: Restore DB From Prod To Test - How To Restore Users In Test

Jun 25, 2015

I need to restore test DB from production backup but once it is restored I would need all the permissions of sql logins and windows AD account intact in test Db as it was before.

View 4 Replies View Related

Upgraded SQL2000 To SQL2005, SQL2005 VERY Slow

Dec 27, 2005

I just upgraded my SQL 2000 server to SQL2005. I forked out all that money, and now it takes 4~5 seconds for a webpage to load. You can see for yourself. It's pathetic. When I ran SQL2000, i was getting instant results on any webpage. I can't find any tool to optimize the tables or databases. And when I used caused SQL Server to use 100% cpu and 500+MB of ram. I can't have this.Can anyone give me some tips as to why SQL 2005 is so slow?

View 3 Replies View Related

Sql2005 Standard To Sql2005 Enterprise Edition

Jan 4, 2007

Hi

We have Sql2005 x64 bit standard edition server installed in windows 2003 64 bit editio server,

currently due to buisness requirements we need to have sql2005 x64 bit enterprise edition, please let me know how do i do the upgrade or change.

is it possible to retain all our custom settings in the standard edition after changing to enterprise edition.

This has to be done for our production and very critical, please help



Thanks

Samuel I

View 4 Replies View Related

Install Sql2005 32 Bit After Removing Sql2005 64 Bit

Sep 19, 2007



I am unable to install 32-bit SQL Server Integration Services on the server due to something that was left behind by the 64-bit version.


I've uninstalled SQL Server 2005 64-bit and when I try to install the 32-bit version of Integration Services, I get this error: "Failed to install and configure assemblies C:Program Files (x86)Microsoft SQL Server90DTSTasksMicrosoft.SqlServer.MSMQTask.dll in the COM+ catalog. Error: -2146233087 Error message: Unknown error 0x80131501 Error descrition: FATAL: Could not find component 'Microsoft.SqlServer.Dts.Task.MessageQueueTask.ServCompMQTask' we just installed."




I can't seem to figure out how to resolve this problem with the COM+ and I can't remember if Integration Services is required.

Can anybody please advise?

View 1 Replies View Related

Migrating Sql2005 Vb Dts Package To Sql2005

Jul 8, 2007

Hello,



I have a vb program that include a dts package that has been saved to vb with sql2000 dts wizard and works very good.



Now that I upgrade my website to sql2005, this vb dts package doesn't work.

The error I get is:



Microsoft Data Transformation Services (DTS) Package

Invalid STDGMEDIUM structure

(Microsoft Data Transformation Services (DTS) Package (80040066): Invalid STDGMEDIUM structure

) (Microsoft SQL-DMO (ODBC SQLState: 42000) (80004005): [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near ')'.)



I searched in the internet how to make dts package in sql2005 and save it to vb and found no information about it.

What Can I do to get the vb code of the dts package I create in sql2005 or how do i migrage the sql2000 vb dts package code to sql2005?



Thanks,

Kubyustus









View 4 Replies View Related

AdventureWorks In Vwd

Oct 28, 2007

Goodday all
I wonder if anyone can help.
I'm trying to work through a tutorial using a sample database , Adventureworks. When I drag a table "Address" onto my page to set up a grid veiw , and start debugging , the error message reads "invalid object name Address"
On the database explorer the table has (Person) next to the name Address. This I think has something to do with the schema. I cannot get it right to change anything , no matter what I try. I have used this data base in a windows application and it works fine. No (Person ) attached to the table name.
Has anyone got any ideas.
Thanks
Rob
 

View 3 Replies View Related

AdventureWorks

Sep 6, 2007

I've download and installed the sample database but the Server can't see it .. it doesn't appear in the User databases. I installed using the defaults. Anyone ha d the same problem and solved it?

View 1 Replies View Related

Adventureworks Installation

Sep 16, 2007

 I downloaded and installed the .msi from codeplex. After installation I open SQL Server Management Studio but don't see AdventureWorksDB in the list of databases. How is this possible? Should I not be seeing this new database? Do I have to do something else?

View 1 Replies View Related

The AdventureWorks DB Design

Dec 20, 2005

Is it a good template for, say, limited CRM applications ?

View 1 Replies View Related

AdventureWorks Database

Mar 21, 2007

I'm interested in AdventureWorks querying. I thought of get a start from someone specifically on this db.

View 4 Replies View Related

AdventureWorks Database

Jun 3, 2007

I am unable to attach the AdventureWorks database in management studio. I installed it when I installed SQL Server 2005 but can not find the mdf or ldf files anywhere. When I inserted the installation disks again to do a custom instal, and selected AdventureWorks, the response came back that it was already installed. What do I need to do to be able to attache this db in the management studio?

Many thanks in advance for your help.

View 9 Replies View Related

Need A Query In AdventureWorks

Apr 11, 2008

Display all EmployeeName,EmployeeTitle,ManagerName,ManagerTitle.

View 9 Replies View Related

Cannot Install AdventureWorks

Apr 19, 2007

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 FilesMicrosoft SQL ServerMSSQ.1MSSQLData I have AdventureWorks_Data.mdf and AdventureWorks_Log



Can you please help?



thanks



Rick



View 14 Replies View Related

AdventureWorks Owner

Aug 15, 2006

Hi,

I've installed AdventureWorks, attached it to SQL Express and wanted to see its Database Diagrams. When I click on the Database Diagrams, I get this error message:

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

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

I really see that in properties for this database there's no owner, while if I do

sp_helpdb 'AdventureWorks'

It shows that the owner is 'IDB-SERVMichael' , which is my user.

I further tried to set this user as an owner in AdventureWorks properties-files window (where it showed no owner), but it says :

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Set owner failed for Database 'AdventureWorks'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Set+owner+Database&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred in SMO. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&LinkId=20476

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

The login 'IDB-SERVMichael' does not exist on this server.



Are all these bugs, or did I miss something?

Please, help

Thanx a lot !!!!

View 3 Replies View Related

Installation From AdventureWorks

May 11, 2007

Hallo



I have reinstalled then SQL-Server.

Now I could found the Script instawdb.sql.



Our version from SQL Server 9.0.2047

and the language is German.



From where could download the script.



Thanks for your help.



Thomas

View 1 Replies View Related

AdventureWorks DB Question

Jun 12, 2006

Hi, I have been looking at the Adventure works DB diagram and I am confused about the relationship that employees, customers and individuals has with contact i.e. a 1-1, 1-many or many-many relationship. Also why is it broken down like that.

Thanks,

Nadim.

View 1 Replies View Related

AdventureWorks Problem

Jun 5, 2008

When I browse the http://localhost/storecsvs/
I always keep on getting this error on my browser

Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

On my Event Viewer i keep on getting 3 errors everytime I browse the said link
1 ----
Source: ASP.NET 2.0.50727.0

Failed to initialize the AppDomain:/LM/W3SVC/1/Root/StoreCSVSException: System.IO.FileLoadExceptionMessage: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.........
--- 1

2---
Source: ASP.NET 2.0.50727.0Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80070005 Access is denied. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.---23---Source: ASP.NET 2.0.50727.0aspnet_wp.exe (PID: 412) stopped unexpectedly.For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.---3

I' ve followed the installation instructions on readme_storefront.htm , the AdventureWorks DB has been properly installed and can make a query on it , AdventureWorks Analysis Services Project has been properly deployed , recompiled the StoreCSVS.sln , the IIS is properly running , I'm using WinXP SP2 and MSSQL 2005 Standard Ed SP2. The instance name of my DB is ComputerNameSQL2005 , I haven't done any changes in the *.sln file of StoreCSVS

Whats causing this error?

Thanks

View 1 Replies View Related

From AdventureWorks To AdventureWorksDW

Feb 1, 2007



AdventureWorks and AdventureWorksDW are good samples for transaction and dw.

Is there any sample of SSIS package to load data from AdventureWorks to AdventureWorksDW? For example, I'd like to update AdventureWorksDW db everyday from transaction db.

How about if some dimensions changed, like employees, and productions?

Thanks!

-Z

View 7 Replies View Related

Registering AdventureWorks

Jul 5, 2006

The organization I work for will be converting to SQL Server 2005 in the near future so I downloaded the free 90 day trial to familiarize myself with the software. I've installed the software and my plan now is to go through the Tutorials. I need to access AdventureWorks sample database. AdventureWorks did not download upon initial setup so I've downloaded/installed it into what appears to be the correct folder: c:ProgramFilesMicrosoft SQL Server90ToolsSamples. I cannot, however, seem to locate it within SQL Management Studio. As advised by the tutorial I've tried setting up a New Server Registration but I can't seem to locate AdventureWorksDB when I'm browsing for it under the Connect to Database:' option under the "Connection Properties" tab of New Server Registration.

I am familiar with database development as it relates to MS Access but I realize this is a whole new ball of wax. Any advise would be appreciated as it relates to this problem but also any information, i.e., very basic books on learning SQL Server would also be appreciated.



Treasa

View 4 Replies View Related

Cannot Connect To AdventureWorks Db

Jan 22, 2007

All,

I am running SQL05 Dev with AdventureWorks on my desktop with local admin rights. I also have it configured to connect locally since it's a DEV version of SQL.

When I use either of the connection strings below I get the error message at the end of this post.

Thanks,

>Scott

Here are the strings:

Data source=(local); initial catalog=AdventureWorks or Data source=(SQLDEV05); initial catalog=AdventureWorks

Here is the error message:

TITLE: Microsoft Report Designer
------------------------------

A connection cannot be made to the database.
Set and test the connection string.


------------------------------
ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

View 3 Replies View Related

Adventureworks BillofMaterials

Oct 5, 2006

In this stored procedure the quantity of the parent is not included. It
should multiply down the tree. Can someone explain how this recursive
function work?

View 1 Replies View Related

Adventureworks Application Error

Jul 21, 2007

I am using ms sql server 2005 Enterprise Evaluation Edition, and I can use the other sample dtabases, like pubs, northwind, but not adventureworksI tried diffrent ways, I am very new to this, and I try before I ask, and I had to give up, Here is what I didwhen I installed adventureworks it was like 166 mb. bigAnd when I tried to use it with visual studio, every time I want to drag a table from: data connections/adventureworks, and try to veiw it in borwser it gives me an application server error, and invalid object namewith northwind database works finethen I tried executing instawdb.sql located C:Progam filesMicrosoft SQL Server90ToolsSamplesAdventureWorks OLTP, from Sql server management studio,And it finishes with errors, and is only 122 mb. bigThis line in red:Msg 4861, Level 16, State 1, Line 1Cannot bulk load because the file "C:Archivos de programaMicrosoft SQL ServerMSSQL.1MSSQLDATAAWDBAddress.csv" could not be opened. Operating system error code 3(error not found).and at the end this:DBCC SHRINKDATABASE: File ID 1 of database ID 6 was skipped because the file does not have enough free space to reclaim.last night I was thinking wether it might be my OS( usning windows xp), or server evalution editionDoes anybody know something about this?I already google search and only found one person with the same problem, but there was no solution posted

View 1 Replies View Related

Adventureworks Version 631 Error

Aug 18, 2007

I installed Sql Server 2005 Express Edition on an XP system this
morning and tried to attach Adventureworks, but got an error message
stating:The database 'Adventureworks' cannot be opend because it
is version 631.  This server supports version 612 and
earlier.  A downgrade path is not supported.Since both Sql
Server 2005 Express Edition, Management Studio, and the Adventureworks
database have all be downloaded within the past three days, I am
astonished that there is a compatibility issue.  I have run
Adventureworks on other systems without problems.  Any suggestions
on how to proceed? 

View 2 Replies View Related

Trying To Install Adventureworks Sample

Jan 4, 2006

I've downloaded from msdn and ran the samples.  It installs something, but the database tree doesn't show up in sql studio.  Is there a straight forward way to do something like import or restore a adventureworks database setup?

View 1 Replies View Related

AdventureWorks Database Question

Apr 6, 2006

How can I install the AdventureWorks database on my box where C:Program FilesMicrosoft SQL Server90ToolsSamples is missing? My SQL 2005 is currently without AdventureWorks OLT. I downloaded the Enterprise trial before uninstalling  SQL2005Express. Please help. Thanks.

View 4 Replies View Related

Problem Loading Adventureworks

Apr 7, 2006

new to sql 2005 express and trying to get adventureworks up and running
within studio express go file open
and get error
"There is mo editor available for C:..AdventureWorks_data.mdf
Make sure application for the file type(.mdf) is installed

I'm presumably missing something basic here
Amy help appreciated

Andrew Clark
www.majorleaguecharts.com

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved