Questions tagged [impersonation]

Switching the current security context of a process to that of another account / login / user. This switch is a full replacement of permissions for the current process. This is usually achieved by using EXECUTE AS in SQL Server, RUNAS in Windows, su in Unix, etc.

Filter by
Sorted by
Tagged with
2
votes
0answers
60 views

Is it possible to run SQL Server as 'NT Service\MSSQLSERVER' and EXECUTE AS a domain account?

For clarity, I'm asking how to resolve this without running SQL Server as a domain account and without making sa the database owner. In a nutshell If I install SQL Server 2019 and go with the ...
0
votes
0answers
57 views

SQL Login can access Linked Server w/ impersonation, but Windows Login cannot

In SQL Server 2017 I have a Linked Server defined to use a fixed remote SQL Login for all local users. EXEC master.dbo.sp_addlinkedserver @server = 'RemoteServer', @srvproduct='SQL Server'; EXEC ...
0
votes
1answer
113 views

Grant User permission to view XE results via sys.fn_xe_file_target_read_file

I need to grant a user (MyDomain\JohnSmith) permission to view one particular XE session results using sys.fn_xe_file_target_read_file I thought the best way to do this would be to encapsulate the ...
2
votes
1answer
110 views

Allow two users permission to execute single agent job

I am trying to allow two users to run a single agent job. With this in mind, I don't want to add the users to the SQLAgentOperatorRole role in msdb as that will give them excess priveleges. I tried ...
4
votes
1answer
175 views

Execute Permissions for a Store Procedure that creates databases

I have a Stored Procedure that creates a Database for a specific project which needs to run every month by one of our Data Analysts. The question is how do I structure this to enable the Analyst to ...
4
votes
1answer
1k views

SQL Server impersonation

This question is about impersonation in Microsoft SQL Server. I want to know that if I have impersonation permissions on a specific login then I can easily impersonate that login whenever I want and I ...
3
votes
0answers
411 views

22046 “Impersonation error” running SQL Server Agent job

(New to SSIS. None of the similar questions mention this particular impersonation error.) I'm trying to run an SSIS package as an Agent job via a proxy, and I'm getting a non-helpful error message. ...
0
votes
2answers
65 views

MariaDB “EXECUTE AS” or User Impersonation

With MariaDB, is there a way to impersonate a user execution context when connected with a higher privileged account? For instance, when connected with a "MasterUser" execute a SELECT using the more ...
2
votes
1answer
2k views

How Do I Execute SSIS Catalog Packages As A Different User With TSQL?

We've been moving application packages from the older methods of storage and execution into the SSIS Catalog. We're required to use an enterprise scheduling system instead of the SQL Server Agent to ...
3
votes
0answers
539 views

Stored Procedure triggered by Service Broker can't access another database in SQLServer 2017

I make an extensive use of SQL Server Service Broker to trigger/parallelize data science tasks (data imports with SSIS or direct queries to another database on the same server, then data management ...
2
votes
1answer
316 views

Stored Procedure Execute as Owner Close Database Connections Not Working

I created a stored procedure to allow users to Close All Db connections in the QA environment. I am SA and created the procedure. When I modify the SP , run it Without 'Execute as Owner', I get ...
1
vote
0answers
425 views

Trying to view database properties and getting a cannot impersonate `guest` error

One of my DBAs is trying to look at the database properties of a database by right clicking and selecting properties and is getting the following error: Cannot show requested dialog. (SqlMgmt) An ...
2
votes
1answer
429 views

How I can impersonate a login with securityadmin server role

On MSSQL 2008R2 I have two instances on different servers, and I need sync up the password changes for all logins. I thing that i could create a store procedure where a user (impersonate) with ...
2
votes
1answer
540 views

Cross-Database Impersonation Fail for Service Account

I would like to enable an application that dumps a big ol' heap of data into a Staging area to be able to kickoff the stored procedure that transforms & loads the data into the Production area. If ...
1
vote
1answer
3k views

how to check if a procedure is running, and what permissions are required?

I have a process run by a domain account MY_LOGIN that needs to execute a procedure THE_PROCEDURE but only when another specific procedure, called PROCEDURE_TO_TEST is not running. All this is ...
1
vote
1answer
2k views

SQL Server Impersonation is just NOT working

I simply would like a very limited user, in its own database, to call an update procedure on our database to tell us that it has updated a table, which it has access to. I have allowed the user ...
4
votes
1answer
2k views

Impersonate user or login mapped to certificate

Assume that there is a certificate created in database create certificate certName with subject = 'subj'; GO And a user mapped to this certificate create user userName from certificate ...
5
votes
1answer
3k views

Stored procedure security with execute as, cross database queries, and module signing

I have a situation that, while I was able to work around it (as the repro will show), I don't understand. Here are the high points Two databases, ChainingSource and ChainDestination, both of which ...
5
votes
3answers
12k views

Use of IMPERSONATE permissions in SQL Server?

During some reading, got to know about the Impersonate permissions. From what I've read, it is more like creating a copy of the user with all the permission levels under a different name. I understand ...