June 15, 2009 at 2:45 am
Hi All
I created the maintaince plan and the error is
Execute Maintenance Plan
- Execute maintenance plan. New Maintaince Plan (Error)
Messages
Execution failed. See the maintenance plan and SQL Server Agent job history logs for details.
------------------------------
ADDITIONAL INFORMATION:
Job 'New Maintaince Plan.Subplan_1' failed. (SqlManagerUI)
Regarrds
sat
June 15, 2009 at 3:58 am
There must be a job created for the backup maintenance plan. Check for the job history for that job. Also click on the (+) sign before the job name which will show details of the exact job step where it failed. Let us know the exact error description from there.
June 15, 2009 at 6:03 am
yep
this is in the job history
ERROR: the job failed the job was invoked by user sa. the last step to run was step1(subplan_1).
When i click on the (+) sign it is showing the error as
ERROR:Unable to start the execution of step 1[REASON:line(1):syntax error] the step failed.
June 15, 2009 at 6:10 am
Open the backup maintainance plan, Click on the button View T-SQL, and fire the statements one by one... U shud be able to locate exact syntax error.
You can also post the T-SQL here.
June 15, 2009 at 7:20 am
HI
This is the T-sql
EXECUTE master.dbo.xp_create_subdir N'C:\Documents and Settings\swdev.team\Desktop\bak\ITAM'
GO
BACKUP DATABASE [ITAM] FILEGROUP = N'PRIMARY' TO DISK = N'C:\Documents and Settings\swdev.team\Desktop\bak\ITAM\ITAM_backup_2009_06_15_184702_5511435.bak' WITH NOFORMAT, NOINIT, NAME = N'ITAM_backup_2009_06_15_184702_5511435', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'ITAM' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'ITAM' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''ITAM'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N'C:\Documents and Settings\swdev.team\Desktop\bak\ITAM\ITAM_backup_2009_06_15_184702_5511435.bak' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
June 15, 2009 at 7:34 am
I ran the code after making changes and it ran perfectly without any error!!
---===============================
EXECUTE master.dbo.xp_create_subdir N'c:\test\test'
GO
BACKUP DATABASE test TO DISK = N'c:\test\test\test_backup_2009_06_15_184702_5511435.bak' WITH NOFORMAT, NOINIT, NAME = N'ITAM_backup_2009_06_15_184702_5511435', SKIP, REWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'test' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'test' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''test'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N'c:\test\test\test_backup_2009_06_15_184702_5511435.bak' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
--================================
Did you try to run each sql statement one by one?
June 15, 2009 at 7:43 am
Hi there,
Try not to use the desktop to store the backup because the SQL service account may not have access to it. Instead, replace C:\Documents and Settings\swdev.team\Desktop\bak\ITAM with something like C:\temp and try again. BTW, verify that C:\temp exists and grant the SQL Agent service account R/W permission to it.
cheers,
Alejandro
Alejandro Pelc
June 15, 2009 at 9:15 am
Hi All
Finally i got it.
But i got it in sql -2005,
If i run the same procedure , i am getting the same errors.
Is there any difference in the procees, if there is , plz let me no , actually i want to do in sqlserver -2008
Once again thanls to all , but still i am waiting for some thing....
Regards
sat
June 15, 2009 at 9:20 am
Hi there,
did you try to perform the backup outside the desktop folder ?
cheers
Alejandro Pelc
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply