Different Execution Plans - Same Data, Same Server

Jul 23, 2005

Hi there - hoping someone can help me here!

I have a database that has been underperforming on a number of queries
recently - in a test environment they take only a few seconds, but on
the live data they take up to a minute or so to run. This is using the
same data.

Every evening a copy of the live data is copied to a backup 'snapshot'
database on the same server and also, on this copy the queries only
take a second or so to run. (This is testing through the Query
Analyser)

I've studied the execution plans for the same query on the snapshot db
and the live db and they seem to be significantly different - why is
this? it's looking at the same data and exactly the same code!!

Anybody got any ideas???

View 3 Replies


ADVERTISEMENT

SQL Server Execution Plans

Jul 23, 2005

I'm looking for assistance on a problem with SQL Server. We have adatabase where a particular query returns about 3000 rows. This querytakes about 2 minutes on most machines, which is fine in thissituation. But on another machine (just one machine), it can run forover 30 minutes and not return. I ran it in Query Analyzer and it wasreturning about 70 rows every 45-90 seconds, which is completelyunacceptable.(I'm a developer, not a DBA, so bear with me here.)I ran an estimated execution plan for this database on each machine,and the "good" one contains lots of parallelism stuff, in particularthe third box in from the left. The "bad" one contains a "Nested Loop"at that position, and NO parallelism.We don't know exactly when this started happening, but we DO know thatsome security updates have been installed on this machine (it's at theclient location), and also SP1 for Office 2003.So it looks like parallelism has been turned off by one of these fixes.Where do we look for how to turn it back on? This is on SQL Server2000 SP3.Thanks for any help you might have for me!Christine Wolak -- SPL WorldGroup --Join Bytes!

View 6 Replies View Related

SQL Server: Execution Plans + Statistics

Jan 13, 2004

In using ADO to connect to SQL Server, I'm trying to retrieve multiple datasets AND statistics that are usually returned via the OnInfoMessage event. For those that are familiar with SQL Server, I need the results returned by the SET STATISTICS IO ON and SET STATISTICS PROFILE ON options. Anyone had any luck doing this before?

Thanks in advance.

View 4 Replies View Related

Execution Plans &<&> Proportionate Execution Times

Dec 7, 2005

Hi I am slowly getting to grips with SQL Server. As a part of this, I have been attempting to work on producing more efficient queries. This post is regarding what appears to be a discrepancy between the SQL Server execution plan and the actual time taken by a query to run. My brief is to produce an attendance system for an education establishment (I presume you know I'm not an A-Level student completing a project :p ). Circa 1.5m rows per annum, testing with ~3m rows currently. College_Year could strictly be inferred from the AttDateTime however it is included as a field because it a part of just about every PK this table is ever likely to be linked to. Indexes are not fully optimised yet. Table:CREATE TABLE [dbo].[AttendanceDets] ([College_Year] [smallint] NOT NULL ,[Group_Code] [char] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,[Student_ID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,[Session_Date] [datetime] NOT NULL ,[Start_Time] [datetime] NOT NULL ,[Att_Code] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON [PRIMARY]GO CREATE CLUSTERED INDEX [IX_AltPK_Clust_AttendanceDets] ON [dbo].[AttendanceDets]([College_Year], [Group_Code], [Student_ID], [Session_Date], [Att_Code]) ON [PRIMARY]GO CREATE INDEX [All] ON [dbo].[AttendanceDets]([College_Year], [Group_Code], [Student_ID], [Session_Date], [Start_Time], [Att_Code]) ON [PRIMARY]GO CREATE INDEX [IX_AttendanceDets] ON [dbo].[AttendanceDets]([Att_Code]) ON [PRIMARY]GOALL inserts are via an overnight sproc - data comes from a third party system. Group_Code is 12 chars (no more no less), student_ID 8 chars (no more no less). I have created a simple sproc. I am using this as a benchmark against which I am testing my options. I appreciate that this sproc is an inefficient jack of all trades - it has been designed as such so I can compare its performance to more specific sprocs and possibly some dynamic SQL. Sproc:CREATE PROCEDURE [dbo].[CAMsp_Att] @College_Year AS SmallInt,@Student_ID AS VarChar(8) = '________', @Group_Code AS VarChar(12) = '____________', @Start_Date AS DateTime = '1950/01/01', @End_Date as DateTime = '2020/01/01', @Att_Code AS VarChar(1) = '_' AS IF @Start_Date = '1950/01/01'SET @Start_Date = CAST(CAST(@College_Year AS Char(4)) + '/08/31' AS DateTime) IF @End_Date = '2020/01/01'SET @End_Date = CAST(CAST(@College_Year +1 AS Char(4)) + '/07/31' AS DateTime) SELECT College_Year, Group_Code, Student_ID, Session_Date, Start_Time, Att_Code FROM dbo.AttendanceDets WHERE College_Year = @College_YearAND Group_Code LIKE @Group_CodeAND Student_ID LIKE @Student_IDAND Session_Date <= @End_DateAND Session_Date >=@Start_DateAND Att_Code LIKE @Att_CodeGOMy confusion lies with running the below script with Show Execution Plan:--SET SHOWPLAN_TEXT ON--Go DECLARE @Time as DateTime Set @Time = GetDate() select College_Year, group_code, Student_ID, Session_Date, Start_Time, Att_Code from attendanceDetswhere College_Year = 2005 AND group_code LIKE '____________' AND Student_ID LIKE '________'AND Session_Date <= '2005-11-16' AND Session_Date >= '2005-11-16' AND Att_Code LIKE '_' Print 'First query took: ' + CAST(DATEDIFF(ms, @Time, GETDATE()) AS VarCHar(5)) + ' milli-Seconds' Set @Time = GetDate() EXEC CAMsp_Att @College_Year = 2005, @Start_Date = '2005-11-16', @End_Date = '2005-11-16' Print 'Second query took: ' + CAST(DATEDIFF(ms, @Time, GETDATE()) AS VarCHar(5)) + ' milli-Seconds'GO --SET SHOWPLAN_TEXT OFF--GOThe execution plan for the first query appears miles more costly than the sproc yet it is effectively the same query with no parameters. However, my understanding is the cached plan substitutes literals for parameters anyway. In any case - the first query cost is listed as 99.52% of the batch, the sproc 0.48% (comparing the IO, cpu costs etc support this). BUT the text output is:(10639 row(s) affected) First query took: 596 milli-Seconds (10639 row(s) affected) Second query took: 2856 milli-SecondsI appreciate that logical and physical performance are not one and the same but can why is there such a huge discrepancy between the two? They are tested on a dedicated test server, and repeated running and switching the order of the queries elicits the same results. Sample data can be provided if requested but I assumed it would not shed much light. BTW - I know that additional indexes can bring the plans and execution time closer together - my question is more about the concept. If you've made it this far - many thanks.If you can enlighten me - infinite thanks.

View 10 Replies View Related

Execution Plans

Nov 16, 2001

I have two schematically identical databases on the same MS SQL 2000 server. The differences in the data are very slight. Here is my problem: the identical query has totally different execution plans on the different databases. One is (in my opinion) correct, the other causes the query to take 60 times as long. This is not an exaggeration, on the quick DB the query takes 3 seconds, on the other DB it takes 3 minutes. I have tried the following to help the optimizer pick a better execution plan on the slow db:

rebuild the indexes
dbcc indexdefrag
update statistics

I CAN put in a hint to cause the query to execute faster, but my employer now knows about the problem and he (and I) want to know WHY this is happening.

Any ideas would be greatly appreciated.

Thanks.

-Scott

View 1 Replies View Related

Execution Plans

Jul 23, 2005

HiCan you give me sone pointers to where I can get more information aboutthe various operations like index seeks,Bookmark Lookups,ClusteredIndex Scan in an execution plan.ThanksRagu

View 2 Replies View Related

Permissions To See Execution Plans

Apr 15, 2008

Hi Gurus,

What permissio0ns one should have to view execution plans on SQL SERVER 2005.


Thanks,
ServerTeam

View 1 Replies View Related

Same Query - Different Execution Plans??

Jul 16, 2007

Hi,We are trying to solve a real puzzle. We have a stored procedure thatexhibits *drastically* different execution times depending on how itsexecuted.When run from QA, it can take as little as 3 seconds. When it iscalled from an Excel vba application, it can take up to 180 seconds.Although, at other times, it can take as little as 20 seconds fromExcel.Here's a little background. The 180 second response time *usually*occurs after a data load into a table that is referenced by the storedprocedure.A check of DBCC show_statistics shows that the statistics DO getupdated after a large amount of data is loaded into the table.*** So, my first question is, does the updated statistics force arecompile of the stored procedure?Next, we checked syscacheobjects to see what was going on with theexecution plan for this stored procedure. What I expected to see wasONE execution plan for the stored procedure.This is not the case at all. What is happening is that TWO separateCOMPILED PLANs are being created, depending on whether the sp is runfrom QA or from Excel.In addition, there are several EXECUTABLE PLANs that correspond to thetwo COMPILED PLANs. Depending on *where* the sp is run, the usecountincreases for the various EXECUTABLE PLANS.To me, this does not make any sense! Why are there *multiple* compileand executable plans for the SAME sp?One theory we have is, that we need to call the sp with the dboqualifier, ie) EXEC dbo.spHas anyone seen this? I just want to get to the bottom of this andfind out why sometimes the query takes 180 seconds and other timesonly takes 3 seconds!!Please help.Thanks much

View 5 Replies View Related

Parameter &&amp; Execution Plans.

May 8, 2007

Hi all,

I have a table TableA with few million rows. When I query TableA , the execution plans changes based on the input parameter as shown below . Why this happens ? How to resolve this ? Any inputs would be appreciated.


SELECT * FROM TableA WHERE Column1 = 1 => SELECT -> Clustered Index Scan (100%)

SELECT * FROM TableA WHERE Column1 = 2 => SELECT -> Clustered Index Scan (100%)

SELECT * FROM TableA WHERE Column1 = 3 => SELECT -> Parallelism (3%) -> Clustered Index Scan (97%)

SELECT * FROM TableA WHERE Column1 = 4 => SELECT -> Nested Loops -> Index Seek (50%) -> Clustered Index Seek (50%)
(takes a very long time to retrieve the records)

Thanks in advance,

DBLearner.

View 2 Replies View Related

Execution Plans - SQLCE 3

Jun 21, 2006

Does SQLCE 3 cache execution plans? Or even make use of them?

Thanks

Tryst

View 7 Replies View Related

How To Interprete Execution Plans For Queries

Dec 16, 2004

Pls tell me where i will be able to find a good material on interpreting the Execution plans................how do i compare 2 diff plans for Quries written in 2 diff ways...giving same output

View 2 Replies View Related

Execution Plans Inconsistent With Performance

May 16, 2008

I've been working with SQL Server 2005 for a while now and I've noticed some odd behavior that I want to bounce of other members of the community. I should preface that I've been a forum viewer (and occasional contributer) here at SQL Team for a while and I've naturally developed a keen sense for optimizations.

Fundamentally, longer stored procedures with perfectly fine/optimized execution plans are inconsistent with real world performance. In some of these cases, a low subtree cost on a 4 core machine with 16gb of ram and 2 15 drive SAS arrays with little load takes excessively long to run or in some cases doesn't complete.

This isn't due to blocking or resource bottlenecks as I'm quite familiar with built in tools to troubleshoot and resolve those issues. In all cases, I am able to rearchitect the stored procedure into a higher subtree cost variant and get reasonable performance, but it's frustrating to have to redo work and there seems to be no common theme other than longer multi-statement procedures.

I've used SQL Server 2000 extensively and did not notice this level of inconsistency in performance with that product version. Just wondering if others in the community have experiences similar or if I'm just crazy.

Thanks for reading my rant.

- Shane

View 3 Replies View Related

Possible To Have Multiple Query Execution Plans For A Stored Procedure?

Feb 21, 2013

I think not. Microsoft says it is possible: one for parallel and one for serial execution. Don't believe that's possible for a stored procedure to change execution plans on the fly. Have an on-going problem with timeout occurring with an application and narrowed the culprit to a stored procedure. I couldn't find any obvious issues database wise, no locks, etc. so I recompiled (altered) the sproc without making any changes and the issue cleared for a couple days.

It happened again to day, and so I recompiled (altered) the sproc and it went away again. No code changes to both application (so they say) and stored procedure. I ran the below code snippet to check for sprocs with multiple cached plans and the offending one came up on a short list. So, my question is, Is it one sproc per query plan or can there be more than one. I understand the connection issues.

Code:
SELECT db_name(st.dbid) DBName,
object_schema_name(st.objectid, dbid) SchemaName,
object_name(st.objectid, dbid) StoredProcedure,
MAX(cp.usecounts) Execution_count,
st.text [Plan_Text]
INTO #TMP

[Code] .....

View 13 Replies View Related

Left Join Vs Left Outer Join Syntax Generates Different Execution Plans

Apr 16, 2008



Anyone know why using

SELECT *
FROM a LEFT OUTER JOIN b
ON a.id = b.id
instead of

SELECT *
FROM a LEFT JOIN b
ON a.id = b.id

generates a different execution plan?

My query is more complex, but when I change "LEFT OUTER JOIN" to "LEFT JOIN" I get a different execution plan, which is absolutely baffling me! Especially considering everything I know and was able to research essentially said the "OUTER" is implied in "LEFT JOIN".

Any enlightenment is very appreciated.

Thanks

View 5 Replies View Related

Best Practice/recommendation Dev Data Maint Plans

Feb 9, 2007

We are working on converting to SQL 2005 database. During the conversion we are having to rewrite a lot of code and doing a lot of intital testing and development on development data. This is causing our transaction logs to really big. I have created a maint plan that runs nightly that does a back up of database and tran log but throughtout the day the tran logs are getting really big and eating up a ton of disk space. Does anyone have suggestions on what sort of maint plan I can setup to run on my developement data where as at this point I am not concened about being able to roll back the database just keep is small as possible and "healthly"

All ideas are appreciated

Thanks

Chris

View 5 Replies View Related

Query Execution Failed For Data Set &&<name&&> For More Information About This Error Navigate To The Report Server On The Local Serv

Jul 10, 2007

I have created and deployed my first report. It renders fine for me and the other database admin. When others attempt to view it, we get the error


Query execution failed for data set 'periods'. (rsErrorExecutingCommand), For more information about this error navigate to the report server on the local server machine, or enable remote errors


Initially, We created a local group on the machine that hosts both the database and webserver and added the individuals to that group. Then, within SRS Report manager, we added that group to the Browswer role of the report.
The error message was slightly different, in that it couldn't even open the Datasource.

We then added an individual to the database as dbreader, and got the above message. It apprently is starting to render, and when it encounters the first query (dataset "periods", which populates a drop down list for a parameter), it chokes. BTW, the Periods dataset executes a stored procedure dbo.Period_List that has no parameters. It returns a list of reporting periods.

I could not figure out how to "enable remote errors" or find an error log on the server. The C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesLogFiles Log files did not appear to record any errors.

Please advise!

View 6 Replies View Related

SQL Server Maintenance Plans

Feb 18, 2000

A year ago one of our SQL Server 6.5 servers was upgraded
to SQL Server 7.0 sp1. My compatibility level still shows
6.5, however. The SQLAgent has been using the 'localsystem'
account up until earlier this week. I changed the login
to be a domain account with System Administrator
permissions and removed the SA permissions from the
BuiltinAdministrator group. (My ultimate goal is to limit
the access NT Administrators have within my SQL databases.) All of my scheduled jobs run without error except the maintenance plans. (All
jobs have an owner of sa.)

The errors that I receive are permission errors-not being able
to get into tables on the MSDB database. However, if I open
Query Analyzer with the SQLAgent domain account and perform
a select on one of the tables in MSDB, it is successful. If I give
the BuiltinAdministrator account the SA permissions again
while still keeping the SQLAgent using the new domain account,
the maintenance jobs succeed.

Is this an upgrade problem since I do have other SQL 7.0 servers
that don't have this problem? How can I correct this?

Thank you!
Toni

View 1 Replies View Related

SQL Server Maintenance Plans

Mar 7, 2008

I am trying to set up a maintenance plan is SQL Server. I set one up to query one of my very small tables for testing purposes. I made sure that I have the server entered in correctly and also verified that I needed to make sure that I have both TCP/IP and Named Pipes both enabled. However, everytime I set something up and try to execute it. The plans ends up failing. This isn't a hard process but something else isn't setup that needs to be. Does anyone have any ideas pertaining to this.

Is there a special credential that needs to be setup for this?

Any help on this would be great. Thanks

View 7 Replies View Related

SQL Server Admin 2014 :: Correcting Server Connection In Maintenance Plans?

Aug 11, 2015

In SQL 2008 R2, if we clone an environment including SQL server, the maintenance plans retain a connection string to the source/original server they got cloned from and are not editable. But, I was able to use a work around by editing them in BIDS and saving them back on the server. But now with 2014, I am facing two issues:

1.I still can edit the package to correct the server connection, with SSDT; but the option to save back to the server is not available any longer!

2.I used to be able to see all my plans under SSIS in 2008 R2 but not in 2014 now. Although, they are listed in SSMS!

View 1 Replies View Related

SQL Server Disaster Recovery Plans

Nov 28, 2000

I need to know if anybody has any suggestions on websites to visits, documents or templates that will give examples on how to set up a Disaster Recovery Plan for SQL Server 7.0 Databases. I am mostly interested in the Documentation portion to acquire knowledge on the various methodologies used out there. I am a Jr DBA and would appreciate any feedback.
Thanks.

View 1 Replies View Related

What Should The Maintenance Plans Be On Your Mirror Server?

Apr 21, 2006

If your principal fails and your mirror assumes the main role and it is in Full recovery mode (which it has to be in Standard edition), then the log files will grow and grow until a transaction backup and shrink is executed.

I have maintenance plans running daily (and hourly for transaction log backup/shrink) on my principal, but nothing on my mirror.

Do I need to set up the same maintenance plans on my mirror server???

Thanks

Ed

View 19 Replies View Related

SQL Server 2005 Maintenance Plans - Best Practises

Feb 21, 2008



Can anyone please provide me with some Best Practises for setting up Maintenance plans? IE what order should things be done in? What should be done daily, weekly, monthly, yearly... I am attempting to setup a new server and I am now 100% sure I have the maintenance plan setup correctly... expecially when I attempted to run it last night it and ran for over 8 hours and still didn't do the backup's yet. I had to reboot the server this morning to make it stop using 100% of the CPU. So please any help would be wonderful.

Regards,

Billy S.

View 1 Replies View Related

SQL Server 2012 :: Invalidate Cached Query Plans?

Apr 30, 2014

way to invalidate cached query plans? I would rather target a specific query instead of invalidating all of them.

Also do you know of any sql server setting that will cause cached query plans to invalidate even though only one character in the queries has changed?

exec sp_executesql N'select
cast(5 as int) as DisplaySequence,
mt.Description + '' '' + ct.Description as Source,

[Code].....

In this query we have seen (on some databases) simply changing ‘@CustomerId int',@CustomerId=1065’ too ‘@customerId int',@customerId=1065’ fixed the a speed problem….just changed the case on the Customer bind parameter. On other servers this has no effect. I’m thinking the server is using an old cached query plan, but don’t know for sure.

View 3 Replies View Related

Sql Server 2005 Maintenance Plans Folder Missing

Aug 10, 2007

I've seen a few threads on this which seem to suppose the problem is on Express edition rather than Standard edition. Not so here.
This is definitely Standard edition, SP3 as seen by running
SELECT CONVERT(char(20), SERVERPROPERTY('Edition'))
SELECT CONVERT(char(20), SERVERPROPERTY('ProductLevel'))
In SSMS
Under the Management folder there is no "Maintenance Plans" folder.
There IS a "Maintenance Plans" folder under the Legacy Folder.
I have another instance which is Standard and SP1 which looks just fine.

View 9 Replies View Related

Cannot Save Maintenance Plans (SQL Server 2005 X64, SP2, Patched To KB934458)

Nov 18, 2007

I have a SQL Server 2005 x64 bit with SP2 applied and patched to KB934458-x64-ENU (9.0.3054)
I am unable to create a maintenance plan via Management Studio or save a plan in Management Studio using the wizard.

If I just try and create a new maintenance plan, then I get the following problem:
"An OLE DB error 0x80004005 (Login timeout expired) occurred while enumerating packages. A SQL statement was issued and failed."

If I try and create any maintenance plan via the wizard, I get the following problem:
"The SaveToSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired). The SQL statement that was issued has failed."

I've doen a bit of digging on this and had initially thought it was related to the fact that I have two instances installed on 1 server. I've since updated the MsDtsSrvr.ini.xml file to point at both instances, as I thought that might have been causing the problem. That hasn't helped at all. Edited example of xml file is below:

<?xml version="1.0" encoding="utf-8"?><DtsServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <StopExecutingPackagesOnShutdown>true</StopExecutingPackagesOnShutdown> <TopLevelFolders> <Folder xsi:type="SqlServerFolder"> <Name>MSDB SQL Server Instance 1</Name> <ServerName>ServerNameInstanceName1</ServerName> </Folder> <Name>MSDB Server Instance 2</Name> <ServerName>ServerNameInstanceName2</ServerName> </Folder> <Folder xsi:type="FileSystemFolder"> <Name>File System</Name> <StorePath>..Packages</StorePath> </Folder> </TopLevelFolders> </DtsServiceConfiguration>

Any suggestions would be most welcome!

View 4 Replies View Related

SQL Server 2014 :: Profiler Reads Column Incorrect For Parallel Plans?

Aug 19, 2015

I often use profiler as one tool to identify bad plans. The reads column gives me a good indication of excessive IO to dig into and correct if necessary. I often use it with Showplan so I can see what a query does, replicate it and fix it.

However I have just lost some faith in it. I am looking at a poorly performing query joining five tables. A parallel plan has been generated and one table is being scanned (in parallel) due to a missing index. This table had in excess of 4 million rows in it. The rest hitd indexes well. However the entire query generates ONLY 12 READS.

Once corrected, a single processor plan is used. This looks really efficient and uses 120 reads. That looks the right figure to me.

Clearly 12 reads is wrong. Does the profiler only display one thread of a parallel plan perhaps? Or something else?

View 1 Replies View Related

Static Variables In A SQLCLR Stored Proc Seem To Get Reused From Execution To Execution Of The Sp

Aug 23, 2007

after moving off VS debugger and into management studio to exercise our SQLCLR sp, we notice that the 2nd execution gets an error suggesting that our static SqlCommand object is getting reused from the 1st execution (of the sp under mgt studio). If this is expected behavior, we have no problem limiting our statics to only completely reusable objects but would first like to know if this is expected? Is the fact that debugger doesnt show this behavior also expected?

View 4 Replies View Related

Data Flow Execution Phases

May 29, 2006

Hi guys,

I would like to know what happens during the different phases when executing a data flow task. I noticed that there are the validation, prepare for execute, pre-execute, execute, post-execute, and cleanup phases.

We all know that the execute phase is the actual execution of the desired data flow (source to destination) but I was wondering what the other phases do. Knowing what happens during those phases will help me optimize the whole execution. 1 question raised by someone here is "what is the difference between the Prepare for Execute phase and the Pre-Execute phase? and what does the validation phase do?

Thanks in advance for the help you can give

Kervy

View 1 Replies View Related

Query Execution Failed For Data Set

Mar 6, 2008

I have several reports that are working great on my report server. However, one of my reports "ReportB" is launched as a hyperlink from "ReportA" through the use of a custom function which uses a little javascript to simply open a new browser to the URL of ReportB along with passing a parateter through that URL. I can get it all to work great on my local machine I'm using for development. But when I deploy it to my production server I get the following problems (Please note ReportA works fine, it is ReportB that gives me these problems):

1. When running report in web browser on my local machine - An error has occurred during report processing. Query execution failed for data set 'FDQW'. For more information about this error navigate to the report server on the local machine, or enable remote errors.

2. When running the report in a web browser on the report server itself (also is the SQL server containing the data) - An error has occurred during report processing. Query execution failed for data set 'FDQW'. Must declare the scalar variable "@DocNo".

Like I said above... when I deploy to my local RS on my development machine I get neither of the above problems. I have tried changing SQL roles, RS Execution accounts, database connection credentials, all kinds of permission realated things and can't get it to work.

I am not using a stored procedure as a data source. Here is a copy of my data set query if it helps:

SELECT DocumentHeaders.DocNo, DocumentHeaders.SoldToCompany, DocumentHeaders.SoldToContact, DocumentHeaders.SalesRep,
DocumentHeaders.DocName, DocumentHeaders.DocDate, DocumentHeaders.GrandTotal, DocumentItems.LineNumber, DocumentItems.Description,
DocumentItems.QtyTotal, DocumentItems.ExtendedPrice
FROM DocumentHeaders INNER JOIN
DocumentItems ON DocumentHeaders.ID = DocumentItems.DocID
WHERE (DocumentHeaders.DocNo = @DocNo) AND (LEN(CONVERT(varchar, DocumentItems.Description)) > 0)

Thank you
Max

View 5 Replies View Related

Query Execution Failed For Data Set

Aug 30, 2007

Hi,

We are using SQL 2005 server for generating reports.When we ran the reports it taking so much time after some time it shows this error:---

ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set ---> System.Data.SqlClient.SqlException: A severe error occurred on the current command. The results, if any, should be discarded.


Can you help me out.

Thanks,
--Amit

View 12 Replies View Related

Sequence Execution At Data Flow Task ?

Apr 25, 2008



I have one Data flow, which trasfer data into two table (Parent & Child) .

My question is : Is there a way, i can load data first into parent and then child table. because child table getting load first after that parent table loading. (Execution should be Source Parent --> Destination Parent) First , (Source Child --> Destination Child) Second.
In my case its executing reverse. So i have foreign key constraints at child table , its giving foreign contraints error while running ssis package

Can any one tell me,
How to define my own sequence execution at the Data flow task (Source - Destination) ?

Thanks

View 3 Replies View Related

Data Flow Execution Hangs With No Error

Dec 7, 2005

I have a SSIS (CTP June 2005) package with several data flow tasks.  One data flow has 2 OLEDB data sources which are then unioned together, followed by a conditional split, then a derived column transformation, which feeds into an OLEDB destination.  When I run the package, this particular data flow seems to run fine and then just stops.  There are no errors and the records counts don't move.  I've used data viewers to look at the data and it seems fine.  I've switched the OLEDB destination with a flat file and execution runs fine, then switched back to OLEDB and it hangs again (over and over).  There's nothing unusual about the OLEDB destination, and all the other OLEDB destinations work fine.  It also seems to hang on the same destination row number count, but again that row has been verified as valid.  In fact, I dropped the DB table and recreated it with no constraints and all fields nullable, but the problem persists.  Help?

View 6 Replies View Related

Maximum Data Flow Tasks Execution

Sep 10, 2006

Hi guys,

i got a foreach loop that has about 20 data flow tasks(same database connections but different extractions) but i notice that when i execute the project it only runs 4 data flow tasks at a time.



i know that there is an option for each data flow to set the "Engine Threads", but is there a way to set the thereads in a foreach loop or for the whole project so it will execute all data flow tasks in one go for each loop.



please help???

View 3 Replies View Related







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