SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


My Backup Jobs Aren't Working - Permission Issue?


My Backup Jobs Aren't Working - Permission Issue?

Author
Message
Seggerman-675349
Seggerman-675349
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2879 Visits: 608
I set up a pair of Job Agents to backup the database for a web application weekly and daily
the SQL works - but the job(s) don't - do I need to explicitly grant permission - and to who?

not the Administrator account - that's what a person logs in as

thanks

newbie DBA - and not by choice
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)SSC Guru (220K reputation)

Group: General Forum Members
Points: 220814 Visits: 25098
Seggerman-675349 - Wednesday, March 7, 2018 8:54 AM
I set up a pair of Job Agents to backup the database for a web application weekly and daily
the SQL works - but the job(s) don't - do I need to explicitly grant permission - and to who?

not the Administrator account - that's what a person logs in as

thanks

newbie DBA - and not by choice

Please post the full text of the error message you receive.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Seggerman-675349
Seggerman-675349
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2879 Visits: 608
I don't get any error message (unless I don't know where to look) - I just see every morning that no backup has run
VastSQL
VastSQL
SSC-Dedicated
SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)

Group: General Forum Members
Points: 33019 Visits: 5920
Seggerman-675349 - Wednesday, March 7, 2018 8:54 AM
I set up a pair of Job Agents to backup the database for a web application weekly and daily
the SQL works - but the job(s) don't - do I need to explicitly grant permission - and to who?

not the Administrator account - that's what a person logs in as

thanks

newbie DBA - and not by choice

How you setup the jobs?
SSIS Package? Maintenance Plans? TSQL Code?

Seggerman-675349
Seggerman-675349
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2879 Visits: 608
log on to the server using an account Machine Name \Administrator
open Management Studio
go to Job Agents at the bottom
Add New Job
add Step with T-SQL to do backup (which if pasted into Query Window works)
Add Schedule
I added an alert to notify my client when it completes (I had to add his email elsewhere)
HanShi
HanShi
SSC-Dedicated
SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)

Group: General Forum Members
Points: 30296 Visits: 4236
Seggerman-675349 - Thursday, March 8, 2018 5:37 AM
log on to the server using an account Machine Name \Administrator
open Management Studio
go to Job Agents at the bottom
Add New Job
add Step with T-SQL to do backup (which if pasted into Query Window works)
Add Schedule
I added an alert to notify my client when it completes (I had to add his email elsewhere)

What message is shown of the job step in the job history? (expand the job in Job History to get the jobstep output)
You can additionally add some PRINT statements to the T-SQL code in the jobstep. That way you can extra check if the code has run, becuase this print output will also be visible in the job history.


** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Seggerman-675349
Seggerman-675349
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2879 Visits: 608
the job history shows - nothing
the T-SQL runs fine in a Query window
the job is Enabled - but doesn't run
Sue_H
Sue_H
SSC Guru
SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)

Group: General Forum Members
Points: 77280 Visits: 15517
Seggerman-675349 - Thursday, March 8, 2018 9:09 AM
the job history shows - nothing
the T-SQL runs fine in a Query window
the job is Enabled - but doesn't run

Some other things t check -
Check the SQL Agent log to see if there is any related warnings or errors.
Check the SQL Agent log to see if the Agent service was running when the job was suppose to run.
Try manually executing the job - not the t-sql itself but the job.
Make sure the schedule is also enabled and set correctly - look at the dates, make sure there is no end date, make sure it's not set to run once or in the past.
Look at the job activity monitor (in the jobs folder in SSMS) and see if the next run date and time is listed.

Sue



Seggerman-675349
Seggerman-675349
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2879 Visits: 608
the job history says there are not scheduled - but the Schedules within each job says they are

the server is fairly new - and it looked like the JobAgent wasn't running
I' left clicked and said Start
maybe that will do the trick

thanks to the wise ones - I am the DBA out of necessity
HanShi
HanShi
SSC-Dedicated
SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)

Group: General Forum Members
Points: 30296 Visits: 4236
Seggerman-675349 - Thursday, March 8, 2018 9:09 AM
the job history shows - nothing
the T-SQL runs fine in a Query window
the job is Enabled - but doesn't run

Did you also check if the attached schedule is enabled? When the job is enabled, but don't display a "next run" in the Job Activity monitor, most of the times the schedule isn't enabled. This will happen if the end-date of the schedule has been passed or if the schedule was set to a one-time occurrence.
Open the properties of the job and navigate to the attached schedules window. Check the box "enabled" in the Job schedule properties.

And of course: if the SQL Agent service is not started, no SQL jobs will be executed (as you mention in your last post).


** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search