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
0 votes
0 answers
90 views

SQL Server Linked Server Impersonate error

I'm trying to configure LinkedServer to use Impersonate. All Servers and PC are connected to the same Domain. What I've configured already: SQLServer1 - First/Middle server: Configured SPNs for ...
Mr.Kal's user avatar
  • 1
0 votes
0 answers
105 views

How to grant impersonate in SQL Server on AWS RDS - For Profiler Replay

I'm trying to use SQL Server Profiler to Replay a Trace. But when it tried to impersonate the users/logins, it gives this error: Failed to set proper user name ('application_login') for the ...
Iridescent's user avatar
0 votes
0 answers
137 views

Impersonate user not working?

The problem I am facing is detailed in this post - https://stackoverflow.com/questions/74316999/sql-server-workaround-for-execute-as-user But the gist of it is that due to stored procedure designs ...
Brian Karabinchak's user avatar
0 votes
1 answer
1k views

How to impersonate a USER (not LOGIN) in Sql Server?

I have a database which we want to create database USERS that are NOT mapped to server LOGINS. Then we want to have one server login, but it will EXECUTE AS USER = 'SomeUser' to run queries against ...
eidylon's user avatar
  • 243
0 votes
2 answers
169 views

Delegation: Bulk Insert failed when executed from SSRS dataset but success from SSMS

I've configured delegation for SQL server engine and SSRS and it works fine. SQL Server (2017) engine and SSRS installd on the same machine. Let's call it SqlSrv1. What we should attain to: User opens ...
TJS's user avatar
  • 1
2 votes
0 answers
1k 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 ...
jnm2's user avatar
  • 121
0 votes
1 answer
312 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 ...
SE1986's user avatar
  • 1,928
2 votes
1 answer
679 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 ...
SE1986's user avatar
  • 1,928
4 votes
1 answer
932 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 ...
JPVoogt's user avatar
  • 223
4 votes
1 answer
5k 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 ...
Zeshan Mujtaba's user avatar
4 votes
1 answer
2k 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. ...
that it guy's user avatar
1 vote
3 answers
418 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 ...
Jeff Reeves's user avatar
2 votes
1 answer
4k 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 ...
Mike Brule's user avatar
4 votes
1 answer
1k 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 ...
Vincent Chalmel's user avatar
2 votes
1 answer
498 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 ...
user avatar
1 vote
0 answers
686 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 ...
Kenneth Fisher's user avatar
2 votes
1 answer
717 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 ...
Diego Flores's user avatar
4 votes
1 answer
712 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 ...
Peter Vandivier's user avatar
1 vote
1 answer
8k 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 ...
Marcello Miorelli's user avatar
1 vote
1 answer
4k 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 ...
Axeman's user avatar
  • 133
4 votes
1 answer
3k 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 ...
i-one's user avatar
  • 2,354
6 votes
1 answer
7k 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 ...
Ben Thul's user avatar
  • 1,927
5 votes
3 answers
15k 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 ...
karun_r's user avatar
  • 339