我正在开发一个项目..我需要运行一个PubMedDisambiguation_GetPubs.job。作业失败,因为作业脚本包含路径
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTEXEC.EXE
但是当我检查我的SQL服务器文件夹时,没有名为DTS的文件夹,BINN可用,并且DTEXEC.EXE也不可用。
首先运行作业我必须在SSIS中包含一个PubMedDisambiguation_GetPubs.dtsx文件,我已经添加了该文件,之后我运行以下给定的查询来创建作业(PubMedDisambiguation_GetPubs)..作业已成功创建,但是当我跑步时它给了我错误:
The process could not be created for step 1 of job 0x2803DE2628DAC647946CFAD44DCFF854
(reason: The system cannot find the file specified). The step failed.
任何人都可以帮助我。这是该工作的代码:
USE [msdb]
GO
/****** Object: Job [PubMedDisambiguation_GetPubs] Script Date: 07/21/2016 13:19:18 ******/
BEGIN TRANSACTION
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
/****** Object: JobCategory [[Uncategorized (Local)]]] Script Date: 07/21/2016 13:19:18 ******/
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'[Uncategorized (Local)]' AND category_class=1)
BEGIN
EXEC @ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'[Uncategorized (Local)]'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
END
DECLARE @jobId BINARY(16)
EXEC @ReturnCode = msdb.dbo.sp_add_job @job_name=N'PubMedDisambiguation_GetPubs',
@enabled=1,
@notify_level_eventlog=0,
@notify_level_email=0,
@notify_level_netsend=0,
@notify_level_page=0,
@delete_level=0,
@description=N'No description available.',
@category_name=N'[Uncategorized (Local)]',
@owner_login_name=N'App_Profiles10', @job_id = @jobId OUTPUT
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
/****** Object: Step [PubMedDisambiguation_GetPubs.dtsx] Script Date: 07/21/2016 13:19:18 ******/
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'PubMedDisambiguation_GetPubs.dtsx',
@step_id=1,
@cmdexec_success_code=0,
@on_success_action=1,
@on_success_step_id=0,
@on_fail_action=2,
@on_fail_step_id=0,
@retry_attempts=0,
@retry_interval=0,
@os_run_priority=0, @subsystem=N'CmdExec',
@command=N'C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTEXEC.EXE /SQL "\PubMedDisambiguation_GetPubs" /SERVER MSKAN\SQL2008 /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[ServerName].Value";MSKAN\SQL2008 /SET "\Package.Variables[DatabaseName].Value";ProfilesRNS /REPORTING E',
@flags=0
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId, @start_step_id = 1
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N'(local)'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
GO
答案 0 :(得分:1)
在大多数生产服务器上,服务和软件的安装位于与操作系统不同的驱动器上。
所以而不是
Program Files\Microsoft SQL Server\100\DTS\Binn\DTEXEC.EXE
在d:/或e:/
上查看软件您是否有不同版本的SQL Server,这意味着您需要查找路径110或120