This article describes the built in method of using Run As For sessions types that do not yet support the built in method you can follow the manual steps outlined in Run as another user.
Settings
Supported types
The following types currently support Run As:
Option | Description |
---|---|
Session |
|
Macros/Scripts/Tools |
|
Session Add-on |
|
Session
Sessions that support Run As will have a Run As tab where you specify which credentials to use when starting with Run As.Option | Description |
---|---|
None | No Run As is performed. |
Current session | Use the same credentials as defined in the session. |
Custom credentials | Use specified custom credentials. |
Credential repository | Use a link credential entry. |
Use my personal credentials | Use a link personal credential entry. |
Macros/Scripts/Tools
With tools session types you only need to specify Run as different user in Advanced tab. At execution time the credentials will be resolved and used to start the Windows Credentials unless you select Use session credentials, in which case it will use those active for the session.
With tools session types you only need to specify Run as different user At execution time the credentials will be resolved and used to start the Run As process.
Session add-on
SQL Server Management Studio supports Run As. Configure it like you would configure a normal session.
Click on Run as different user to modify the Run As settings.
Notes
Run as Different User and Run As Administrator are mutually exclusive.
Run as Different User does not allow for Shell Execute
Example: Command line session with Run as different user on the same workgroup/domain
- Create a new Command Line session.
- Set the command to CMD.
- Specify the Run As credentials.
- Save your session.
- Run your Command Line session.