Solved

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

Posted on 2016-08-09
6
49 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 48

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 48

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 is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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 48

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

840 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