Data Backup and Recovery

schedule backup fail wit sql agent job

sdstorage
5,776 Views

HI

all my job of backup fail....  [windows 2012 Alwayson sql server 2014]

 

 

in the event viewer i see

 

The operation executed with the following results. Details: An Unexpected Error occured while executing new-backup. Details: A command that prompts the user failed because the host program or the command type does not support user interaction. The host was attempting to request confirmation with the following message: Please check the results of the Input validation above. Do you still want to continue with the backup anyway Stack Trace: at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

 

 

if i run the command with powershell or command it works

i use a domain account for agent account

 

 

 

6 REPLIES 6

GidonMarcus
5,756 Views

When you run it in PS. is it asking you for anything?

what command you are running?

you can try adding something like '-force'or '-errorAction silently continue'

Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK

sdstorage
5,342 Views

hi

if i run with my user in powershell work like if i change the account of agent to my account

 

if i use the agent (domain user) not work 

if i use the agente domain user in group of administrator not work

 

the command is

 

SmsqlJobLauncher.exe new-backup  –svr 'MSSQL'  -ag 'MSSQAG' -prm  -ver -bp 1,99 –verInst 'mssql03' -mp –mpdir 'C:\SMSQLMnPt' -RetainBackups  2 -RetainShareBackups  7 -cpylgbkshare NOTHING_TOSHARE -lb -bksif -RetainSnapofSnapInfo 2 -rudays 1 –mgmt daily -db

 

the option force not work

 

 

 

seem problem of permission but why? the agent are administrator....

GidonMarcus
5,340 Views

Hi

 

Could be that UAC trying to kick-in or there another way the exe tries give an error to the screen, unfortunately i currently don't have the environment to test.

 

Do you realize this is not a powershell command right? (Just an exe with parameters). Is running it from CMD giving the same result?

 

G

Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK

sdstorage
5,333 Views

yes with cmd i receive the same result withe the agent user

Anthony_Log
4,884 Views

It is a SMSQL command that is run in SMSQL Powershell.

Anthony_Log
4,823 Views

I have identified the problem.

 

The Agent account on the source server is different from the destination server.  By adding both users to the local administrators group on each server the problem was resolved.

 

 

Public