Solved

Want to run T-SQL Job with as specific but I can't select the user

Posted on 2016-08-09
6
50 Views
Last Modified: 2016-08-11
Heyas,

As the above title: Want to run T-SQL Job with as specific but I can't select the user.

Attached is a screenshot of what I mean.

I have created SQL user SQL_RG_MP_User and given the sysadmin permission but they don't appear on the list.

Any assistance is appreciated.

Thank you.
Capture.PNG
0
Comment
Question by:Zack
[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
  • 3
  • 3
6 Comments
 
LVL 49

Expert Comment

by:Vitor Montalvão
ID: 41748377
It's because you didn't give the Login explicit access to the database. You can use dbo instead.
0
 

Author Comment

by:Zack
ID: 41751377
Hi Vitor,

When I try to give the user explicit access EXEC sp_grantdbaccess 'SQL_RG_MP_User';  

I get the following error:

'SQL_RG_MP_User' is not a valid login or you do not have permission.

How do I resolve this?

Thank you.
0
 
LVL 49

Expert Comment

by:Vitor Montalvão
ID: 41751591
Like I said, you need the Login name and not the User name.
Check in the Security section for the Logins. Which one is mapped to the user database 'SQL_RG_MP_User'?
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

Author Comment

by:Zack
ID: 41751599
Hi Vitor,

Please see the attached pics. As far as I can tell SQL_RG_MP_User is the login name.

Unless I am misunderstanding something.

Than you.
Login-Name-Highlighted.PNG
Login-Name-2.PNG
0
 
LVL 49

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 41752424
The terminology and the picture you used in your main question really refers to database user.
Now these last pictures shows the Login but only with access to master and msdb databases. Which database is set for the job step?

Btw, why are you mapping credentials for a Resource Governor?
0
 

Author Closing Comment

by:Zack
ID: 41753296
Thank for the assistance again vitor. The resourcegoverner proxy was just something I was playing around with previously.
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

726 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