SSIS Proxy & Verbose Logging Cheat Sheet

πŸ› οΈ Running SSIS Job Steps as a Proxy

To run an SSIS package as a different user (e.g. domain\administrator), follow these steps:

1. Create Credential
USE [master];
CREATE CREDENTIAL [ssis_cred_admin]
WITH IDENTITY = N'domain\administrator',
     SECRET = N'YourDomainPasswordHere';
2. Create Proxy Account
USE [msdb];
EXEC sp_add_proxy 
    @proxy_name = N'SSIS Proxy Admin',
    @credential_name = N'ssis_cred_admin';
3. Grant Access to SSIS Subsystem
EXEC sp_grant_proxy_to_subsystem 
    @proxy_name = N'SSIS Proxy Admin',
    @subsystem_id = 11;  -- SSIS
4. (Optional) Grant Proxy to Specific Login
EXEC sp_grant_login_to_proxy 
    @login_name = N'MySqlAgentJobLogin', 
    @proxy_name = N'SSIS Proxy Admin';
5. Configure Job Step

You’re not creating a new user β€” you're just wrapping sa in a credential and proxy. A credential is a way to associate a username and password with a proxy in SQL Server Agent. You’re essentially telling SQL Server, β€œHere’s how to impersonate 'domain\administrator' when needed.”

β€”

πŸ” Enabling Verbose Logging for SSIS

1. Enable Logging in SSIS Package
2. Enable Output File in SQL Agent Job Step
C:\SSISLogs\MyJobOutput.txt
3. Use DTEXEC Logging Parameters (if CmdExec)
dtexec /FILE "path_to_package.dtsx" /DECRYPT password /REPORTING E D I > "C:\SSISLogs\ssis_debug.txt"

/REPORTING Flags

Flag Meaning
β€”β€”β€”β€”β€”β€”β€”β€”β€”-
N Errors only
E Errors + events
D All events
I SQL statements
P Progress
V Version info
C Custom events

β€”

πŸ“Š If Package is Deployed to SSISDB

β€”

πŸ§ͺ Troubleshooting Tips

    NT SERVICE\SQLSERVERAGENT does not have access to 'My_Database'
    
  β†’ The job step is likely not using the proxy correctly.

β€”

🧼 Cleanup (Optional)

DROP CREDENTIAL [ssis_cred_admin];
EXEC sp_delete_proxy @proxy_name = N'SSIS Proxy Admin';