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")
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.