Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2016-08-09
6
Medium Priority
?
55 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 52

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 52

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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 52

Accepted Solution

by:
Vitor Montalvão earned 2000 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

618 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