June 14, 2006 at 8:19 am
Hi
I have created Maintenances plan in the sql server 2000
All the jobs are running but my optimization job failed
I have set up all the options
SET QUOTED_IDENTIFIER on
SET ARITHABORT ON
SET ARITHIGNORE ON
but still is failing
Can someone help me out
Many thanks in advance
PK
June 14, 2006 at 8:24 am
Are you getting any specific error?
June 14, 2006 at 8:48 am
Hi shahab,
Thank you for quick response
No I am not getting any error message but big red X is showing front of Optimization job Failed .
Thank.
PK
June 14, 2006 at 9:04 am
Right click on the job and check the job history for any error.
June 14, 2006 at 9:21 am
Shahab,
I checked job history and following error is showing
The job faield: the job was invoked user sa the last step to run was step 1(step1)
PK
June 14, 2006 at 9:43 am
try running it under the same user as sqlserveragent.
June 14, 2006 at 10:23 am
Actually I did try that too. Instead of sa the same user as sqlserveragent.
June 14, 2006 at 10:28 am
unfortunately this doesnt give me enough info to troubleshoot the issue.
June 15, 2006 at 2:34 am
Hi, open Query Analyser and try this and see how you get on. Rgds Derek
DECLARE @InstallPath NVARCHAR(128),
@DatabaseName NVARCHAR(128),
@parms NVARCHAR(256),
@Report NVARCHAR(128),
@returncode INT,
@cmd NVARCHAR(4000)
SET @DatabaseName = 'YourDataBase'
SET @Report = 'Where you want to put the output'
SELECT @parms =
'-D ' + @DatabaseName + ' ' +
'-Rpt ' + @Report + ' ' +
'-DelTxtRpt 4WEEKS ' +
'-WriteHistory ' +
'-RebldIdx 100 '
EXECUTE @ReturnCode = master.dbo.xp_sqlmaint @parms
IF @ReturnCode <> 0
BEGIN
PRINT 'Received @ReturnCode = ' +
CONVERT(char(10),@ReturnCode) +
'attempting to execute xp_sqlmaint'
PRINT '@parms = ' + @parms
END
GO
June 15, 2006 at 1:07 pm
To get the history from the job step, click the box "Show step details". This hopefully will give you little better info.
Mark
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply