Advertisement

02.12.2008 at 08:08AM PST, ID: 23156517
[x]
Attachment Details

Using ActiveX Script in Job Step to pause job

Asked by EXTRHMAN in MS SQL Server

Tags: microsoft, sql server, 2000

I have never used ActiveX scripts in a job step before so I am a little green here.  I am trying to update a table that has over 27 million records in it.  Some how trailing spaces got into some of our product numbers and our applications are not showing everything when someone searches for a specific product.  To solve this I am running an update SQL statement similar to this:

 Update tbl_Products set ProductCode = rtrim(ltrim(ProductCode)) where EnteredDate > '12/31/2006' and EnteredDate < '7/1/2007'

Because of the size of data I decided to update just six months at a time, so that the server wouldn't get locked down during the update.  Also I am actually trimming all varchar fields in this table just to make sure.  The server is utilized 24/7 so I don't have any down time that I could run this.

I created a Job consisting of a step for the first and last six month period of every year down until 1980.  Because I want other requests to the server to still function.  I created a simple ActiveX Script to pause for 30 seconds as a step between each update.  I simply us this command:

wscript.sleep 30000

Which works great in a .vbs file.  But errors out when the Job tries to execute it, with this error:

Executed as user: WS05\SYSTEM. Error Code: 0  Error Source= Microsoft VBScript runtime error  Error Description: Object required: 'wscript'    Error on Line 0.  The step failed.

Any suggestions on any of this would be appreciated.

Thanks
MikeStart Free Trial
 
Loading Advertisement...
 
[+][-]02.12.2008 at 11:45AM PST, ID: 20878027

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.12.2008 at 11:56AM PST, ID: 20878174

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.12.2008 at 12:04PM PST, ID: 20878259

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.12.2008 at 12:41PM PST, ID: 20878712

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.12.2008 at 06:12PM PST, ID: 20881116

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.12.2008 at 06:16PM PST, ID: 20881133

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: microsoft, sql server, 2000
Sign Up Now!
Solution Provided By: acperkins
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.05.2008 at 02:27PM PST, ID: 21055307

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.09.2008 at 07:34AM PDT, ID: 21315324

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628