We help IT Professionals succeed at work.
Get Started

SQL Server Job permissions query

conorbrophy
conorbrophy asked
on
1,287 Views
Last Modified: 2012-08-14

I have a issue. The SQL Agent job to backup a transaction log fails with the error:

Job outcome:
"The job failed.  The Job was invoked by User USERGROUP\sqlservice.  The last step to run was step 1 (Backup)."

Backup task:
"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?

Thanks,

  Conor
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 14 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE