dbTalk Databases Forums  

VBScript Runtime Error

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss VBScript Runtime Error in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tim Harris
 
Posts: n/a

Default VBScript Runtime Error - 11-05-2003 , 02:32 PM






I have a DTS package that has been running for months now without a problem. One of the steps checks to see if it can get a lock on a cube so the package can loop until another DTS package can finish processing a different cube in the larger virtual cube. All of a sudden I get a Microsoft VBScript Runtime Error - Permission denied: 'CreateObject'. I can log on to the server as the user the SQL Agent Job executes as which runs the DTS Package and put essentially the same code in a VBA module and it works. Can anyone suggest what could have changed on the server that I should be looking for?



'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()
Dim dsoServer
Dim dsoDB
Dim dsoCube
Dim nLockType

nLockType = 4

DTSGlobalVariables("bCubeProcessing").Value = False ' = 0
Set dsoServer = CreateObject("DSO.Server")
dsoServer.Connect (DTSGlobalVariables("sDSOServer").Value)
Set dsoDB = dsoServer.MDStores(DTSGlobalVariables("sDSOCatalog ").Value)
Set dsoCube = dsoDB.MDStores(DTSGlobalVariables("sDSOCube").Valu e)

On Error Resume Next
dsoCube.LockObject nLockType , "Test to see if we can process the Cube"
If Err.Number <> 0 then
If Err.Number = -2147221468 Then
DTSGlobalVariables("bCubeProcessing").Value = True ' = -1
Main = DTSTaskExecResult_Success
Else
DTSGlobalVariables("bCubeProcessing").Value = True ' = -1
Main = DTSTaskExecResult_Failure
End If
Else
dsoCube.UnLockObject
DTSGlobalVariables("bCubeProcessing").Value = False ' = 0
Main = DTSTaskExecResult_Success
End If

Set dsoServer = Nothing
Set dsoDB = Nothing
Set dsoCube = Nothing

End Function

Reply With Quote
  #2  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default RE: VBScript Runtime Error - 11-06-2003 , 02:39 AM






Hi Tim,

Thanks for your post. As I understand, a Data Transformation Services (DTS)
package containing a Microsoft Visual Basic Script task worked fine before
on your siede, but it failed suddenly. The same code worked in a VBA
module. The error message is Permission denied: 'CreateObject'. If I have
misunderstood, please feel free to let me know.

Based on my research, it seems that the Visual Basic ActiveX Script is
normal. I would like you to check and see the following article, it should
help you a lot.

298725 PRB: Scheduled DTS Package Fails With "Permission Denied:
CreateObject"
http://support.microsoft.com/?id=298725

Please feel free to post in the group if this solves your problem or if you
would like further assistance.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
  #3  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default RE: VBScript Runtime Error - 11-06-2003 , 09:20 PM



Hi Tim,

How is this issue going on your side? Does the information in my previous
post solve your problem? If not, I would like you to provide more
information so that I can narrow down this issue. When did the package
fail, scheduled or manually execute?
Also, I would like you to try to test the VBScript as a .vbs file, can
CreateObject call succeed?

Thanks for using MSDN newsgroup.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
  #4  
Old   
Tim Harris
 
Posts: n/a

Default Re: VBScript Runtime Error - 11-07-2003 , 02:17 PM



Yes the information you provided was exactly what we needed.

"Michael Shao [MSFT]" <v-yshao (AT) online (DOT) microsoft.com> wrote

Quote:
Hi Tim,

How is this issue going on your side? Does the information in my previous
post solve your problem? If not, I would like you to provide more
information so that I can narrow down this issue. When did the package
fail, scheduled or manually execute?
Also, I would like you to try to test the VBScript as a .vbs file, can
CreateObject call succeed?

Thanks for using MSDN newsgroup.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.