在 T-SQL 语句任务中执行 运行 过程时出错
Error when run EXEC procedure in T-SQL Statement Task
我使用维护计划的 Execute T-SQL Statement Task
框创建了一些我想要 运行 的程序,但是我收到错误消息,指出找不到工作。
维护任务的配置:
运行ning EXEC [dbo].[sp_backup_full] N'db_name', N'path/where//to/store/backup'
的返回错误:
End Progress Error: 2021-06-29 18:59:00.42 Code: 0xC002F210 Source: full_backup_and_delete_old_one Execute SQL Task
Description: Executing the query "EXEC [dbo].[sp_backup_full] N'db_name..." failed with the following error: "Could not find stored procedure 'dbo.sp_backup_full'.".
Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
如果不指定数据库名,默认为master
数据库中的运行。您可以为存储过程调用提供三部分名称,以确保它使用正确的数据库执行。
EXEC [DatabaseName].[dbo].[sp_backup_full]
我使用维护计划的 Execute T-SQL Statement Task
框创建了一些我想要 运行 的程序,但是我收到错误消息,指出找不到工作。
维护任务的配置:
运行ning EXEC [dbo].[sp_backup_full] N'db_name', N'path/where//to/store/backup'
的返回错误:
End Progress Error: 2021-06-29 18:59:00.42 Code: 0xC002F210 Source: full_backup_and_delete_old_one Execute SQL Task
Description: Executing the query "EXEC [dbo].[sp_backup_full] N'db_name..." failed with the following error: "Could not find stored procedure 'dbo.sp_backup_full'.".
Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
如果不指定数据库名,默认为master
数据库中的运行。您可以为存储过程调用提供三部分名称,以确保它使用正确的数据库执行。
EXEC [DatabaseName].[dbo].[sp_backup_full]