Header Ads Widget

Responsive Advertisement

Ticker

6/recent/ticker-posts

SSIS job executed properly when run manually but fails when run through SQL Server Agent as Job

Issue: SSIS job executed properly when run manually but fails when run through SQL Server Agent 

Solution: This is permission issue. I am also facing this issue and resolved. 

Follow below steps: 

Step-1: First check your user account or ADM account have admin or sysadmin or not. How to check: 

Execute this query :

SELECT SYSTEM_USER AS LoggedInUser,

IS_SRVROLEMEMBER('sysadmin') AS IsSysadmin;

If its return 1 then you are sysadmin role else not. 

If IsSysadmin = 0 → You need someone with sysadmin to set it up for you.

For further steps we need sysadmin role. 

Step-2: Run the following in the master database:

CREATE CREDENTIAL [cred_OOOADM]    --OOOADM = Mention your ADM Account

WITH IDENTITY = 'CORPORATE\OOOADM', 

SECRET = 'YourADMPassword';

Step-3: Then run:

EXEC msdb.dbo.sp_add_proxy 
    @proxy_name = 'proxy_OOOADM',
    @credential_name = 'cred_OOOADM',
    @enabled = 1;

EXEC msdb.dbo.sp_grant_proxy_to_subsystem 
    @proxy_name = 'proxy_OOOADM', 
    @subsystem_id = 11; -- SSIS

Step-4: After that, you’ll see proxy_OOOADM in the "Run As" dropdown.

Now Execute the package it should be work. 

Post a Comment

0 Comments