Is it possible to run open and run a .vbs file from a SQL server? I need to run a script every morning and my personal laptop is not always turned on or connected to the network. I would like to kick this script off each morning from a SQL server. Is this possible? Thank you!
Asked
Active
Viewed 1,758 times
1
-
Could you use Task Scheduler instead? – Andy May 08 '17 at 21:07
1 Answers
1
First; is not recommended to run external apps from your SQL Server for security reasons.
Second, as suggested by @andy; use the Task scheduler instead!
After all that been considered, if you insist; use solution How to run a program from SQL? combined with
CScript "C:\MyScript.vbs"
OR
WScript "C:\MyScript.vbs"

Ricardo C
- 2,205
- 20
- 24
-
I can't use task scheduler unless I can somehow run it off of the SQL server. My machine isn't on 24/7 and I need it to run in the middle of the night. If it is a major security concern then maybe I should investigate something else. – Chuck0185 May 09 '17 at 22:36
-
@Chuck0185 I think you are missing the point when we suggest to use the Task Scheduler. We didnt suggest you would use Task Scheduler on your desktop, we mean you would use Task Scheduler on the server itself: It runs on its own process, with its own windows account you specify, and thus; completely isolated from database server engine/process. RDP to your server ;) – Ricardo C May 11 '17 at 19:30