开发者

Why can't I create a simple SQL Agent Job or find correct syntax?

开发者 https://www.devze.com 2023-04-03 07:44 出处:网络
This works perfectly in a SSMS 2008 query window: use [HSS Maintenance] exec HSS_Guest.[olap storedprocedure]

This works perfectly in a SSMS 2008 query window:

use [HSS Maintenance]

exec HSS_Guest.[olap storedprocedure]
exec HSS_Guest.[MAKE OLAP_CUBE]

But when I build an Agent Job and then test by using "Start Job at Step..." it always fails.

I have tried Operating System (CmdExec) "Type" as well as T-SQL and even SSAS I believe.

Am I having a Syntax issue or not using the correct "Type"?

开发者_如何学JAVAUsing full rights on an Enterprise edition & Server 2008.

I have Googled this to death and do not believe that I can't just build this simply via the GUI.

Please show me how dumb I am!

Note - I have tried to generate the Script from the Job window and get an error that "There is no Action to be Scripted"


Edit the SQL Server Agent job that contains the step that has the SQL code you posted. Remove the "use [HSS Maintenance]" line and instead use the drop down menu on the step to choose this database.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号