Solved

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

Posted on 2016-08-09
6
41 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
  • 3
  • 3
6 Comments
 
LVL 45

Expert Comment

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

Author Comment

by:Zack
Comment Utility
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 45

Expert Comment

by:Vitor Montalvão
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Zack
Comment Utility
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 45

Accepted Solution

by:
Vitor Montalvão earned 500 total points
Comment Utility
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
Comment Utility
Thank for the assistance again vitor. The resourcegoverner proxy was just something I was playing around with previously.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Synchronize a new Active Directory domain with an existing Office 365 tenant
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now