473,322 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Problem with a scheduled job

I have a stored procedure that runs as a step in a scheduled job. For
some reason the job does not seem to finish when ran from the job but
does fine when run from a window in SQL Query.

I know the job is not working because the number of rows that are
inserted into the table (see code) is considerably less than the manual
runnning of it.

I have included the code for the stored procedure, the output from the
job, and the output from the manual run.

I know somebody will probably ask WHY I am using a cursor. We have no
control over the possibility of having a PK conflict since the data
comes from outside sources. If I do it as just a INSERT INTO..SELECT
than nothing goes in when I have a violation. As a business rule we
would rather have MOST of the data inserted into the historical tables
with a log of the ones that did not make it. We can then go back and
deal with the ones that did not go in.

Of course, if there is a better way I would love to hear it...

Number Rows
-----------
10456 vNormalizedClearingPosition_Sage
10407 ClearingPosition
51 Will cause PK violation

SQL Command
-----------
EXEC spExportToClearingPosition 'Sage'

Code
----

CREATE PROCEDURE spExportToClearingPosition (
@clearingFirm VARCHAR(10),
@reportDate DATETIME = NULL
)
AS
SET NOCOUNT ON

-- If report date is not specified use todays date.
SET @reportDate = COALESCE(@reportDate, CONVERT(VARCHAR(10), GetDate(),
101))

DECLARE
@err INT,
@errMsg VARCHAR(50),
@descMsg VARCHAR(150)

-- declare variables for holding values during cursor looping
DECLARE
@source VARCHAR(10),
@rawRowId INT,
@tradeDate DATETIME,
@symbol VARCHAR(15),
@identity VARCHAR(15),
@identitySource VARCHAR(10),
@exchange VARCHAR(5),
@account VARCHAR(10),
@name VARCHAR(75),
@securityType VARCHAR(15),
@position INT,
@closingPrice DECIMAL(18, 6),
@expiry DATETIME,
@optionStrikePrice DECIMAL(18, 6),
@optionSide VARCHAR(1),
@optionMultiplier INT,
@underlyingSymbol VARCHAR(15),
@underlyingIdentity VARCHAR(15),
@underlyingIdentitySource VARCHAR(10),
@underlyingName VARCHAR(75),
@underlyingClosingPrice DECIMAL(18, 6),
@underlyingDividendDate DATETIME,
@underlyingDividendPrice DECIMAL(18, 6)

-- ************************************************** ***********
-- Remove existing rows from historical table for specific
-- report date and just for specified clearing firm.
-- ************************************************** ***********

-- set source for deletion (will also check for valid clearing firm)
IF UPPER(@clearingFirm) = 'MERRILL'
SET @source = 'Merrill'
ELSE
IF UPPER(@clearingFirm) = 'SAGE'
SET @source = 'Sage'
ELSE
IF UPPER(@clearingFirm) = 'PAX'
SET @source = 'Pax'
ELSE
BEGIN
-- invalid clearing firm
RAISERROR('Invalid clearing firm "%s" was passed in.', 16, 1,
@clearingFirm)
RETURN -100
END

DELETE FROM Historical.dbo.ClearingPosition
WHERE
[ReportDate] = @reportDate
AND [Source] = @source

-- ************************************************** ***********
-- Populate cursor based on clearing firm.
-- ************************************************** ***********
IF UPPER(@clearingFirm) = 'MERRILL'
DECLARE cPosition CURSOR FAST_FORWARD
FOR SELECT
[ReportDate], [Source], [RawRowId],

[TradeDate], [Symbol], [Identity], [IdentitySource], [Exchange],
[Account], [Name], [SecurityType], [Position], [ClosingPrice],
[Expiry], [OptionStrikePrice], [OptionSide], [OptionMultiplier],
[UnderlyingSymbol], [UnderlyingIdentity], [UnderlyingIdentitySource],
[UnderlyingName], [UnderlyingClosingPrice], [UnderlyingDividendDate],
[UnderlyingDividendPrice]
FROM
vNormalizedClearingPosition_Merrill
WHERE
[ReportDate] = @reportDate
ELSE
IF UPPER(@clearingFirm) = 'SAGE'
DECLARE cPosition CURSOR FAST_FORWARD
FOR SELECT
[ReportDate], [Source], [RawRowId],

[TradeDate], [Symbol], [Identity], [IdentitySource], [Exchange],
[Account], [Name], [SecurityType], [Position], [ClosingPrice],
[Expiry], [OptionStrikePrice], [OptionSide], [OptionMultiplier],
[UnderlyingSymbol], [UnderlyingIdentity], [UnderlyingIdentitySource],
[UnderlyingName], [UnderlyingClosingPrice], [UnderlyingDividendDate],
[UnderlyingDividendPrice]
FROM
vNormalizedClearingPosition_Sage
WHERE
[ReportDate] = @reportDate
ELSE
IF UPPER(@clearingFirm) = 'PAX'
DECLARE cPosition CURSOR FAST_FORWARD
FOR SELECT
[ReportDate], [Source], [RawRowId],

[TradeDate], [Symbol], [Identity], [IdentitySource], [Exchange],
[Account], [Name], [SecurityType], [Position], [ClosingPrice],
[Expiry], [OptionStrikePrice], [OptionSide], [OptionMultiplier],
[UnderlyingSymbol], [UnderlyingIdentity], [UnderlyingIdentitySource],
[UnderlyingName], [UnderlyingClosingPrice], [UnderlyingDividendDate],
[UnderlyingDividendPrice]
FROM
vNormalizedClearingPosition_Pax
WHERE
[ReportDate] = @reportDate

-- ************************************************** ***********
-- Process cusor and insert into historical table
-- ************************************************** ***********

-- open cursor and fetch first row
OPEN cPosition
FETCH cPosition INTO @reportDate, @source, @rawRowId,
@tradeDate, @symbol, @identity, @identitySource, @exchange,
@account, @name, @securityType, @position, @closingPrice,
@expiry, @optionStrikePrice, @optionSide, @optionMultiplier,
@underlyingSymbol, @underlyingIdentity, @underlyingIdentitySource,
@underlyingName, @underlyingClosingPrice, @underlyingDividendDate,
@underlyingDividendPrice

-- loop until no more rows
WHILE @@Fetch_Status = 0
BEGIN
-- insert row into normalized table
INSERT INTO Historical.dbo.ClearingPosition ( [ReportDate],
[Source], [RawRowId],
[TradeDate], [Symbol], [Identity], [IdentitySource], [Exchange],
[Account], [Name], [SecurityType], [Position], [ClosingPrice],
[Expiry], [OptionStrikePrice], [OptionSide], [OptionMultiplier],
[UnderlyingSymbol], [UnderlyingIdentity],
[UnderlyingIdentitySource], [UnderlyingName], [UnderlyingClosingPrice],
[UnderlyingDividendDate], [UnderlyingDividendPrice]
)
VALUES ( @reportDate, @source, @rawRowId,
@tradeDate, @symbol, @identity, @identitySource, @exchange,
@account, @name, @securityType, @position, @closingPrice,
@expiry, @optionStrikePrice, @optionSide, @optionMultiplier,
@underlyingSymbol, @underlyingIdentity, @underlyingIdentitySource,
@underlyingName, @underlyingClosingPrice, @underlyingDividendDate,
@underlyingDividendPrice
)

-- check for error message
SET @err = @@Error
IF @err <> 0
BEGIN
-- create error message
IF @err = 2627
SET @errMsg = '2627 - PRIMARY KEY violation.'
ELSE
SET @errMsg = 'Unexpected error : ' + LTRIM(RTRIM(STR(@err)))

-- build description message
SET @descMsg = 'Source: ' + COALESCE(@source, 'NULL') + ', Symbol: '
+ COALESCE(@symbol, 'NULL') + ', Identity: ' + COALESCE(@identity,
'NULL') + ', Account: ' + COALESCE(@account, 'NULL') + ', Position: ' +
COALESCE(LTRIM(RTRIM(STR(@position))), 'NULL')

IF @securityType = 'Future' OR @securityType = 'Option' OR
@securityType = 'Future Option'
SET @descMsg = @descMsg + ', Expiry: ' +
COALESCE(CONVERT(VARCHAR(10), @expiry, 101), 'NULL')

IF @securityType = 'Future' OR @securityType = 'Option' OR
@securityType = 'Future Option'
SET @descMsg = @descMsg + ', Strike: ' +
COALESCE(LTRIM(RTRIM(STR(@optionStrikePrice))), 'NULL') + ', OptionSide:
' + COALESCE(@optionSide, 'NULL')

-- log error in exception table
INSERT INTO ExportException ([ReportDate], [ErrorMessage],
[RowDescription], [TableName], [RawRowId])
VALUES (@reportDate, @errMsg, @descMsg, 'Clearing.dbo.' +
@clearingFirm + 'Position', @rawRowId)
END

-- get next row
FETCH cPosition INTO @reportDate, @source, @rawRowId,
@tradeDate, @symbol, @identity, @identitySource, @exchange,
@account, @name, @securityType, @position, @closingPrice,
@expiry, @optionStrikePrice, @optionSide, @optionMultiplier,
@underlyingSymbol, @underlyingIdentity, @underlyingIdentitySource,
@underlyingName, @underlyingClosingPrice, @underlyingDividendDate,
@underlyingDividendPrice
END

-- clean up
CLOSE cPosition
DEALLOCATE cPosition

-- return everything good
RETURN 0

Job Output
----------

Job 'Morning Batch Raw Export' : Step 3, 'Export Sage Positions' : Began
Executing 2003-10-24 09:09:30

Msg 2627, Sev 14: Violation of PRIMARY KEY constraint
'PK_ClearingPosition'. Cannot insert duplicate key in object
'ClearingPosition'. [SQLSTATE 23000]
Msg 3621, Sev 14: The statement has been terminated. [SQLSTATE 01000]
Msg 0, Sev 0: Associated statement is not prepared [SQLSTATE HY007]
Msg 2627, Sev 14: Violation of PRIMARY KEY constraint
'PK_ClearingPosition'. Cannot insert duplicate key in object
'ClearingPosition'. [SQLSTATE 23000]
Msg 3621, Sev 14: The statement has been terminated. [SQLSTATE 01000]

Manual Output
-------------

Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.

and so on...
(about 50+ PRIMARY KEY violations)
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
3 4334
Apparently my post was too long. Posting code and error messages again.

Code
------
CREATE PROCEDURE spExportToClearingPosition (
@clearingFirm VARCHAR(10),
@reportDate DATETIME = NULL
)
AS
SET NOCOUNT ON

-- If report date is not specified use todays date.
SET @reportDate = COALESCE(@reportDate, CONVERT(VARCHAR(10), GetDate(),
101))

DECLARE
@err INT,
@errMsg VARCHAR(50),
@descMsg VARCHAR(150)

-- declare variables for holding values during cursor looping
DECLARE
@source VARCHAR(10),
@rawRowId INT,
@tradeDate DATETIME,
@symbol VARCHAR(15),
@identity VARCHAR(15),
@identitySource VARCHAR(10),
@exchange VARCHAR(5),
@account VARCHAR(10),
@name VARCHAR(75),
@securityType VARCHAR(15),
@position INT,
@closingPrice DECIMAL(18, 6),
@expiry DATETIME,
@optionStrikePrice DECIMAL(18, 6),
@optionSide VARCHAR(1),
@optionMultiplier INT,
@underlyingSymbol VARCHAR(15),
@underlyingIdentity VARCHAR(15),
@underlyingIdentitySource VARCHAR(10),
@underlyingName VARCHAR(75),
@underlyingClosingPrice DECIMAL(18, 6),
@underlyingDividendDate DATETIME,
@underlyingDividendPrice DECIMAL(18, 6)

-- ************************************************** ***********
-- Remove existing rows from historical table for specific
-- report date and just for specified clearing firm.
-- ************************************************** ***********

-- set source for deletion (will also check for valid clearing firm)
IF UPPER(@clearingFirm) = 'MERRILL'
SET @source = 'Merrill'
ELSE
IF UPPER(@clearingFirm) = 'SAGE'
SET @source = 'Sage'
ELSE
IF UPPER(@clearingFirm) = 'PAX'
SET @source = 'Pax'
ELSE
BEGIN
-- invalid clearing firm
RAISERROR('Invalid clearing firm "%s" was passed in.', 16, 1,
@clearingFirm)
RETURN -100
END

DELETE FROM Historical.dbo.ClearingPosition
WHERE
[ReportDate] = @reportDate
AND [Source] = @source

-- ************************************************** ***********
-- Populate cursor based on clearing firm.
-- ************************************************** ***********
-- do Merrill SELECT (similiar to Sage except for view name)

IF UPPER(@clearingFirm) = 'SAGE'
DECLARE cPosition CURSOR FAST_FORWARD
FOR SELECT
[ReportDate], [Source], [RawRowId],

[TradeDate], [Symbol], [Identity], [IdentitySource], [Exchange],
[Account], [Name], [SecurityType], [Position], [ClosingPrice],
[Expiry], [OptionStrikePrice], [OptionSide], [OptionMultiplier],
[UnderlyingSymbol], [UnderlyingIdentity], [UnderlyingIdentitySource],
[UnderlyingName], [UnderlyingClosingPrice], [UnderlyingDividendDate],
[UnderlyingDividendPrice]
FROM
vNormalizedClearingPosition_Sage
WHERE
[ReportDate] = @reportDate
ELSE

-- do Pax SELECT (similiar to Sage except for view name)

-- ************************************************** ***********
-- Process cusor and insert into historical table
-- ************************************************** ***********

-- open cursor and fetch first row
OPEN cPosition
FETCH cPosition INTO @reportDate, @source, @rawRowId,
@tradeDate, @symbol, @identity, @identitySource, @exchange,
@account, @name, @securityType, @position, @closingPrice,
@expiry, @optionStrikePrice, @optionSide, @optionMultiplier,
@underlyingSymbol, @underlyingIdentity, @underlyingIdentitySource,
@underlyingName, @underlyingClosingPrice, @underlyingDividendDate,
@underlyingDividendPrice

-- loop until no more rows
WHILE @@Fetch_Status = 0
BEGIN
-- insert row into normalized table
INSERT INTO Historical.dbo.ClearingPosition ( [ReportDate],
[Source], [RawRowId],
[TradeDate], [Symbol], [Identity], [IdentitySource], [Exchange],
[Account], [Name], [SecurityType], [Position], [ClosingPrice],
[Expiry], [OptionStrikePrice], [OptionSide], [OptionMultiplier],
[UnderlyingSymbol], [UnderlyingIdentity],
[UnderlyingIdentitySource], [UnderlyingName], [UnderlyingClosingPrice],
[UnderlyingDividendDate], [UnderlyingDividendPrice]
)
VALUES ( @reportDate, @source, @rawRowId,
@tradeDate, @symbol, @identity, @identitySource, @exchange,
@account, @name, @securityType, @position, @closingPrice,
@expiry, @optionStrikePrice, @optionSide, @optionMultiplier,
@underlyingSymbol, @underlyingIdentity, @underlyingIdentitySource,
@underlyingName, @underlyingClosingPrice, @underlyingDividendDate,
@underlyingDividendPrice
)

-- check for error message
SET @err = @@Error
IF @err <> 0
BEGIN
-- create error message
IF @err = 2627
SET @errMsg = '2627 - PRIMARY KEY violation.'
ELSE
SET @errMsg = 'Unexpected error : ' + LTRIM(RTRIM(STR(@err)))

-- build description message
SET @descMsg = 'Source: ' + COALESCE(@source, 'NULL') + ', Symbol: '
+ COALESCE(@symbol, 'NULL') + ', Identity: ' + COALESCE(@identity,
'NULL') + ', Account: ' + COALESCE(@account, 'NULL') + ', Position: ' +
COALESCE(LTRIM(RTRIM(STR(@position))), 'NULL')

IF @securityType = 'Future' OR @securityType = 'Option' OR
@securityType = 'Future Option'
SET @descMsg = @descMsg + ', Expiry: ' +
COALESCE(CONVERT(VARCHAR(10), @expiry, 101), 'NULL')

IF @securityType = 'Future' OR @securityType = 'Option' OR
@securityType = 'Future Option'
SET @descMsg = @descMsg + ', Strike: ' +
COALESCE(LTRIM(RTRIM(STR(@optionStrikePrice))), 'NULL') + ', OptionSide:
' + COALESCE(@optionSide, 'NULL')

-- log error in exception table
INSERT INTO ExportException ([ReportDate], [ErrorMessage],
[RowDescription], [TableName], [RawRowId])
VALUES (@reportDate, @errMsg, @descMsg, 'Clearing.dbo.' +
@clearingFirm + 'Position', @rawRowId)
END

-- get next row
FETCH cPosition INTO @reportDate, @source, @rawRowId,
@tradeDate, @symbol, @identity, @identitySource, @exchange,
@account, @name, @securityType, @position, @closingPrice,
@expiry, @optionStrikePrice, @optionSide, @optionMultiplier,
@underlyingSymbol, @underlyingIdentity, @underlyingIdentitySource,
@underlyingName, @underlyingClosingPrice, @underlyingDividendDate,
@underlyingDividendPrice
END

-- clean up
CLOSE cPosition
DEALLOCATE cPosition

-- return everything good
RETURN 0

Job Error Output
----------------
Job 'Morning Batch Raw Export' : Step 3, 'Export Sage Positions' : Began
Executing 2003-10-24 09:09:30

Msg 2627, Sev 14: Violation of PRIMARY KEY constraint
'PK_ClearingPosition'. Cannot insert duplicate key in object
'ClearingPosition'. [SQLSTATE 23000]
Msg 3621, Sev 14: The statement has been terminated. [SQLSTATE 01000]
Msg 0, Sev 0: Associated statement is not prepared [SQLSTATE HY007]
Msg 2627, Sev 14: Violation of PRIMARY KEY constraint
'PK_ClearingPosition'. Cannot insert duplicate key in object
'ClearingPosition'. [SQLSTATE 23000]
Msg 3621, Sev 14: The statement has been terminated. [SQLSTATE 01000]

Manual Error Output
-------------------
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.
Server: Msg 2627, Level 14, State 1, Procedure
spExportToClearingPosition, Line 127
Violation of PRIMARY KEY constraint 'PK_ClearingPosition'. Cannot insert
duplicate key in object 'ClearingPosition'.
The statement has been terminated.

(and so on for 51 times...)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #2
Jason Callas (ja*******@hotmail.com) writes:
I have a stored procedure that runs as a step in a scheduled job. For
some reason the job does not seem to finish when ran from the job but
does fine when run from a window in SQL Query.

I know the job is not working because the number of rows that are
inserted into the table (see code) is considerably less than the manual
runnning of it.

I have included the code for the stored procedure, the output from the
job, and the output from the manual run.

I know somebody will probably ask WHY I am using a cursor. We have no
control over the possibility of having a PK conflict since the data
comes from outside sources. If I do it as just a INSERT INTO..SELECT
than nothing goes in when I have a violation. As a business rule we
would rather have MOST of the data inserted into the historical tables
with a log of the ones that did not make it. We can then go back and
deal with the ones that did not go in.


So write it as:

INSERT tbl (keycol, ....)
SELECT keycol, ....
FROM src
WHERE NOT EXISTS (SELECT *
FROM tbl
WHERE tbl.keycol = src.keycol)

A SELECT ... WHERE EXISTS before that can be good to list the duplicates
if you like.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3
Erland Sommarskog <so****@algonet.se> wrote in message news:<Xn*********************@127.0.0.1>...

So write it as:

INSERT tbl (keycol, ....)
SELECT keycol, ....
FROM src
WHERE NOT EXISTS (SELECT *
FROM tbl
WHERE tbl.keycol = src.keycol)

A SELECT ... WHERE EXISTS before that can be good to list the duplicates
if you like.


I thought about that but I have several problems with it.

1) First and foremost is that I need to log any row that does not get
inserted into historical table. That way I can go and manually deal
with those rows (find out what the conflict was, fix it, and then
insert them).

I guess I could do a COUNT(*) with a HAVING > 1 statement but that
would catch any conflicts from the current normalized view. I would
have do it twice - once to compare the view to the historical table
and once to compare it to itself. Then log any results I get.

2) That would only deal with FK violations but it not with any other
issues. As an example would be a column in the normalized view that is
null but should not be. I do my best to clean up the data in the
normalized view but I cannot control the data that is given to me. For
the historical table I did identify and mark those columns that cannot
have nulls.

3) This solution does not really deal with my underlying problem. Is
it a common (or maybe uncommon but something I need to watch out for)
issue that a particular stored procedure could not work (or at least
different results) in a scheduled job (SQLs scheduler) compare to
within a SQL Query window?
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bart Simpson | last post by:
Hi, I want to control 'Scheduled Tasks' in Windows 2003 by python program. But I couldn't find any Python module about win32 'Scheduled Tasks'. I could find only Perl module about it. (see...
4
by: Colin Steadman | last post by:
We have a number of scheduled tasks on our IIS server that run daily at some point during the early morning. These tasks run as a specific user that has the correct permissions to perform whatever...
6
by: John Bowman | last post by:
Hi, I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found in the control panel "Scheduled Tasks" applet. I realize that this "applet" really just opens the tasks folder,...
6
by: David | last post by:
Hi all, In my code I have a bottleneck which consists of a cpu-intensive loop of size LENGTH. What I did was to divide that loop into two threads, Thread1 doing the 0 to LENGTH/2 part, and...
1
by: satelite | last post by:
Hello, I am writing an exe that is intended to be run via a scheduled task. However, I also need the flexibility to have users run the scheduled task manually (right click task and select run). ...
8
by: Dan Pavel | last post by:
Hi, I did not used Mutex before and I need now. I have an application that control some workflows on different machines. I use SNMP for that. The problem is that the thread used for starting an...
1
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
4
by: pokerboy801 | last post by:
OK, I will try to explain this as clearly and as concise as possible. I am using Access, which has three MS Excel Linked tables, to store call center metrics for reps. My Excel workbook has three...
0
by: Paulson | last post by:
Dear Freinds I want to make a program that acts as a reminder for the users.I need to open up the Scheduled task wizard programmatically.If you type Tasks in the run command the Tasks...
3
by: kite54surfer | last post by:
Hi all, I apologize if not posting correctly, my first time. I am having problem with the field "Scheduled" (7901-D'Acunha-A-5) getting: " Syntax error (missing operator) in query expression...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.