Error with SSIS package running as SQL Agent job

I have a strange issue.
I have a SQL Agent job that execute 5 steps, each step is an SSIS package that imports a CSV file to a temp table, then executes a SQL script to update a production table. 
This job runs every 3 mins, every day, and has been for over a year.
Every once in a while it will start failing on step 2.  Sometime it only happens for a couple of runs, other times I have to restart the SQL server.  Once it corrects itself, it could be months before it happens again, but usually happens every
few weeks.
The error in the job history is: "Unable to bulk copy data. You may need to run this package as an administrator"
Obviously I have all the permissions correct, as it was running successfully every 3 mins before this error suddenly starts. I'm at a loss as to what the problem is.  It is always on step 2, which is identical to step 1 except its a different CSV file
going to a different table. As I typed this, it failed twice, then was successful afterwards.
Any ideas where to look for further information? I've checked the event viewer and looked in the SQL logs, nothing stands out at this time.

Hi Kerberos35,
It seems to be caused by the UAC feature which makes SSIS use the low-permissions token of the administrator Windows account under which the job runs. This issue is described in the following KB article:
http://support.microsoft.com/kb/2216489/en-us 
To resolve the issue, you can install the latest service pack for your SQL Server. To work around this issue, you can also use one of the following two methods:
Method 1: Replace the SQL Server Destination components in the Data Flow Tasks that are failing with OLE DB Destination components that point to the same SQL Server connection manager.
Method 2: Create a SQL Server Agent proxy by using a Windows account that is not a member of the local Administrators group after you assign Create Global Objects permissions to that account.
To do this, follow these steps:
Click Start, point to Administrative Tools, and then click Local Security Policy.
Expand Local Policies, and then click User Rights Assignment.
In the details pane, double-click Create global objects.
In the Local Security Policy Setting dialog box, click Add.
In the Select Users or Group dialog box, click the user accounts that you want to add, click Add, and then click OK two times.
Regards,
Mike Yin
TechNet Community Support

Similar Messages

  • SSIS Package will only run as SQL Agent Job when I have remote desktop to server open.

    Hey guys, so I have another problem to add to the already massive 'SSIS/SQL Server Agent Job' pile. After days of searching, I can't seem to find anything specific to my problem though.
    The setup is as follows: a SSIS package that refreshes and saves excel files that are hosted on a server. The package runs fine on the local machine, using BIDS on the server, and will even work as a SQL Agent Job on the server IF there is a remote
    desktop connection to the server. To elaborate, if I simply run the job as you would normally do it will fail and give the below error. If I run the job while either myself, or a different machine, has a remote desktop connection to the server where the
    job is scheduled - it will run successfully.
    Below is the error from the History File of the job. Any help would be greatly appreciated.
      Source: Refresh Excel and Save      Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x8000401A): Retrieving
    the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a.     at ST_79772452677f4de1852d5ffbba3e5232.csproj.ScriptMain.ExcelRefresh(String FileName)    
    at ST_79772452677f4de1852d5ffbba3e5232.csproj.ScriptMain.Main()     --- End of inner exception stack trace ---     at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct&
    sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)     at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)    
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
    invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)     at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo
    culture, String[] namedParams)     at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)     at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
    UPDATE:
    In my previous post the Identity in DCOM Config file for Microsoft Excel was set as The Interactive User. The job was working only when I had a remote connection to the server open.
    If I set the Identity to 'This User' and use the username and password of the server login account, it will work as a scheduled job without needing an open remote connection to the server. So it works, great! but I have reservations setting this
    for all instances of Excel for the server. I'm sure other users have different accounts they use for running Excel. Any suggestions around this?

    Hi LiamSexton,
    It should be the server-side Automation of Office issue described in the following KB article:
    http://support.microsoft.com/kb/257757 
    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit
    unstable behavior and/or deadlock when Office is run in this environment.
    User Identity: Office applications assume a user identity when the applications are run, even when Automation starts the applications. The applications try to initialize toolbars, menus, options, printers, and some add-ins based on settings in the user
    registry hive for the user who launches the application. Many services run under accounts that have no user profiles (such as the SYSTEM account or the IWAM_[servername] accounts). Therefore, Office may not initialize correctly on startup. In this situation,
    Office returns an error on the CreateObject function or the CoCreateInstance function. Even if the Office application can be started, other functions may not work correctly if no user profile exists.
    To work around the issue, you can refer to the following alternative introduced in the article:
    Most server-side Automation tasks involve document creation or editing. Office 2007 supports new Open XML file formats that let developers create, edit, read, and transform file content on the server side. These file formats use the System.IO.Package.IO
    namespace in the Microsoft .NET 3.x Framework to edit Office files without using the Office client applications themselves. This is the recommended and supported method for handling changes to Office files from a service.
    Regards,
    Mike Yin
    TechNet Community Support

  • Unable to Run SSIS Package Through SQL Agent Job

    Hi,
    I recently upgraded SQL server 2008 R2 to SQL Server 2012. I also upgraded all the packages on the server. The package runs fine from BIDS. However when I try to run the package through the SQL Agent Job it fails with the error below:
    Executed as user: A. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  11:43:04 PM  Could not load package "\FolderA\Package.dtsx"
    because of error 0xC00160AE.  Description: Connecting to the Integration Services service on the computer "S2345WE" failed with the following error: "Access is denied."    By default, only administrators have access to the
    Integration Services service. On Windows Vista and later, the process must be running with administrative privileges in order to connect to the Integration Services service. See the help topic for information on how to configure access to the service.  Source:
      Started:  11:43:04 PM  Finished: 11:43:04 PM  Elapsed:  0.016 seconds.  The package could not be loaded.
    Using Windows Authentication I am able to login to Integration services through SSMS. In the SQL Agent job I am using package store to execute the package. I have admin permission on the server. The integration services currently uses my credentials while
    running.I am not sure why I am getting this error.
    Please advice..
    Thanks,
    EVA05

    Hi ,
    similar thread - http://social.technet.microsoft.com/Forums/en-US/sqlintegrationservices/thread/25e22c7e-bae0-42e4-b86d-2db7a4af519d
    Try this link -
    http://msdn.microsoft.com/en-us/library/dd440760%28v=sql.100%29.aspx
    sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful.

  • SSIS Package developed in SQL Server 2008 R2 Using BIDS 2008 is not working in SQL Server 2012

    I am working in a Product based company.
    We have given a Pre-requisites to our customers like SQL Server version should be 2008 or later.
    I have developed and deployed my SSIS package in SQL Server 2008 R2 with BIDS 2008.
    I have used "Script Component" in my package.
    We will take only DTSX package file to the customer places and run using SQL Agent Job daily. 
    Who are all(Customer Environments) using SQL 2008 or R2 my package is running fine.
    Who are all(Customer Environments) using SQL 2012, I am facing the below issue 
    The component metadata for “Script Component, clsid {874F7595-FB5F-4OFF-9BAF-FBFF825OE3EF}” could not be upgraded to the newer version of the component. The PerformUpgrade method failed.
    Still the same package is running fine for some of the customers having SQL 2012.
    I am getting the above error only for few customers.
    Can someone please guide me how to proceed on this. Is there any solution to go without upgrading the package to SQL 2012. Because we need to maintain only one package for all customers

    Hi Katherine,
    I am just using the script component only for generating Identity column purpose. I will get the maximum count from the table and using this count value as Input (JurisCount in my below code) for script component and increment the counter for new records.
    Finally I am mapping the Script component output value (JurisKey in my below code) to Key column of the table. That's all I am doing with Script Component.
    Here is my Simple .net code
    /* Microsoft SQL Server Integration Services Script Component
    *  Write scripts using Microsoft Visual C# 2008.
    *  ScriptMain is the entry point class of the script.*/
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
    public class ScriptMain : UserComponent
        public override void PreExecute()
            base.PreExecute();
              Add your code here for preprocessing or remove if not needed
        public override void PostExecute()
            base.PostExecute();
              Add your code here for postprocessing or remove if not needed
              You can set read/write variables here, for example:
              Variables.MyIntVar = 100
        int counter = 0;
        public override void Input0_ProcessInputRow(Input0Buffer Row)
            if (counter == 0)
                counter = Convert.ToInt32(Row.JurisCount);
            Row.JurisKey = counter;
            counter = counter + 1;
    PAVAN MSBI

  • Issues with SSIS in named instance SQL 2014

    I have a SSIS job that runs without any issues with native mode. But for named instance, I get these errors:
    Any suggestions?
    Failed to decrypt protected XML node
    "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.
    You may not be authorized to access this
    information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2015-04-22 15:20:01.67     Code: 0xC0016016    
    Source: xxx Description: Failed to decrypt protected XML node "OraPassword" with error 0x8009000B
    "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a
    cryptographic error. Verify that the correct key is available.  End Error  Error: 2015-04-22 15:20:02.22     Code:
    0x000002BD     Source: xxx  Connection manager "yyy"     Description:Oracle Home not found.  End Error  Error: 2015-04-22
    15:20:02.22     Code: 0x0000020F    Source: mmm[96]    
    Description: The AcquireConnection method call to the connection manager yyy failed with error code 0x80004005.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error 
    Thanks

    Hi LaxUdas,
    If I understand correctly, the package is developed with Protection Level set as "EncryptSensitiveWithUserKey". When you execute the package via a SQL Agent Job in a Named Instance, the account that job step using is not the user that create the
    package. So it cannot be able to connect to the Oracle DB with invalid connection string.
    This behavior is by design. In an Integration Services package, the following information is defined as sensitive:
    The password part of a connection string.
    The task-generated XML nodes that are tagged as sensitive.
    Any variable that is marked as sensitive.
    EncryptSensitiveWithUserKey uses a key that is based on the current user profile to encrypt only the values of sensitive properties in the package. Only the same user who uses the same profile can load the package. If a different user opens the package,
    the sensitive information is replaced with blanks and the current user must provide new values for the sensitive data.
    To work around this issue, please refer to the following suggestions:
    Change the SSIS Package ProtectionLevel property to EncryptSensitiveWithPassword. This setting uses a password for encryption. To open the package in SSIS Designer (SSDT), the user must provide the package password.
    Change the Named Instance SQL Agent Service account to the user that create the package, like your Default Instance.
    Use SSIS Package configuration files to store sensitive information, and then store these configuration files in a secured folder. You can then change the ProtectionLevel property to DontSaveSensitive so that the package is not encrypted and does not try
    to save secrets to the package. When you run the SSIS package, the required information is loaded from the configuration file. Make sure that the configuration files are adequately protected if they contain sensitive information.
    The following two documents are for your references:
    https://msdn.microsoft.com/en-us/library/ms141747.aspx
    https://support.microsoft.com/en-us/kb/918760
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Errors running SQL Agent Jobs for 64 bit SSIS packages on a 64 bit server, but Source server 32 bit

    Hi,
    I can able ran the SSIS package in BIDS, since set to false in Run64BitRuntime property.
    Then I created SQL server Agent job I tried the following ways
    Step 1:
    Type is set as SQL Server Integration Services Packages,
    Run as - SQL Server Agent Service Account
    Package source - FileSystem
    then Execution option tab I selected 32 bit runtime
    and then run the job I am getting the below error
    Message
    Executed as user: CIT\svc_CS_SS2008Agent. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  7:29:17 AM  Error: 2013-11-28
    07:29:18.57     Code: 0xC0014020     Source: Example Connection manager "DataSource.DataExtract"     Description: An ODBC error -1 has occurred.  End Error  Error: 2013-11-28 07:29:18.57    
    Code: 0xC0014009     Source: Imports20_OAC_Gifts Connection manager "DataSource.DataExtract"     Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the
    database server.  End Error  Error: 2013-11-28 07:29:18.59     Code: 0x0000020F     Source: DFT_Example ODBC_SRC Example [11]     Description: The AcquireConnection method call to the connection
    manager DataSource.DataExtract failed with error code 0xC0014009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error: 2013-11-28 07:29:18.59    
    Code: 0xC0047017     Source: DFT_Example SSIS.Pipeline     Description: ODBC_SRC Example failed validation and returned error code 0x80004005.  End Error  Error: 2013-11-2
    Step 2:
    Type - Operating sytem (CmdExec)
    Run as - Sql Server agent service account
    Command - C:\Program Files\Microsoft SQL Server\110\DTS\Binn\dtexec.exe /FILE "D:\Example\Example.dtsx" /x86  /CHECKPOINTING OFF /REPORTING E
    then run the job I am getting the below error
    Message
    Executed as user: MIS\svc_CS_SS2008Agent. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  6:37:58 AM  Error: 2013-11-28
    06:37:58.94     Code: 0xC0014020     Source: Example Connection manager "DataSource.DataExtract"     Description: An ODBC error -1 has occurred.  End Error  Error: 2013-11-28 06:37:58.96    
    Code: 0xC0014009     Source: Example Connection manager "DataSource.DataExtract"     Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server. 
    End Error  Error: 2013-11-28 06:37:59.01     Code: 0x0000020F     Source: DFT_Example ODBC_SRC Example [11]     Description: The AcquireConnection method call to the connection manager DataSource.DataExtract
    failed with error code 0xC0014009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error: 2013-11-28 06:37:59.07     Code: 0xC0047017    
    Source: DFT_Example SSIS.Pipeline     Description: ODBC_SRC Example failed validation and returned error code 0x80004005.  End Error  Error: 2013-11-28 06:37:59.12     Code: 0xC004700C    
    Source: DFT_Example SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2013-11-28 06:37:59.16     Code: 0xC0024107     Source: DFT_Example     
    Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).Started:  6:37:58 AM  Finished: 6:37:59 AM  Elapsed:  1.373 seconds.  Process Exit Code 1. 
    The step failed.
    Note:
    My source server is 32 bit and development environment in 64 bit
    if anybody have idea please share your knowledge

    Hi BIRam,
    Based on the current information, the issue may be caused by the factor that the SQL Server Agent Service Account doesn’t have access to the MySQL server. Try to create a SQL Server Agent Proxy account that has sufficient permission on the MySQL server.
    In addition, also pay attention to the package protection level setting.
    For more information, please see:
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/e13c137c-1535-4475-8c2f-c7e6e7d125fc/how-do-i-troubleshoot-ssis-packages-failed-execution-in-a-sql-agent-job?forum=sqlintegrationservices.   
    Regards,
    Mike Yin
    TechNet Community Support

  • How to Create a SQL Agent Job For A SSIS Package with Sql Server Authentication

    Hi ALl,
    I have a SSIS package which basically has a data flow task in which i pull the data from one server and copy it into another server and my source server is the one where i dont have windows authentication and i have to only use a sql server authentication
    . This package runs fine if i click the server connection properties type the password and save it.
    Now, my task is to set up a sql agent job which basically uses a proxy account and takes this package from the file system and runs it.But when i try to run this package, its failing with an error saying 
    "Login Failed For rpt5user" where rpt5user is the username for my sql server authentication of the source connection.
    Can someone please help me with any suggestions on how to do this?
    I have heard that we can achieve it by using xml config file which i have never used and i am trying to google around but for no luck.
    So, If someone can please throw any suggestions or ideas on this it would be great.
    Thanks

    You need to add password as a config item and set it from the file source or sql table
    see this as an example
    http://blogs.msdn.com/b/runeetv/archive/2009/12/22/ssis-package-using-sql-authentication-and-dontsavesensitive-as-protectionlevel.aspx
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • SQL Agent Job Fails To Run A SSIS Package

    Hi,
    I have a SSIS Package which basically truncates the table and re-loads it from an excel file .The job runs fine if i run it manually on visual studio.However, i try to shcedule a SQL Agent job and it fails with the following error
     Description: The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode. Error code: 0x00000000.  An OLE DB record is available.  Source: "Microsoft
    OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".  End Error  Error: 2014-10-22 14:47:41.15     Code: 0xC001002B     Source: Package1 Connection manager "Excel
    Connection Manager 1"     Description: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. 
    I am exactly not sure what it means?
    Can someone please help me with any suggestions on this.
    Thanks.

    Thanks for trying that option . It looks like there is an issue with the driver . Can you try to install/uninstall the driver once again from http://www.microsoft.com/en-us/download/details.aspx?id=13255.
    You can try this URL , where he has the similar problem 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8a40d329-0611-44e2-ae51-3bd9b0901754/ssis-the-requested-ole-db-provider-microsoftaceoledb120-is-not-registered?forum=sqlintegrationservices
    Please mark this as answer if this helps to solve your problem

  • SSIS package is failing in SQL agent job with webserviceTaskException: Service Description cannot be null

    Hi All
    we are using webservice task in our ssis package and the package is successful in SSDT . when we created SQL job using that package it is failing with  webserviceTaskException: Service Description cannot be null.
    we have given access to web service for ssis proxy account  and have access on wsdl file folder  and given access to temp folder .
    what would be the reason for the failure?
    Surendra Thota

    Hi Surenda,
    As per my understanding, the error message is too general. In order to troubleshoot this issue, we should view the detail error message about this job. For more details, please see:
    Troubleshooting Jobs
    SQL Server Agent Error Log
    Besides, since when you call a Microsoft SQL Server Integration Services (SSIS) package outside a SQL Server Agent job step, the SSIS package runs successfully. However, if you do not modify the SSIS package, then execute it via SQL Server Agent job step,
    it fails. The scenario always related to the user account that is used to run the package under SQL Server Agent. Please also verify that the account has access to the Web site or to the Web Service Description Language (WSDL) file for HTTP connection manager.
    References:
    SSIS package does not run when called from a SQL Server Agent job step
    Example using Web Services with SQL Server Integration Services
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • How to Run SSIS Package through SQL AGENT Job

    I am good with SSIS, I created a package which will load the excel files to SQL SERVER  tables. To Implement this I wrote the C# code to extract the first sheet name only, and then
    package will load the data present the first sheet only. The package working fine when i run this through BIDS. But the same package throwing error at C# code step when i am running this package through SQL AGENT JOB. When i searched for this, i have seen
    many posts saying that, this is happening becoz of using Microsoft.interop.excel references inside the c# code. Please help me with this. Is there any alternate way in c# to extract the first sheet name(not based on ascending order) of an excel file with out
    using interop. Or
    How to configure SQL AGENT job to run suceessfully when using interop inside the code.
    My UAT server is of 64 bit. And i have to run this in the same server.
    I tried creating  "Desktop" folder in "C:\Windows\System32\config\systemprofile\"
    Error:Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.     at ST_ecfa668f250a45e18c95639c9ffd64d4.csproj.ScriptMain.Main()
        --- End of inner exception stack trace ---     at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)    
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr,
    Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)     at
    System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)     at System.Type.InvokeMember(String name, BindingFlags
    invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)     at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()  End Error  Error: 2015-02-27 11:24:00.23     Code: 0x00000001
        Source: User Mail      Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error
    occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
    not open a connection to SQL Server)     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
        at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
        at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)     at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
    host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)     at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString
    connectionOptions, String newPassword, Boolean redirectedUserInstance)     at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword,
    SqlConnection owningObject, Boolean redirectedUserInstance)     at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)  
      at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)     at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owning...
     The package execution fa...  The step failed
    using System;
    using System.Data;
    using System.Diagnostics;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    using System.Data.OleDb;
    using Microsoft.Office.Interop;
    using System.Runtime.InteropServices;
    namespace ST_ecfa668f250a45e18c95639c9ffd64d4.csproj
    [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    #region VSTA generated code
    enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    #endregion
    public void Main()
    { /*Passing the file path via User::File_Name Variable*/
    string FileName = Dts.Variables["User::File_Name"].Value.ToString();
    Microsoft.Office.Interop.Excel.Application xlApp = null;
    Microsoft.Office.Interop.Excel.Workbook excelBook = null;
    try
    xlApp = new Microsoft.Office.Interop.Excel.Application();
    excelBook = xlApp.Workbooks.Open(FileName, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing);
    string[] excelSheets = new string[excelBook.Worksheets.Count];
    int i = 0;
    foreach (Microsoft.Office.Interop.Excel.Worksheet wSheet in excelBook.Worksheets)
    excelSheets[i] = wSheet.Name;
    i++;
    Dts.Variables["User::WorkSheetName"].Value = excelSheets[0] + "$";
    catch (Exception ex)
    excelBook.Close(false, FileName, null);
    Marshal.ReleaseComObject(excelBook);
    string error = ex.Message;
    finally
    excelBook.Close(false, FileName, null);
    Marshal.ReleaseComObject(excelBook);
    Dts.TaskResult = (int)ScriptResults.Success;

    I installed office in my machine...but this doesn't solved my problem...
    Finally i figured out the solution for this and it is working now, Here is the solution...!
    Create the folder with name "Desktop" inside the below mentioned path
    C:\Windows\SysWOW64\config\systemprofile\   
    But i really don't understand the logic behind this. Can someone explain it pls....

  • SSIS Package runs from the Package executer and from BIDS but not from the sql agent schedular

    Hi Experts,
    I have 2 packages :
    1. Main Package -For each loop package
    2. Sub Package - As we need to collect the information from several other DB with same table structures .
    The Main Package calls the Sub Package and loops through several linked server (9 of them ) .
    From last 2 weeks the scheduler is running on time but no data is loaded into our destination DB . 
    Daily i need to manually run the package .
    The SQL Agent task is scheduled using the service account from which  the sql server was installed on the server so it has the full privledges.
    If i run the Main package from the BIDS i see 2 messages related to the configuration of xml no error message and executes fine.
    If i run the Package from the execute package utility it runs fine.
    Now if the package is scheduled for a nightly load it executes fine successfully no error message also in the Job History
    but when i check for the data loaded on that day no data loads up in the destination DB . Due to this behavior of the sql agent even if am on leave i have to login on to the server and exec manually so if at times i forget the exec we are in big trouble
    Please experts help me in troubleshooting the issue.
    Thanks
    Priya

    Hi Visakh16 ,
    We are using a service account to run the package .. Earlier in the BIDS i was getting the error crypotgenic
    something password .. I googled out and changed the security : Protection Level : Dont save Sensitive
    information . So that error now its not showing in the BIDS
    And how is login mapping done for the linked servers?  You've configured a mapped login for the service account also?
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Error "To run a SSIS package outside of SQL Server data tools you must install task name used in package of Integration service or highter.

    Hello Team,
    I am trying to execute a SSIS package from web page. When i try to do that i am getting following error.
    "To run a SSIS package outside of SQL Server data tools you must install <task name used in package> of Integration service or highter."
    In my machine Integration Services are installed and its service is also in running state.
    Please help me on this.
    Thanks,
    Ramesh
    Thanks, Ramesh Arige

    The SSIS package developed using SSIS 2008 Server R2 and Integrations Services 10.0 is exists in my machine. Is this wrong configuration, please help me on this.
    I am using the below code copied from CodeProject
    Thank you so much for responding.
    Ramesh
    Thanks, Ramesh Arige
    Which way are you using from the provided blog? Using 1) C# Code or 2) C# and Stored Procedure?
    Cheers,
    Vaibhav Chaudhari
    MCP, MCTS, MCSA (SQL Server 2012)

  • How to pass parameters to sql agent job run configured ssis package

    Hi all,
    I have a big problem at my small project.
    I build my SSIS package that get its variables values from a configuration file..
    and when i build a SQL agent job to run this package in a schedule i set the values of variables in it .. but in run-time the package still get its parameters from the configuration file !??
    any help please ?

    >SQL agent job to run this package in a schedule i set the values of variables in it
    One way, setup a configuration table for the package. Let the package read the values for the variables from there.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • SSIS: To run a SSIS package outside of SQL Server Data Tools you must install SCR - DP1 Connections of Integration Services or higher

    We have SSIS installed on a machine that is not part of a cluster but it is accessible by the cluster.
    Our job we have running on the cluster is failing with the following error:
    Error: 2014-01-31 09:14:37.52     Code: 0xC000F427     Source: SCR - DP1 Connections  
    Description: To run a SSIS package outside of SQL Server Data Tools you must install SCR - DP1 Connections of Integration Services or higher.  End Error
    Any advice or information on how to resolve this would be great.
    Many Thanks.

    Hi NessaBella,
    Integration Services service is not a cluster-aware service, and does not support failover from one cluster node to another. Therefore, in a clustered environment, Integration Services should be installed and started as a stand-alone service on each node
    in the cluster.
    Based on the error message, it seems that SSIS is not installed on the cluster node on which the job was running. Although SSIS is installed on a machine that is not part of the cluster and can be accessed by each cluster node, the SSIS service installed
    on a remote server cannot be used a cluster node. So, please install the shared feature SQL Server Integration Services on each cluster node. Besides, if certain packages need to run in 32-bit mode in certain jobs and the SQL Server installed is 64-bit version,
    you also need to install BIDS/SSDT on the cluster node to get the 32-bit runtime of SSIS.
    References:
    Integration Services (SSIS) in a Cluster
    Loading and Running a Remote Package Programmatically
    Regards,
    Mike Yin
    TechNet Community Support

  • How do I automatically backup SQL Agent jobs and SSIS packages on the mirror daily?

    I have seen this question asked before but I could not find a satisfactory answer. What is the best solution to get your SQL Agent jobs/schedules/etc. and your SSIS packages on the mirror server? Here's the details:
    Server A is the principal with 2 DBs mirrored over to server B. Everything is fine and dandy, DBs are synched and all good. In Disaster Recovery testing, we need to bring up server B, which now will serve as the principal. Server A is inaccessible. Now,
    we need all our jobs that are setup in server A to be in server B, ready to go, but disabled. We also need all our SSIS packages properly stored. Yes, we store our packages in the MSDB in server A.
    Now, I can see a few answers coming my way.
    1- Backup the MSDB to server B. When you bring server B up as principal in DR, restore the MSDB. All your jobs,schedules,steps, SSIS packages will be there. Is this possible? Can this be done on server B without rendering it incapable of serving as the principal
    for the mirrored DBs? My fear with this option is that there may be information in the MSDB itself about the mirroring state of the DBs? Or is all that in the Master DB? Have you tried this?
    2- Right click each job, script them out, re-create them on server B... No, thank you very much. :) I am looking for an AUTOMATED, DAILY backup of the jobs and SSIS packages. Not a manual process. Yes, we do change jobs and packages quite often and doing
    the job twice on two servers is not an option.
    3- Use PowerShell.. Really? Are we going back to scripting at the command prompt like that, that fast?
    Since I fear option number 3 will be the only way to go, any hints on scripts you guys have used that you like that does what I need to do?
    Any other options?
    Any help GREATLY appreciated. :-) I can be sarcastic but I am a good guy..
    Raphael
    rferreira

    I would go with option number 3. Once  you have a script simple run it....
    param([string]$serverName,[string]$outputPath) 
    function script-SQLJobs([string]$server,[string]$outputfile) 
        [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null 
        $srv = New-Object Microsoft.SqlServer.Management.Smo.Server("$server") 
        $db = New-Object Microsoft.SqlServer.Management.Smo.Database 
        $scrp = New-Object Microsoft.SqlServer.Management.Smo.Scripter($srv) 
        $scrp.Options.ScriptDrops = $FALSE 
        $scrp.Options.WithDependencies = $TRUE 
        $jobs = $srv.JobServer.get_Jobs() 
        $jobs=$jobs | Where-Object {$_.Name -notlike "sys*"}     
        foreach($job in $jobs) 
            $script=$job.Script() 
            $script >> $outputfile 
            "GO" >> $outputfile 
    ---script-SQLJobs "SQLSRV12" "C:\Jobs\test.txt" 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Blog:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance

Maybe you are looking for

  • Boot Camp not installed after transfer from PB G4

    I just bought a MacBook (Black, 160 G HD, 2G RAM). When starting the new MacBook, I transferred my files from my old PB G4 to my new MacBook. All my files were transferred without any problem. But Boot Camp Assistant is no where to be found on the ne

  • Missing episodes - Nikita (Warner TV)

    Missing episodes - Nikita (Warner TV) - should be 22 episodes in series 1, only 14 listed? Solved! Go to Solution.

  • How to query a FieldPoint FP-2010 from Linux

    Hello, I want to query and control a FieldPoint Module FP-2010 (and some connected modules like FP-AI-110 ...) from Linux. Referring to Document ID 181A6Q8U this should be possible somehow. Unfortunally I didn't find an example VI from which I can le

  • Different font size in FireFox v19 and IE9 on google

    Hi Can some please tell why FireFox v19 can display google search results in the same font-size a I'm used to from IE9 ? I have tried to zoom in, however then I get a problem with the other text at the top of the page, because it is getting to large.

  • Hyperion IR BQY job run successful few month but recently failed to export pdf and sending email

    Anyone have encountered the problem that the BQY jobs which are running more than 3 years successfully. But recently no one update the report, but the job export keep failing to send result pdf to receivers intermittently. It shouldn't be BQY job its