如何在SQL中执行CMD? [英] how to execute a cmd in sql?
本文介绍了如何在SQL中执行CMD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是sys_exec,但找不到正确的执行方式,请任何人帮助我,这对我来说更好.我正在使用Oracle sql
I am using sys_exec but not able to find the right way to execute in right way, Please Anyone helps me that's better for me. I am using Oracle sql
以下是我的代码.
CREATE or REPLACE TRIGGER sms_trigger
AFTER INSERT ON student
FOR EACH ROW
ENABLE
DECLARE lclcmd CHAR(255);
res VARCHAR(255);
BEGIN
lclcmd := CONCAT('php C:/xampp/htdocs/sample/sms_send.php','something');
res := sys_exec(lclcmd);
END;
/
推荐答案
您可能只是在.php
文件和参数之间缺少空格.使用您的代码,调用命令行如下所示:
You may be simply missing a space between the .php
file and the parameter. With your code, the invocation command line would look like this;
php C:/xampp/htdocs/sample/sms_send.phpsomething
我怀疑您有一个具有该名称的文件.在.php
之后添加一个空格,看看会发生什么:
I doubt you have a file with that name. Add a space after .php
and see what happens:
lclcmd := CONCAT('php C:/xampp/htdocs/sample/sms_send.php ','something');
请发布您可能收到的错误消息.
Do post the error messages you may be receiving.
这篇关于如何在SQL中执行CMD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文