title: SSIS package fails when scheduled with agent job
body: <p>I am trying to connect to Oracle using SSIS package (SQL Server 2008 R2) and loads data to my SQL Server table. </p>
  
  <ol>
  <li>Runs in a 64bit 2008 R2 machine</li>
  <li>Did Setup the TNS:Listner for Oracle client. I have both 32bit and 64bit Oracle client installed. </li>
  <li>Set environment variable path (TNS_ADMIN) pointing the TNSNAMES.ora directory of 64bit oracle client</li>
  <li>Created a registry entry "TNS_ADMIN" in HKEY_LOCAL_MACHINE-->SOFTWARE-->ORACLE</li>
  </ol>
  
  <p>Everything works well when running in BIDS. I used Attunity connector and Native Oracle Provider for OLEDB. Both works in BIDS.</p>
  
  <p>As soon as I schedule it in an SQL agent job and runs the same package, I get following error: </p>
  
  <blockquote>
    <p>Message Executed as user: AMERICAS\ssisdata. Microsoft (R) SQL Server
    Execute Package Utility  Version 10.50.1600.1 for 32-bit  Copyright
    (C) Microsoft Corporation 2010. All rights reserved.    Started: 
    3:17:23 PM  Error: 2016-04-08 15:17:32.76     Code: 0xC0202009<br>
    Source: ORA OLEDB TEST Connection manager "OLEDB ORA CONN MGR"<br>
    Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has
    occurred. Error code: 0x80004005.  An OLE DB record is available. 
    Source: "OraOLEDB"  Hresult: 0x80004005  Description: "ORA-12541:
    TNS:no listener".  End Error  Error: 2016-04-08 15:17:32.76     Code:
    0xC020801C     Source: Data Flow Task OLE DB Source [209]<br>
    Description: SSIS Error Code
    DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The
    AcquireConnection method call to the connection manager "OLEDB ORA
    CONN MGR" failed with error code 0xC0202009.</p>
  </blockquote>
  
  <p>I have tried in different machines. But same is the case. Breaking my head on this since 2 days. Any help would be appreciated.</p>