Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem with SQL 2005 ActiveX job Expand / Collapse
Author
Message
Posted Tuesday, May 20, 2014 4:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 7:33 AM
Points: 1, Visits: 99
Hi,

This is my first ever post, so you can guess I’m desperate!

I have a job that executes an ActiveX piece of VBScript. The VBScript opens a SQL Connection to the instance running the job, and gathers data about drive/LUN capacity and inserts the result in a table. All works fine on 20 or so instances I have. They are a mixture of SQL Server 2005 and 2008.

I have one particular SQL Server 2005 instance where the job starts but does nothing - it starts and just sits there. It doesn't fail - nothing.

This is the bit of the code that makes the connection:


Const DB_CONNECT_STRING = "Provider=SQLOLEDB;Data Source=MyInstance;Initial Catalog=MyDB;Integrated Security=SSPI"
Set myConn = CreateObject("ADODB.Connection")
Set myCommand = CreateObject("ADODB.Command")
myConn.Open DB_CONNECT_STRING
Set myCommand.ActiveConnection = myConn



I have tried putting the VBScript in a file on the C: drive, and called cscript from an Operating System CmdExec job - and it works. So, SQL Server Agent permissions are not the issue here. The SQL Server Agent account is in the Administrators Group.

However, I'd like to keep the code within the ActiveX job - self contained.

I suspect the problem lies within the ActiveX RTE in SQL Server 2005.

Any help would be gratefully appreciated.


Thanks, James.

Post #1572566
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse