MY job is failing continously??

  • HI,

    Im using this script to run my database backup as job scheduling but it is faling from last 4 days plz tell me why is not working now.

    declare

    @vTimevarchar(20),

    @vDayvarchar(2),

    @vmonvarchar(2),

    @vYrsvarchar(4),

    @vHrsvarchar(2),

    @vMnsvarchar(2),

    @vSecvarchar(2),

    @vDevNamevarchar(255),

    @vFileNamevarchar(255)

    begin

    select @vDay=datepart(dd,getdate())

    select @vmon=datepart(mm,getdate())

    select @vYrs=datepart(yyyy,getdate())

    select @vHrs=datepart(hh,getdate())

    select @vMns=datepart(mi,getdate())

    select @vSec=datepart(ss,getdate())

    if len(@vDay)=1

    select @vDay = '0'+@vDay

    if len(@vMon)=1

    select @vmon = '0'+@vMon

    if len(@vHrs)=1

    select @vHrs = '0'+@vHrs

    if len(@vMns)=1

    select @vMns = '0'+@vMns

    if len(@vSec)=1

    select @vSec = '0'+@vSec

    select @vTime=@vYrs+@vMon+@vDay+@vHrs+@vMns+@vSec

    select @vDevName = 'adv_'+@vTime

    select@vFileName = 'Y:\SQL Backup\Database\'+@vDevName+'.BAK'

    execsp_addumpdevice 'disk',@vDevName,@vFileName

    BACKUP DATABASE adv TO @vDevName

    RESTORE VERIFYONLY FROM @vDevName

    execsp_dropdevice @vDevName

    END

    I got a error in event viewer

    Windows couldn't log the RSoP (Resultant Set of Policies) session status. An attempt to connect to WMI failed. No more RSoP logging will be done for this application of policy.

    Its a clustered server plz help me

    Thaxxx

    Regards

    Jagpal Singh

  • I'm confused by the error message. Is this SQL Server 7, SQL Server 2000, SQL Server 2005, or SQL Server 2008?

    😎

  • Its sql server 2000

    I found this error in my job history

    User does not have permission to perform this action. [SQLSTATE 42000] (Error 15247)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply