EXECUTE myPro_1 ;
DECLARE myPro_1 PROCEDURE FOR msdb.dbo.sp_add_job
@job_name = "test1",
@enabled = 1,
@description = '没有可用的描述。',
@start_step_id = 1,
@category_name = '[Uncategorized (Local)]',
@category_id = NULL,
@owner_login_name = 'sa',
@notify_level_eventlog = 2,
@notify_level_email = 0,
@notify_level_netsend = 0,
@notify_level_page = 0,
@notify_email_operator_name = NULL,
@notify_netsend_operator_name = NULL,
@notify_page_operator_name = NULL,
@delete_level = 0,
@job_id = :ls_jobid output ,
@originating_server = NULL;
EXECUTE myPro_1 ;
调用sql存储过程添加作业的代码 执行结果 sqlcode = -1,sqlerrtext 为空 ,有什么问题
------解决方案--------------------
DECLARE myPro_1 PROCEDURE FOR 。。。
前不写 execute myPro_1 ;
另外,用事件探查器看看提交给数据库的是什么东西。。。
------解决方案--------------------
1、你的过程怎么写的?
2、对应各个参数的数据类型是否正确?