Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Can I execute a VBScript from SSIS?


Can I execute a VBScript from SSIS?

Author
Message
SQLWannabe
SQLWannabe
SSC-Enthusiastic
SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)

Group: General Forum Members
Points: 118 Visits: 571
It seems that the only thing I can run is either a C#.Net or VB.Net script. Is there any other way? I'm not allowed full blown access to SSIS so I have BIDS instead. I don't have SSRS so I have to deliver my emails (at the end of my SSIS package) thru a VBScript.
divyanth
divyanth
SSC Veteran
SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)

Group: General Forum Members
Points: 215 Visits: 556
You can use ActiveX script task in Control Flow to write your VB code.. But its not suggested as its being deprecated
SQLWannabe
SQLWannabe
SSC-Enthusiastic
SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)

Group: General Forum Members
Points: 118 Visits: 571
I've never done this before. I currently have a .vbs file I'd like to run at the end of a SSIS package. Do I just drag an ActiveX Script Task onto the IDE and point to it?

Here's what I've tried:
1. dragged an ActiveX Script Task onto the IDE
2. in the 'Script' line I used the Browse button to put my file into the 'Script' line. The actual code now appears on the 'Script' line.
3. I am getting a red X error on my ActiveX Script Task: 'Function not found.'

Am I missing something here?

Oh and btw, hopefully I will be getting the rights to Database Mail and SSRS and I won't have to do things like this in the near future.
divyanth
divyanth
SSC Veteran
SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)SSC Veteran (215 reputation)

Group: General Forum Members
Points: 215 Visits: 556
I am not much familiar with ActiveX script task. I did use it when migrating from DTS and had the same problem... so slowly changed the code to Vb.net .. It seems that SSIS does not support all the built in VB Functions.. I assume that you will schedule this as a job ... If so, try to execute an SP after this Package in the job to send a mail.. you will be able to find many code snippets to send an Email using SQL
PaVeRa22
PaVeRa22
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 184
use "Send Mail task" for sending mails or you can use ActiveX script task too

for correcting error in ActiveX script task, you have to enter the entrypoint property

refer attached image, pls
Attachments
script_entrymethod.jpg (223 views, 40.00 KB)
SQLWannabe
SQLWannabe
SSC-Enthusiastic
SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)SSC-Enthusiastic (118 reputation)

Group: General Forum Members
Points: 118 Visits: 571
We don't have the mail client hooked up to this server, that's why I'm having to use a VB Script.

PaVeRa22, your example worked perfectly. This is a whole new world. Until we get full blown SSIS, SSRS, and the mail client installed, this will do nicely. Thanks, again.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search