?
Solved

SQL Server permissions issue

Posted on 2014-11-03
11
Medium Priority
?
286 Views
Last Modified: 2014-11-17
I have a server running SQL Server 2008 R2 that runs a monthly job to import data into an existing database.
The backup to be imported is located on another share.
When the job runs, it fails with the following error:
Executing the query "RESTORE DATABASE [DB_00] FROM  DISK = N'\\SERVER..." failed with the following error: "Cannot open backup device '\\SERVER\DB_00.bak'. Operating system error 1326(Logon failure: unknown user name or bad password.).  RESTORE DATABASE is terminating abnormally."

For troubleshooting purposes, I set the SQL agent to run as domain administrator and it shows in the log:
Executed as user: DOMAIN\Administrator

I copied the path from the error message and pasted it into a window and the directory opens fine.

Does anyone see what I'm missing here?
0
Comment
Question by:scarpenter104
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 40420549
Does the login running the job have sysadmin authority?

Do you have a proxy account set up for jobs?
0
 
LVL 51

Expert Comment

by:Vitor Montalvão
ID: 40421038
Which user is running the job? That user must have read permissions on the share.
0
 
LVL 1

Author Comment

by:scarpenter104
ID: 40421355
Since it says
Executed as user: DOMAIN\Administrator
I assume that is who is running the job.

ScottPletcher, It also says that it can't open the backup device, so I'm assuming the share permission to be the  issue, not database permissions, or is this just a confusing error message?
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 51

Expert Comment

by:Vitor Montalvão
ID: 40421361
The DOMAIN\Administrator has read permission on the share?
0
 
LVL 1

Author Comment

by:scarpenter104
ID: 40421372
Of course. And in my test I opened the path as Administrator. I also added read permission for Everyone to the share.
0
 
LVL 51

Expert Comment

by:Vitor Montalvão
ID: 40421386
I'm sorry for the questions but just wanted to confirm that you checked everything.
The SQL Server service account's also a domain user?
0
 
LVL 1

Author Comment

by:scarpenter104
ID: 40421406
I don't believe so.
0
 
LVL 51

Accepted Solution

by:
Vitor Montalvão earned 2000 total points
ID: 40421409
Ok. Maybe that's the issue. When accessing a network share it uses the SQL Server service account and not the SQL Agent account.
0
 
LVL 1

Author Comment

by:scarpenter104
ID: 40421413
When I can get access to it today I'll test that theory.
0
 
LVL 51

Expert Comment

by:Vitor Montalvão
ID: 40421415
You need to set a new account to the SQL Server service. Maybe you can use the SQL Agent account for testing (DOMAIN\Administrator). Don't forget you need to restart SQL Server after changing the service account.
0
 
LVL 1

Author Closing Comment

by:scarpenter104
ID: 40447286
I changed the SQL services to a domain account and that resolved the issue. Leave it to Microsoft to tell me in their log that the job was being executed by a domain account when in truth it was not.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question