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
Mike
Start Free Trial