ssis_proxy_verbose_logging_cheat_sheet
This is an old revision of the document!
SSIS Proxy & Verbose Logging Cheat Sheet
π οΈ Running SSIS Job Steps as a Proxy
To run an SSIS package as a different user (e.g. `tasca\administrator`), follow these steps:
1. Create Credential
USE [master]; CREATE CREDENTIAL [ssis_cred_admin] WITH IDENTITY = N'tasca\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
- Type: SQL Server Integration Services Package
- Run as: SSIS Proxy Admin
β
π Enabling Verbose Logging for SSIS
1. Enable Logging in SSIS Package
- Open SSIS package in Visual Studio/SSDT
- Go to SSIS β Loggingβ¦
- Choose provider (Text file, SQL Server, SSISDB)
- Enable events:
- `OnError`, `OnWarning`, `OnPre/PostExecute`, `OnTaskFailed`
2. Enable Output File in SQL Agent Job Step
- Job Properties β Steps β [Your Step] β Edit
- Go to Advanced tab
- Set Output file:
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
- Go to: SSMS β SSISDB β [Project] β [Package]
- Right-click β Reports β All Executions
- Click execution β Messages tab
β
π§ͺ Troubleshooting Tips
- Error:
NT SERVICE\SQLSERVERAGENT does not have access to 'MAGNUS_SITD'
β The job step is likely not using the proxy correctly.
- Test with `CmdExec` job step and `dtexec` for clearer logs.
- Check Windows Event Viewer (Application log).
- Check SQL Server Agent job history and output files.
- Use `whoami` inside SSIS Script Task to verify run context.
β
π§Ό Cleanup (Optional)
DROP CREDENTIAL [ssis_cred_admin]; EXEC sp_delete_proxy @proxy_name = N'SSIS Proxy Admin';
ssis_proxy_verbose_logging_cheat_sheet.1751294434.txt.gz Β· Last modified: 2025/06/30 14:40 by oso
