Package Runs In 1 Minutes In Visual Studio But Takes 5+ (sometimes Hanges) As Job

Jan 26, 2007

I have an SSIS package that when run from Visual Studio takes 1 minute or less to complete. When I schedule this package to run as a SQL Server job it takes 5+ and sometimes hangs complaining about buffers.

The server is a 4 way 3ghz Xeon (dual core) with 8GB ram and this was the only package running.

When I look in the log I see that the package is running and processing data, although very very very very very slowly.

Has anyone else experienced this?

Thanks for your help

Marcus

View 5 Replies


ADVERTISEMENT

Visual Studio 2005 Runs Out Of Memory When Trying To Use SSIS Package

Jul 12, 2006

Visual Studio runs out of memory when trying to use SSIS package. I am trying to create and run a SSIS package that validates and imports some large xml files >200MB. Validation fails because Visual studio cannot open large files without running out of memory.

The SSIS package throws this error when I run the package..at the validation task.

Error: 0xC002F304 at Validate bio_fixed, XML Task: An error occurred with the following error message: "Exception of type 'System.OutOfMemoryException' was thrown.".

How do I increase the amount of RAM that VIsual Studio can use...I have plenty of RAM on my workstation >3GB, but VS chokes maybe around 100MB files?

Thanks,

Forrest







View 9 Replies View Related

Query Runs In Sub Second Time Until I Put It In A Stored Procedure Then It Takes 2 Minutes.

Jun 25, 2007

The query below runs in sub second time if I don't call it as a stored procedure. I have looked at the execution plan for both the query and the query as a stored procedure and they are the same.
When I put the query into a stored procedure it takes over 2 minutes to run.
All feedback (even the ugly stuff) is more than welcome. I want to master this issue and forever put it behind me.
This is the sql when I just execute it outright:1 DECLARE
2 @WebUserID nvarchar(20)
3 ,@DocumentTypeID int
4 ,@RouteID nvarchar(10)
5 ,@CustomerID nvarchar(15)
6 ,@DocumentIDPrefix nvarchar(20)
7 ,@StartDate datetime
8 ,@EndDate datetime
9 ,@OversoldOnly bit
10 ,@DexCustomersOnly bit
11 ,@DeviationsOnly bit
12 ,@CashNoPaymentOnly bit
13 ,@SignatureName nvarchar(45)
14 ,@SortExpression varchar(200)
15 ,@StartRowIndex int
16 ,@MaximumRows int
17
18 SET @WebUserID = 'manager'
19 SET @DocumentTypeID = 0
20 SET @DocumentIDPrefix = '%'
21 SET @StartDate = '04/17/2007'
22 SET @EndDate = '04/19/2007'
23 SET @OversoldOnly = 0
24 SET @DexCustomersOnly = 0
25 SET @DeviationsOnly = 0
26 SET @CashNoPaymentOnly = 0
27 SET @SortExpression = ''
28 SET @StartRowIndex = 0
29 SET @MaximumRows = 20;
30
31 WITH OrderedDocumentHistory AS
32 (
33 SELECT
34 dh.DocumentHistoryID
35 ,dh.DocumentID
36 ,dh.DocumentTypeID
37 ,dh.DocumentTypeDesc
38 ,dh.RouteID
39 ,dh.RouteDesc
40 ,dh.CustomerID
41 ,dh.CustomerName
42 ,dh.DocDate
43 ,ISNULL(dc.HasReceipt, 0) AS 'HasReceipt'
44 ,ddt.Description AS 'SignatureReason'
45 ,a.Amount
46 ,ROW_NUMBER() OVER (ORDER BY dh.DocDate DESC) AS 'RowNumber'
47 FROM
48 DocumentHistory dh
49 INNER JOIN Customers c ON dh.CustomerID = c.CustomerID
50 INNER JOIN DeviationTypes ddt ON dh.DriverDeviationTypeID = ddt.DeviationTypeID
51 INNER JOIN
52 (
53 SELECT
54 DocumentHistoryID
55 ,(COALESCE(SUM((CONVERT(INT, Units + DeviationUnits)) * (UnitPrice - UnitDiscount)) + SUM((CONVERT(INT, Cases + DeviationCases)) * (CasePrice - CaseDiscount)), 0.0)) AS Amount
56 FROM
57 DocumentHistoryItems dhia
58 GROUP BY
59 dhia.DocumentHistoryID
60 ) AS a ON a.DocumentHistoryID = dh.DocumentHistoryID
61 LEFT OUTER JOIN
62 (
63 SELECT DISTINCT
64 dca.DocumentID
65 ,1 AS 'HasReceipt'
66 FROM
67 DocumentCollections dca
68 ) AS dc ON dh.DocumentID = dc.DocumentID
69 WHERE
70 dh.DocDate BETWEEN @StartDate AND @EndDate
71 AND (dh.DocumentTypeID = @DocumentTypeID OR @DocumentTypeID IS NULL)
72 AND (dh.RouteID = @RouteID OR @RouteID IS NULL)
73 AND (dh.CustomerID = @CustomerID OR @CustomerID IS NULL)
74 AND dh.DocumentID LIKE @DocumentIDPrefix
75 AND CASE WHEN @OversoldOnly = 1 THEN ISNULL( (SELECT TOP 1 (dhio.DeviationUnits + dhio.DeviationCases) FROM DocumentHistoryItems dhio WHERE dh.DocumentHistoryID = dhio.DocumentHistoryID AND (dhio.DeviationUnits > 0 OR dhio.DeviationCases > 0)), 0) ELSE 1 END > 0
76 AND CASE WHEN @DexCustomersOnly = 1 THEN c.DEXEnable ELSE 'Y' END = 'Y'
77 AND CASE WHEN @DeviationsOnly = 1 THEN ISNULL( (SELECT TOP 1 (dhio.DeviationUnits + dhio.DeviationCases) FROM DocumentHistoryItems dhio WHERE dh.DocumentHistoryID = dhio.DocumentHistoryID AND (dhio.DeviationUnits != 0 OR dhio.DeviationCases != 0)), 0) ELSE 1 END != 0
78 AND CASE WHEN @CashNoPaymentOnly = 1 THEN dh.Terms ELSE 'CHECK/CASH' END = 'CHECK/CASH'
79 AND CASE WHEN @CashNoPaymentOnly = 1 THEN (SELECT MAX(dhio.AlcoholPct) FROM DocumentHistoryItems dhio WHERE dhio.DocumentHistoryID = dh.DocumentHistoryID) ELSE 1 END > 0
80 AND CASE WHEN @CashNoPaymentOnly = 1 THEN ISNULL(dc.HasReceipt, 0) ELSE 0 END = 0
81 AND (dh.SigName = @SignatureName OR @SignatureName IS NULL)
82 AND (c.WarehouseID IN (SELECT WarehouseID FROM WebUserWarehouses WHERE WebUserID = @WebUserID)
83 OR @WebUserID IS NULL)
84 )
85
86 SELECT
87 DocumentHistoryID
88 ,DocumentID
89 ,DocumentTypeDesc
90 ,RouteID
91 ,RouteDesc
92 ,CustomerID
93 ,CustomerName
94 ,DocDate
95 ,Amount
96 ,HasReceipt
97 ,SignatureReason
98 FROM
99 OrderedDocumentHistory
100 WHERE
101 RowNumber BETWEEN (@StartRowIndex + 1) AND (@StartRowIndex + @MaximumRows) Here is the sql for creating the stored procedure.  1 CREATE Procedure w_DocumentHistory_Select
2 (
3 @WebUserID nvarchar(20)
4 ,@DocumentTypeID int
5 ,@RouteID nvarchar(10)
6 ,@CustomerID nvarchar(15)
7 ,@DocumentIDPrefix nvarchar(20)
8 ,@StartDate datetime
9 ,@EndDate datetime
10 ,@OversoldOnly bit
11 ,@DexCustomersOnly bit
12 ,@DeviationsOnly bit
13 ,@CashNoPaymentOnly bit
14 ,@SignatureName nvarchar(45)
15 ,@SortExpression varchar(200)
16 ,@StartRowIndex int
17 ,@MaximumRows int
18 )
19 AS
20 SET NOCOUNT ON
21
22 IF LEN(@SortExpression) = 0 OR @SortExpression IS NULL
23 SET @SortExpression = 'Number DESC'
24
25 IF @StartRowIndex IS NULL
26 SET @StartRowIndex = 0
27
28 IF @MaximumRows IS NULL
29 SELECT
30 @MaximumRows = COUNT(dh.DocumentHistoryID)
31 FROM
32 DocumentHistory dh;
33
34 WITH OrderedDocumentHistory AS
35 (
36 SELECT
37 dh.DocumentHistoryID
38 ,dh.DocumentID
39 ,dh.DocumentTypeID
40 ,dh.DocumentTypeDesc
41 ,dh.RouteID
42 ,dh.RouteDesc
43 ,dh.CustomerID
44 ,dh.CustomerName
45 ,dh.DocDate
46 ,ISNULL(dc.HasReceipt, 0) AS 'HasReceipt'
47 ,ddt.Description AS 'SignatureReason'
48 ,a.Amount
49 ,CASE
50 WHEN @SortExpression = 'Number DESC' THEN (ROW_NUMBER() OVER (ORDER BY dh.DocumentID DESC))
51 WHEN @SortExpression = 'Number ASC' THEN (ROW_NUMBER() OVER (ORDER BY dh.DocumentID ASC))
52 WHEN @SortExpression = 'CustomerName DESC' THEN (ROW_NUMBER() OVER (ORDER BY dh.CustomerName DESC))
53 WHEN @SortExpression = 'CustomerName ASC' THEN (ROW_NUMBER() OVER (ORDER BY dh.CustomerName ASC))
54 WHEN @SortExpression = 'CompletedDate DESC' THEN (ROW_NUMBER() OVER (ORDER BY dh.DocDate DESC))
55 WHEN @SortExpression = 'CompletedDate ASC' THEN (ROW_NUMBER() OVER (ORDER BY dh.DocDate ASC))
56 WHEN @SortExpression = 'RouteDescription DESC' THEN (ROW_NUMBER() OVER (ORDER BY dh.RouteDesc DESC))
57 WHEN @SortExpression = 'RouteDescription ASC' THEN (ROW_NUMBER() OVER (ORDER BY dh.RouteDesc ASC))
58 END AS 'RowNumber'
59 FROM
60 DocumentHistory dh
61 INNER JOIN Customers c ON dh.CustomerID = c.CustomerID
62 INNER JOIN DeviationTypes ddt ON dh.DriverDeviationTypeID = ddt.DeviationTypeID
63 INNER JOIN
64 (
65 SELECT
66 DocumentHistoryID
67 ,(COALESCE(SUM((CONVERT(INT, Units + DeviationUnits)) * (UnitPrice - UnitDiscount)) + SUM((CONVERT(INT, Cases + DeviationCases)) * (CasePrice - CaseDiscount)), 0.0)) AS Amount
68 FROM
69 DocumentHistoryItems dhia
70 GROUP BY
71 dhia.DocumentHistoryID
72 ) AS a ON a.DocumentHistoryID = dh.DocumentHistoryID
73 LEFT OUTER JOIN
74 (
75 SELECT DISTINCT
76 dca.DocumentID
77 ,1 AS 'HasReceipt'
78 FROM
79 DocumentCollections dca
80 ) AS dc ON dh.DocumentID = dc.DocumentID
81 WHERE
82 dh.DocDate BETWEEN @StartDate AND @EndDate
83 AND (dh.DocumentTypeID = @DocumentTypeID OR @DocumentTypeID IS NULL)
84 AND (dh.RouteID = @RouteID OR @RouteID IS NULL)
85 AND (dh.CustomerID = @CustomerID OR @CustomerID IS NULL)
86 AND dh.DocumentID LIKE @DocumentIDPrefix
87 AND CASE WHEN @OversoldOnly = 1 THEN ISNULL( (SELECT TOP 1 (dhio.DeviationUnits + dhio.DeviationCases) FROM DocumentHistoryItems dhio WHERE dh.DocumentHistoryID = dhio.DocumentHistoryID AND (dhio.DeviationUnits > 0 OR dhio.DeviationCases > 0)), 0) ELSE 1 END > 0
88 AND CASE WHEN @DexCustomersOnly = 1 THEN c.DEXEnable ELSE 'Y' END = 'Y'
89 AND CASE WHEN @DeviationsOnly = 1 THEN ISNULL((SELECT TOP 1 (dhio.DeviationUnits + dhio.DeviationCases) FROM DocumentHistoryItems dhio WHERE dh.DocumentHistoryID = dhio.DocumentHistoryID AND (dhio.DeviationUnits != 0 OR dhio.DeviationCases != 0)), 0) ELSE 1 END != 0
90 AND CASE WHEN @CashNoPaymentOnly = 1 THEN dh.Terms ELSE 'CHECK/CASH' END = 'CHECK/CASH'
91 AND CASE WHEN @CashNoPaymentOnly = 1 THEN (SELECT MAX(dhio.AlcoholPct) FROM DocumentHistoryItems dhio WHERE dhio.DocumentHistoryID = dh.DocumentHistoryID) ELSE 1 END > 0
92 AND CASE WHEN @CashNoPaymentOnly = 1 THEN ISNULL(dc.HasReceipt, 0) ELSE 0 END = 0
93 AND (dh.SigName = @SignatureName OR @SignatureName IS NULL)
94 AND (c.WarehouseID IN (SELECT WarehouseID FROM WebUserWarehouses WHERE WebUserID = @WebUserID)
95 OR @WebUserID IS NULL)
96 )
97 SELECT
98 DocumentHistoryID
99 ,DocumentID
100 ,DocumentTypeDesc
101 ,RouteID
102 ,RouteDesc
103 ,CustomerID
104 ,CustomerName
105 ,DocDate
106 ,Amount
107 ,HasReceipt
108 ,SignatureReason
109 FROM
110 OrderedDocumentHistory
111 WHERE
112 RowNumber BETWEEN (@StartRowIndex + 1) AND (@StartRowIndex + @MaximumRows)
 

 Here is the code for calling the stored procedure:1 DECLARE @RC int
2 DECLARE @WebUserID nvarchar(20)
3 DECLARE @DocumentTypeID int
4 DECLARE @RouteID nvarchar(10)
5 DECLARE @CustomerID nvarchar(15)
6 DECLARE @DocumentIDPrefix nvarchar(20)
7 DECLARE @StartDate datetime
8 DECLARE @EndDate datetime
9 DECLARE @OversoldOnly bit
10 DECLARE @DexCustomersOnly bit
11 DECLARE @DeviationsOnly bit
12 DECLARE @CashNoPaymentOnly bit
13 DECLARE @SignatureName nvarchar(45)
14 DECLARE @SortExpression varchar(200)
15 DECLARE @StartRowIndex int
16 DECLARE @MaximumRows int
17
18 SET @WebUserID = 'manager'
19 SET @DocumentTypeID = 0
20 SET @DocumentIDPrefix = '%'
21 SET @StartDate = '04/17/2007'
22 SET @EndDate = '04/19/2007'
23 SET @OversoldOnly = 0
24 SET @DexCustomersOnly = 0
25 SET @DeviationsOnly = 0
26 SET @CashNoPaymentOnly = 0
27 SET @SortExpression = ''
28 SET @StartRowIndex = 0
29 SET @MaximumRows = 20;
30
31 EXECUTE @RC = [Odom].[dbo].[w_DocumentHistory_Select]
32 @WebUserID
33 ,@DocumentTypeID
34 ,@RouteID
35 ,@CustomerID
36 ,@DocumentIDPrefix
37 ,@StartDate
38 ,@EndDate
39 ,@OversoldOnly
40 ,@DexCustomersOnly
41 ,@DeviationsOnly
42 ,@CashNoPaymentOnly
43 ,@SignatureName
44 ,@SortExpression
45 ,@StartRowIndex
46 ,@MaximumRows
 

View 3 Replies View Related

Update On Machine Runs Immediately, Update On Linked Server Takes 8 Minutes

Jan 2, 2008

What's up with this?

This takes like 0 secs to complete:

update xxx_TableName_xxx
set d_50 = 'DE',modify_timestamp = getdate(),modified_by = 1159

where enc_id in

('C24E6640-D2CC-45C6-8C74-74F6466FA262',

'762E6B26-AE4A-4FDB-A6FB-77B4782566C3',

'D7FBD152-F7AE-449C-A875-C85B5F6BB462')

but From linked server this takes 8 minutes????!!!??!:

update [xxx_servername_xxxx].xxx_DatabaseName_xxx.dbo.xxx_TableName_xxx
set d_50 = 'DE',modify_timestamp = getdate(),modified_by = 1159

where enc_id in

('C24E6640-D2CC-45C6-8C74-74F6466FA262',

'762E6B26-AE4A-4FDB-A6FB-77B4782566C3',

'D7FBD152-F7AE-449C-A875-C85B5F6BB462')


What settings or whatever would cause this to take so much longer from the linked server?

Edit:
Note) Other queries from the linked server do not have this behavior. From the stored procedure where we have examined how long each query/update takes... this particular query is the culprit for the time eating. I thought it was to do specefically with this table. However as stated when a query window is opened directly onto that server the update takes no time at all.

2nd Edit:
Could it be to do with this linked server setting?
Collation Compatible
right now it is set to false? I also asked this question in a message below, but figured I should put it up here.

View 5 Replies View Related

SSIS: Opening Package Takes 8 Minutes

Apr 20, 2006

I have an IS package containing approx. 10 tasks in the control flow - one of these tasks is a rather large data flow containing around 50 transformations plus 3 sources and two destinations. Around 10 of these are script components and another 10 are Union All transformations. The rest are primarily lookups, conditional splits and derived column transformation.

The XML file containing the package is approx. 4.5 MB. As I am developing the package, it is becoming increasingly slow to work with as more transformations are added to the data flow. Now, it takes 8 minutes every time I have to open the package for development (DelayValidation is even set to true) and DTExec (not the debugger) uses the same amount of time before it starts executing the package. It also takes a very long time to edit the data flow, as I typically have to wait 1-2 minutes every time the designer has to "commit" a change.

Does anyone have any idea what can be done to speed up the package - both with regard to development and execution?

View 4 Replies View Related

SSIS Package Runs In Development Studio But Not As A Job

Jul 10, 2006

When I run a package I created in the development Studio it runs fine but if I create a job and run it I get an error "The AcquireConnection method call to the connection manager "ODS" failed with error code 0xC0202009"



I have the package setup to use a XML config file and it works fine on all the other packages but this one will not work.

View 6 Replies View Related

SSIS Package Failing When Run As A Job But Runs Fine In BI Studio

Sep 12, 2007



I'm at a bit of a loss. I've written a package that has about a dozen data flow tasks and each one loads data from text files into tables in a db. It's possible that some of the fields in the text files may have data that would need to be truncated upon insert into the db.

In the data flows, I've set the fields in the data sources I know this could happen to to ignore truncation errors. When I run this within BI Studio, everything works fine. I then loaded the package into the SSIS store on the db server and if I attempt to run it from the SSIS store or if a job executes it, the package appears to be failing because of these truncation errors that I've told it to ignore.

Am I missing something? Thanks!

View 7 Replies View Related

Package Runs In BIDS, Manually In Mgmt. Studio, But Not Via Agent. Why???

Aug 2, 2007

All:
As the subject suggests I am encountering an error while running a package through an agent. Unfortunately the error does not provide much information for me to diagnose the problem, and hence the post.

I have pasted the error below and appreciate help from anyone.

Thank you,



Message
Executed as user: EPSILONSYSTEM. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 10:16:31 AM Error: 2007-08-02 10:16:32.25 Code: 0xC002F304 Source: File System Task File System Task Description: An error occurred with the following error message: "Could not find a part of the path 'P:FinanceItems Sold Below CostItems Sold Below Cost_2007-08-01.csv'.". End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 10:16:31 AM Finished: 10:16:32 AM Elapsed: 1.047 seconds. The package execution failed. The step failed.

View 9 Replies View Related

Reporting Services :: SSRS Report Runs In Visual Studio But Not Report Manager

Jul 5, 2012

I have written a report visual studio.  The report has 10 multi-value parameters that pull data from their individual data sets within the reports.  When running the report from within Visual Studio it renders fine.  There are no errors reported, only a warning related to a pathname I have use to retrieve image data and display on the report.Deployment of the report is error free.When I view the report I briefly get the "Loading" splash window, but then nothing.  None of the headers or static text is displayed.  The results window is blank.

The report defaults all the parameter values.  In trying to debug the issue I have found by reducing the number of parameter values the report will render.  Once I have all the values added, the report does nothing.Below is the query being used for the report.  The where clause in the query shows the parameters being used and the syntax.We are running on Windows Server 2008 R2 and SQL Server 2008 R2.

Ralph
SELECT RTRIM(a.ITEMNMBR) AS Style, RTRIM(a.ITEMDESC) AS Description, a.ITMSHNAM AS UPC, c.LOCNCODE AS Store, d.LISTPRCE AS ListPrice, a.CURRCOST AS Cost,
a.USCATVLS_1 AS [Main Category], a.USCATVLS_2 AS Market, a.USCATVLS_3 AS [Alternate Retail], a.USCATVLS_4 AS Country, b.ITEMXTRAS_1_Type AS Type,
b.ITEMXTRAS_2_Finish AS Finish, b.ITEMXTRAS_3_SubCategory AS SubCategory, b.ITEMXTRAS_4_Department AS Department,

[code]...

View 7 Replies View Related

Run Dts Package From Visual Studio(user Will Trigger The Running Of Dts Package)

Nov 5, 2007



Hi all,
I am creating a dts package to export files from one database to another database.
I tried to search for ways to execute the files and found out that i need to add
reference to Microsoft.Sql.managedDts. However, I cannot find this reference from
my reference. Do i have other alternatives to run this file?

View 8 Replies View Related

How To Run Dts Package From Visual Studio

Nov 4, 2007

Hi all,
 Have tried running a dts package but Im unable to add the reference Microsoft.Sql.managedDts.
Is there any other way that i can do tat from Visual studio code behind page? I need to let the user to
trigger the package from the web application. Thks in advance.
 
Wei

View 1 Replies View Related

Visual Studio Is Busy - Package Frozen

Oct 10, 2007

I have three very simliar packages that I edited. I added an Exec SQL Task to truncate a table. These packages are not large or complex. When I simply try to open two out of the three packages, Visual Studio hangs and I get the balloon saying it's busy. I see in the bottom left hand corner, "Validating Load Phase". This never changes. My question is how can I get into this package? I hadn't yet checked it into SourceSafe If I even attempt to single click on any step in the package, it will hang. I've also had a co-worker attempt to open the packages on his computer, and he gets the same thing, so it's definitely the SSIS package. Any help would be appreciated!

View 9 Replies View Related

Stored Proc Takes 45+ MINUTES!

Aug 14, 2007

Hi guys -

I have been googling all day and not found a reasonable solution to my problem.

Here is what I am trying to do. The T-SQL code is included at the bottom of this message.

- The user can specify columns that are stored in a CVColumn table (the data for which comes from an external source). For example, we may provide LastName and FirstName columns and the user could add ShoeSize and FavoriteColor.

- When we get the data from the other source, we create it as a dataset in the *code* with each user-defined field as a column of the table and each person as a row in the table. This is used *everywhere* including binding to grids, etc... So the dataset may look like this:
PersonID
LastName
FirstName
ShoeSize
FavoriteColor

- The dba has required that the data be stored in a normalized fashion. Since we don't know what the columns are - the data is stored in the *table* as:
PersonID
ColumnName
ColumnValue

- When the user gets the data from the external source the first time, the code loops through every person row and every column of the row to insert fields into the table using an Insert stored proc. This performs reasonable well.

- When the code retrieves the data from the database, it needs to reformat the data into one row per person, one column per field so that all of the other code can do the binding, etc.

- So I created a temp table with the appropriate rows and columns and then updated that table with the appropriate data. *This* is the stored proc that has been running now for almost an hour.

- There *must* be a way to do this that performs better?

Here is my T-SQL:




Code Snippet
DECLARE @columnNamesWithSizes varchar(8000)
DECLARE @delim varchar(1)
DECLARE @values varchar(8000)
-- Get the set of column names
SET @columnNamesWithSizes='swiCMKey VARCHAR(4092), swiCMContactManager VarChar(100), swiCMContactManagerID int,
swiCMFolder VarChar(4092), swiCMCVFolder VarChar(4092)'
SELECT @columnNamesWithSizes=COALESCE(@columnNamesWithSizes + ',', '') + ColumnName + ' VARCHAR(50)' FROM CVColumn
-- Create the table with the desired set of columns
EXEC ('CREATE TABLE ##tempTable ( ' + @columnNamesWithSizes + ')')

-- Insert the primary key into each row
EXEC ('INSERT INTO ##tempTable (swiCMKey) SELECT DISTINCT ContactID as swiCMKey FROM CVContact')
-- Use a cursor to loop through all of the records
SET @delim=''''
DECLARE @swiCMKey VARCHAR(4096)
DECLARE contactList CURSOR FOR
SELECT swiCMKey FROM ##tempTable
OPEN contactList
FETCH NEXT FROM contactList INTO @swiCMKey

-- Loop until all rows in temp table have been processed.
WHILE @@FETCH_STATUS = 0
BEGIN
SET @values=null
-- Retrieve all of the columns for this contact
SELECT @values = COALESCE(@values + ',', '') + ColumnName + '=' + @delim + COALESCE(Value,'') + @delim
FROM CVContact
WHERE CVContact.ContactID=@swiCMKey

-- Perform the update to the temp table with the column values
EXEC ('UPDATE ##tempTable SET ' + @values + ' WHERE swiCMKey=' + @delim + @swiCMKey + @delim)

-- Get the next one
FETCH NEXT FROM contactList INTO @swiCMKey
END
CLOSE contactList
DEALLOCATE contactList
-- Return the results
SELECT * from ##tempTable
-- Kill the temp table
DROP TABLE ##tempTable






Any ideas or othre suggestions would be much appreciated!

(BTW - up until today the data from the code-based dataset was stored as XML and then read back as XML. However, we found with 80,000+ people that it took 5 minutes to read the XML. But that is faster than this stored proc!<G>)

View 6 Replies View Related

Visual Studio Hangs When Executing A Package (also DTEXEC)

Oct 31, 2007

Hi,

We have a problem with visual studio. It hangs when i use the "execute package" option. New packages are running correctly but the packages which i've already built are not executing anymore...Any ideas to get things on track again?

Gr,
Hennie

View 2 Replies View Related

SSIS Package Hangs On Validation In Visual Studio

Jan 19, 2007

When I push my SSIS packages up to my production server (which has a different data source than my developement environment) and I try to open the package on the production server, it takes forever for to validate all the steps of the SSIS package because it's trying to validate against a datasource that isnt there, so it just waits for each element it's validating to time out. This is exceptionally annoying.

Is there a way to turn off this validation 'feature'?

View 14 Replies View Related

Microsoft Visual Studio Error, Keeps Closing My Package

Apr 3, 2008

I'm in a SSIS Package Design tab working on a data flow. It was working fine up to now, but all of a sudden I keep getting this error that says, "Microsoft Visual Studio has encountered a problem and needs to close." And it has that "Send Error Report" and "Don't Send" button at the bottom. This started happening when I tried to add a Data Viewer on a Data Flow Path. And now every time I do this to try to debug my data flow, it gives me this message and closes my project.

However, the package executes without any package errors, but I as I described above, I can't add a Data Viewer because it keeps giving me this message and closing my package.

View 6 Replies View Related

Error Building SSIS Package In Visual Studio

Mar 5, 2008

What does this mean? I am building a package with a datareader task, derived column task, data conversion task, ans several ole db destinations.




Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSCustomProperty90'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{5A78E6D8-6AE0-4D2B-81C1-4B990840B717}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

View 1 Replies View Related

Edit Import-generated Package Without Visual Studio?

Apr 20, 2007

I created a package via the import wizard in SQL Server Management Studio. When I test-ran the package I realised it needed to be modified. How do I do this without using either Visual Studio, SSIS Designer or an XML editor, none of which is installed where the package was created? Ideally I want to hear that there's a way of redisplaying the package in the import wizard.

View 1 Replies View Related

Script Task Working In Visual Studio But Not When The Package Is Run By A Job?

Aug 5, 2006

I have a script that changes the name of a file after a data upload. The script works fine if I execute the package in Visual Studio but when I run the file package from a SQL server job it does not rename the file. The data does get uploaded it just does not run the final script.

Any help would be appreciated.

Steve

View 1 Replies View Related

Package Taking 100% Of The CPU When It Is Opened For Editing In Visual Studio

Jun 26, 2007

I have a package that I was able to edit a week before. But now it is consuming all CPU memory (100%) and not letting me to edit the package (When I try to edit that it says Visual Studio Is busy even after an hour waiting).

Even though I have not changed anything, the package is behaving like this.

I would appreciate any reply on this?

Thanks in advance

View 6 Replies View Related

Visual Studio Cannot Open Encrypted Package After SP1 Applied.

May 16, 2006

I have recently applied SQL Server 2005 SP1 to a dev machine, and my workstation, where it rpesumably updated Visual Studio. Since then I cannot open an SSIS package that contains some encrypted data, due to storing a database password. I get various error messages, and Visual Studio reports that it cannot load the package - I never get prompted for the password. My colleague who has not applied SP1 yet has no problem. Has anyone else encountered this problem, and if so do they have a solution ?

Errors below:

Error 1 Error loading 'Dim_Staff.dtsx' : The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails. . A:DevelopmentVisual Studio 2005Production_DeploymentSSIS_PackagesSales_DimensionsDim_Staff.dtsx 1 1


Error 2 Error loading Dim_Staff.dtsx: Failed to decrypt an encrypted XML node because the password was not specified or not correct. Package load will attempt to continue without the encrypted information. C:Dim_Staff.dtsx 1 1


Error 3 Error loading Dim_Staff.dtsx: Error loading value "<DTS:VariableValue xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:DataType="7">12:00:00 a.m.</DTS:VariableValue>" from node "DTS:VariableValue". C:Dim_Staff.dtsx 1 1


Error 4 Error loading Dim_Staff.dtsx: Error loading value "<DTS:Variable xmlns:DTS="www.microsoft.com/SqlServer/Dts"><DTS:Property DTS:Name="Expression"></DTS:Property><DTS:Property DTS:Name="EvaluateAsExpression">0</DTS:Property><DTS:Property DTS:Name="Namespace">User</DTS:Property><DTS:Property DTS:Name="ReadOnl" from node "DTS:Variable". C:Dim_Staff.dtsx 1 1


Error 5 Error loading 'Dim_Staff.dtsx' : The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails. . C:Dim_Staff.dtsx 1 1


View 4 Replies View Related

How To Execute SSIS Package Inside Of Visual Studio?

Jan 13, 2006

How to execute SSIS package inside of Visual Studio?

I have opened the file, but  do not see any way to execute it. Please advise. Thanks

View 6 Replies View Related

Client Failover Takes 1 To 3 Minutes After Database Has Failed Over

May 12, 2008



We are having problems getting the ADO.NET client to failover in a timely manner in a web application. Here's what happens:

1) Database fails over in 3 to 5 seconds
2) Clients attempt to login to primary and receive SQL server not available errors
3) The clients slowly start to connect and succeed without errorson the secondary.
4) We are still see SQL Server login errors on the primary, even after the failover
5) When we failback to the primary, it all happens within a few seconds (no problems)

If we recycle IIS, this problem goes away

Here's what we have tried
1) Turning off connection pooling (has no effect). We also can see the connections get killed on the primary server
2) Applying this hotfix (http://support.microsoft.com/kb/944099)

And yes, we are running a script to sync up the SIDS so that doesn't appear to be a problem. What seems to be happening is the primary server is getting stuck in the ADO.NET application memory. The problem is we don't know how to fix it.

BTW, our hardware is SQL Server 2005, Windows Server 2003, .NET 2.0 (and .NET 3.5)

Let me know if you need additional information. Thanks in advance

View 2 Replies View Related

SQL 2000 , Windows 2003 Service Takes 15 Minutes To Start

May 21, 2008




After differential restore I start Remedy service. It starts in few seconds.

After full restore the same service takes 15 minutes to start. Bothe the things are done through SQL service agent. Even manual restaring the service also takes 15 minutes after full restore. WHy is it happening this way?

View 5 Replies View Related

Visual Studio Output Information In Debug Mode While Running A SSIS Package

Aug 16, 2006

Hello

When running a package in VS you can see something like this in the output window:

SSIS package "logging.dtsx" starting.
Information: 0x40043006 at Data Flow Task, DTS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, DTS.Pipeline: Pre-Execute phase is beginning.
Information: 0x402090DC at Data Flow Task, Flat File Source [1]: The processing of file "C: est ssis loggingad_data1.txt" has started.
Information: 0x4004300C at Data Flow Task, DTS.Pipeline: Execute phase is beginning.
Warning: 0x8020200F at Data Flow Task, Flat File Source [1]: There is a partial row at the end of the file.
Information: 0x402090DE at Data Flow Task, Flat File Source [1]: The total number of data rows processed for file "C: est ssis loggingad_data1.txt" is 477.
Information: 0x402090DF at Data Flow Task, OLE DB Destination [1011]: The final commit for the data insertion has started.
Information: 0x402090E0 at Data Flow Task, OLE DB Destination [1011]: The final commit for the data insertion has ended.
Information: 0x40043008 at Data Flow Task, DTS.Pipeline: Post Execute phase is beginning.
Information: 0x402090DD at Data Flow Task, Flat File Source [1]: The processing of file "C: est ssis loggingad_data1.txt" has ended.
Information: 0x40043009 at Data Flow Task, DTS.Pipeline: Cleanup phase is beginning.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "DataReaderDest" (87)" wrote 0 rows.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "OLE DB Destination" (1011)" wrote 1 rows.
SSIS package "logging.dtsx" finished: Success.

This is exactly when I need when a package is running but I want to be able to see it without using Visual Studio.
I would do it in Reporting Services but I need to find out to get the information. The SSIS logging feature in a package does not provide that kind of info.

Did someone try this already?

Thanks!

Mop

View 6 Replies View Related

Can Visual Studio 2005 BI Co-exist With Visual Studio 2003?

Jan 19, 2006

I ask because I'm still looking for the source of interface problems I have in using the SSIS designer.

View 4 Replies View Related

Integration Services :: SSIS Package Hangs On Validation Of Single Task In Visual Studio

Jun 16, 2015

I've built an SSIS package in SSDT 2014. The package was running successfully

When I close and open the package it hangs on validation of single task out of all.

OLEDB DESTINATION Task

I have tried several times to close the SSDT and open but facing same issue.

These seems like bugs in SSIS/SSDT. What would cause the relocation of some script code to hang the validation process like this?

View 2 Replies View Related

Integration Services :: How To Make SSIS Prompt For Connection Values When Running A DFT Or Package From Visual Studio

Jul 15, 2015

Our project is on SSIS 2012 and we are using the project deployment model. We have parameter the connection managers, created environments, environment variables and configured the references. Hence, when we deploy the solution to higher environments, the connection strings are picked from the environments and not the ones stored in the connection manager.

However, we face issues when in development environment, we need to run the same package but by entering the values manually in the connection manager. Even though the connection details are correct, when we execute the package from Visual Studio, SSIS is not able to connect to the database. Is there any way to have SSIS prompt for the connection details after we have click on "Execute Task" or "Start" from Visual Studio? 

View 6 Replies View Related

Package Fails When I Use ODBC Connection (Fails On SQL Server Agent, OK In Visual Studio)

Jun 11, 2007

I did a small package with only one ODBC connection (Merant 3.70 32-Bit Progess). This package runs well in Visual Studio and fails when runs by SQL Server Agent.

Configuration:

SQL Server Agent on a 32Bit server.

The ODBC connection configuration in available on System DSN on this server.

The user of Server Agent have full access (Admin).

Connect Manager Provider: ".Net ProvidersOdbc Data Provider"

SQL Server version: 9.0.3042



Error Message:

Executed as user: TEKCON cadmin. ...ion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 16:50:33 Error: 2007-06-11 16:50:33.62 Code: 0xC0047062 Source: Data Flow Task DataReader Source [1] Description: System.Data.Odbc.OdbcException: ERROR [HYC00] [MERANT][ODBC PROGRESS driver]Optional feature not implemented. ERROR [HY000] [MERANT][ODBC PROGRESS driver]msgOpen: unable to open message file: PROMSGS ERROR [IM006] [MERANT][ODBC PROGRESS driver]Driver's SQLSetConnectAttr failed. ERROR [HYC00] [MERANT][ODBC PROGRESS driver]Optional feature not implemented. ERROR [HY000] [MERANT][ODBC PROGRESS driver]msgOpen: unable to open message file: PROMSGS ERROR [IM006] [MERANT][ODBC PROGRESS driver]Driver's SQLSetConnectAttr failed. at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcCon... The package execution fa... The step failed.


I created a .bat file with this instruction and It's run well:

dtexec /f "C:Program FilesMicrosoft SQL Server90DTSPackagesIntegration Services Project estcom.dtsx"
pause

Why it's not running with SQL Server Agent???

View 7 Replies View Related

Visual Studio 2005 Bootstrap Package For SQL Server 2005 Express Edition With Advanced Services SP2

Feb 15, 2008

Hi there,

Anyone know how I can replace (or download) the sqlexpr32.exe bootstrap package with the advanced services SP2 edition of SQL 2005 express ?

Pieter

View 9 Replies View Related

SQl Server Backup Takes 2 Hours To Run But 12 Minutes After A Server Reboot(?)

Sep 19, 2007

Sorry i think i may have posted this in the incorrect forum before - if i have done it again here can someone tell me where i should post this please, thanks:

Hi,
we are having problems with a server Intel RZeon 3ghz, 3gb ram running 2003 service pack 2 with a 70gb drive and and 400 gb drive all with adequate free space. There are 6 hard disks in total and i assume operating at least RAID 5. We have SQL2000 server with a few standard sized databases and a connection to one other server.

A few months ago the back up of SQL server databases started taking 4- 5 hours when before it took 20 minutes. We had actually lost one of our disks in the RAID array and it before this was spotted by our engineers we reindexed the sql databases and defragged both 70gbC: and D: 400gb drives hoping to correct this slow down. Unfortunately the new disk had not been correctly seated and this was why it was taking 4-5 hours. After fixing the disk the backups took 12 minutes again but then started taking 2-3 hours after a few days.

The reindex/defrag did seem to improve the speed of the backups to 12 minutes (from 20 minutes) when the backup did function correctly (also the sql databases' performance improved). However the backups only take 12 minutes after a server reboot - this can last from only 2, up to 5 backups(days) in a row before a slow down to 2-3 hours and again only a reboot will sort out this problem.

NB this intermittent slowdown only occurred after the disk failure.

We have tried monitoring SQL server and can find no CPU/RAM intensive clashes or long running jobs interferring with the back up. Does anyone know what might be going on here? and if there are any server monitoring tools that may help us discover what is causing this problem ?

thanks for your help
best regards
kevin

View 11 Replies View Related

Several Different Errors When Creating And Running SSIS Package. Package Runs Successfuly Sometimes.

May 2, 2008

Hi All,



I am in the process of moving from a 32-bit SQL Server 2005 Enterprise (9.0.3054) to a 64-bit SQL Server 2005 Enterprise (9.0.3054 with 4 CPUs and 8GB of memory on Win 2003 SP2) and the process has been very frustrating to say the least. I am having a problem with packages that I created on my 64-bit SQL Server. I am importing a few tables from the 32-SQL Server into the 64-bit SQL Server using the Task --> Import to create the package.



Sometimes when I am creating a package I get the following error in a message box:



SQL Server Import and Export Wizard

The SSIS Runtime object could not be created. Verify that DTS.dll is available and registered. The wizard cannot continue and it will terminate.

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (System.Windows.Forms)





Other times when I run a package that has run successfully before I get the following error:



Faulting application dtexecui.exe, version 9.0.3042.0, stamp 45cd726d, faulting module unknown, version 0.0.0.0, stamp 00000000, debug? 0, fault address 0x025d23f0.





Other times I get this error message:



.NET Runtime version 2.0.50727.1433 - Fatal Execution Engine Error (79FFEE24) (80131506)





And still other times



The package appears to hang when running. By this I mean that the Package Execution Progress shows progress up to a point then it just stops. (The package takes about 17 seconds to run normally) CPU usage is at 1% and the package cannot be stopped.





I have deleted and re-created the package several times and I have also re-installed the service pack on the SQL Server (9.0.3054) but that did not help.





Does anyone have any other suggestions to try?





Thanks.



View 4 Replies View Related

Visual Studio Database File And SQL Server Management Studio Express Question

Mar 17, 2007

I have a database in my "App_Data" folder of my visual studio project.  I can view it fine in Visual Studio's built-in tools for managing a database attached to a solution.  However i recently started playing around with the SQL Server Management Studio Express program.  When i attach my database to Management Studio, and try to run my program it crashes.  I think it might be a permissions error?!? When i detatch it and reattach it in visual studio it runs fine again.   Any suggestions? ThanksJason 

View 1 Replies View Related







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