简体   繁体   English

Vbscript在cmd提示符下工作正常,但在任务计划程序中不工作

[英]Vbscript is working fine in cmd prompt but not working in task scheduler

I have a vbscript to get the records from Oracle database and need to get those records hourly basis. 我有一个vbscript从Oracle数据库获取记录,并且需要每小时获取这些记录。 When I ran the script from cmd , script is executing fine and getting records through email but when I schedule the same script from task scheduler , showing that task completed fine but records are not getting. 当我从cmd运行脚本时,脚本可以正常执行并通过电子邮件获取记录,但是当我从Task Scheduler计划相同的脚本时,表明任务已完成但记录没有得到。 Do we need any permission to access the Oracle database from task scheduler I have logged in the server with admin user. 我们是否需要任何权限才能从我以admin用户登录服务器的任务计划程序访问Oracle数据库。

Is there another way to schedule this script hourly basis. 还有另一种按小时调度此脚本的方法。 Thanks in advance Thanks Chandrakiran 在此先感谢感谢Chandrakiran

Without some code I cannot help you much, I suspect this is an authentication issue however. 没有一些代码,我将无济于事,但是我怀疑这是身份验证问题。

Note that the Task Scheduler does not take into account the currently logged in user when running, the script needs to authenticate itself with the database or set the "Run As" user in Task Scheduler if needed. 请注意,任务计划程序在运行时不会考虑当前登录的用户,脚本需要使用数据库对自身进行身份验证,或者在需要时在任务计划程序中设置“运行方式”用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM