I have a issue. The SQL Agent job to backup a transaction log fails with the error:
"The job failed. The Job was invoked by User USERGROUP\sqlservice. The last step to run was step 1 (Backup)."
"Executed as user: NT AUTHORITY\SYSTEM. sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed."
The backup task log output is as follows:
"Logged on to SQL Server 'XYZ' as 'TESTGROUP\srsqlservice' (trusted)
Login '' is not the DBO of database 'TestDB' so cannot run SQLMAINT.EXE."
The SQL Agent service is running as Local System Acccount.
The SQL Server database service is running as 'TESTGROUP\srsqlservice'.
All jobs and databases are owned by SA. When I add the 'TESTGROUP\srsqlservice' user to the database TestDB with db_owner privs, the backup jobs works fine. I just can't understand why the SQl agent job is trying to log onto the database as TESTGROUP\srsqlservice when the SQL Agent is running as the Local System Account?