dbTalk Databases Forums  

DTS Step Fail

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS Step Fail in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PaulaPompey
 
Posts: n/a

Default DTS Step Fail - 06-20-2005 , 09:30 AM






I have a strange problem.
I have built a DTS which runs fine when each step is executed individually,
but when the DTS is run as a whole, the last step fails.
I have checked the workflow and nothing seems amiss there. Now I'm stumped
and don't know what else could be the problem.

The DTS has an SQL connection and steps as follows:
1. Execute SQL Task - runs T-SQL Update statement - runs fine
2. Execute SQL Task - runs T-SQL Insert statement - runs fine
3. Execute SQL Task - runs T-SQL Insert statement - runs fine
4. ActiveX Script Task - Sets Global variables - runs fine
5. Execute SQL Task - runs Stored Procedure with 2 input parameters from
global variables - runs fine if executing step on it's own, but when DTS run
as a whole, the step fails with error "Could not find stored procedure 'SP'.
Syntax error or access violation"

Step 5 is Execute SQL Task:
exec CheckSpace_DriveUpdate 'SERVER\DRIVE','45.5'

The second input parameter is supplied via DTS Global Variable which is
populated via ActiveX Script using File System Object to get free space from
a drive. The ActiveX works fine and global variable value is fine

SP code is as follows:
CREATE PROCEDURE CheckSpace_DriveUpdate @Source varchar(50),@SpaceFree
varchar(50) AS
SET @SpaceFree = REPLACE (@SpaceFree,',','')
INSERT INTO CheckSpace (Source,Type,SpaceFreeGb,RecInsertDate,Latest)
SELECT @Source As Source,
'DRIVE' As Type,
CAST(@SpaceFree As decimal(19,2)) As SpaceFreeGb,
GetDate() As RecInsertDate,
1 As Latest


I'd appreciate any suggestions.

Thanks in advance.

Paula


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Step Fail - 06-20-2005 , 01:44 PM






What is SP?

You could use a Datapump task to do this or even a straight TSQL statement

I would also look to qualify with the owner, the SP and the table into which
you are inserting.



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"PaulaPompey" <PaulaPompey (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a strange problem.
I have built a DTS which runs fine when each step is executed
individually,
but when the DTS is run as a whole, the last step fails.
I have checked the workflow and nothing seems amiss there. Now I'm
stumped
and don't know what else could be the problem.

The DTS has an SQL connection and steps as follows:
1. Execute SQL Task - runs T-SQL Update statement - runs fine
2. Execute SQL Task - runs T-SQL Insert statement - runs fine
3. Execute SQL Task - runs T-SQL Insert statement - runs fine
4. ActiveX Script Task - Sets Global variables - runs fine
5. Execute SQL Task - runs Stored Procedure with 2 input parameters from
global variables - runs fine if executing step on it's own, but when DTS
run
as a whole, the step fails with error "Could not find stored procedure
'SP'.
Syntax error or access violation"

Step 5 is Execute SQL Task:
exec CheckSpace_DriveUpdate 'SERVER\DRIVE','45.5'

The second input parameter is supplied via DTS Global Variable which is
populated via ActiveX Script using File System Object to get free space
from
a drive. The ActiveX works fine and global variable value is fine

SP code is as follows:
CREATE PROCEDURE CheckSpace_DriveUpdate @Source varchar(50),@SpaceFree
varchar(50) AS
SET @SpaceFree = REPLACE (@SpaceFree,',','')
INSERT INTO CheckSpace (Source,Type,SpaceFreeGb,RecInsertDate,Latest)
SELECT @Source As Source,
'DRIVE' As Type,
CAST(@SpaceFree As decimal(19,2)) As SpaceFreeGb,
GetDate() As RecInsertDate,
1 As Latest


I'd appreciate any suggestions.

Thanks in advance.

Paula




Reply With Quote
  #3  
Old   
PaulaPompey
 
Posts: n/a

Default Re: DTS Step Fail - 06-23-2005 , 04:10 AM



Thanks for the response Allan,

'SP' represents the name of the stored procedure - 'CheckSpace_DriveUpdate'

All tables & stored procedures etc have owner dbo

If I were to use a Datapump task or TSQL statment, how do I include the
global variable values? (Please see below SP for insert code) I could
hard code the value for @Source, but @SpaceFree is set using VBScript File
System Object to get the amount of space free on HD.

Thanks for you help so far

"Allan Mitchell" wrote:

Quote:
What is SP?

You could use a Datapump task to do this or even a straight TSQL statement

I would also look to qualify with the owner, the SP and the table into which
you are inserting.



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"PaulaPompey" <PaulaPompey (AT) discussions (DOT) microsoft.com> wrote in message
news:FD8E2BF6-FFC6-4C0F-BC2F-79D69BFEF21B (AT) microsoft (DOT) com...
I have a strange problem.
I have built a DTS which runs fine when each step is executed
individually,
but when the DTS is run as a whole, the last step fails.
I have checked the workflow and nothing seems amiss there. Now I'm
stumped
and don't know what else could be the problem.

The DTS has an SQL connection and steps as follows:
1. Execute SQL Task - runs T-SQL Update statement - runs fine
2. Execute SQL Task - runs T-SQL Insert statement - runs fine
3. Execute SQL Task - runs T-SQL Insert statement - runs fine
4. ActiveX Script Task - Sets Global variables - runs fine
5. Execute SQL Task - runs Stored Procedure with 2 input parameters from
global variables - runs fine if executing step on it's own, but when DTS
run
as a whole, the step fails with error "Could not find stored procedure
'SP'.
Syntax error or access violation"

Step 5 is Execute SQL Task:
exec CheckSpace_DriveUpdate 'SERVER\DRIVE','45.5'

The second input parameter is supplied via DTS Global Variable which is
populated via ActiveX Script using File System Object to get free space
from
a drive. The ActiveX works fine and global variable value is fine

SP code is as follows:
CREATE PROCEDURE CheckSpace_DriveUpdate @Source varchar(50),@SpaceFree
varchar(50) AS
SET @SpaceFree = REPLACE (@SpaceFree,',','')
INSERT INTO CheckSpace (Source,Type,SpaceFreeGb,RecInsertDate,Latest)
SELECT @Source As Source,
'DRIVE' As Type,
CAST(@SpaceFree As decimal(19,2)) As SpaceFreeGb,
GetDate() As RecInsertDate,
1 As Latest


I'd appreciate any suggestions.

Thanks in advance.

Paula





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.