Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Increase the Execution time or Connection Time out property of SSIS package from C# code

Increase the Execution time or Connection Time out property of SSIS package from C# code

Scheduled Pinned Locked Moved Database
csharpsql-serverhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    Hi, I have a Console Application that is executing an SSIS package, as the SSIS package is taking too long to execute either I want to set time out property max or more execution time. Currently I am using RetainSameConnection to true on Connection, but if I can set Time out property that would be better either for the Execution or Connection, anything is good. Can anybody please help me in that regards? Any help either code snippet, a link or even a suggestion would be very helpful - thanks in advance. Here is my code: For loading and executing SSIS Pakcage I am using a class

    public class DTSPackage
    {
    private string _PkgLocation;
    private DTSPackageStatus _Status;
    private Package _Pkg;
    private Microsoft.SqlServer.Dts.Runtime.Application _app;

        public string PkgLocation
        {
            get { return \_PkgLocation; }
        }
    
        public DTSPackageStatus PackageStatus
        {
            get { return \_Status; }
        }
    
        public string SsisPackageToBeLoadedFrom { get; set; }
    
        public DTSPackage()
        {
            \_PkgLocation = null;
            \_Status = DTSPackageStatus.Empty;
            \_Pkg = null;
            \_app = new Microsoft.SqlServer.Dts.Runtime.Application();
        }
    
        private void DisposePackage()
        {
            try
            {
                if (\_Pkg != null)
                {
                    \_Pkg.Dispose();
                    \_Pkg = null;
                }
            }
            catch (Exception ex)
            {
                \_Status = DTSPackageStatus.LoadFailed;
            }
        }
    
        public void ClearPackage()
        {
            \_PkgLocation = null;
            \_Status = DTSPackageStatus.Empty;
            DisposePackage();
        }
    
        public void LoadPackage(string SsisPackageToBeLoadedFrom = "File System", string PackageName = "", string TargetServer = "WSQL569S,50101", string PackFileSystemLocation = "", string PkgMSDBLocation = "", string SSISPackageStoreLocation = "")
        {
            /\*PkgLocation = PkgLocation;\*/
            \_Pkg = null;
            \_PkgLocation = null;
    
            //if (PkgLocation != null)
            //{
            DisposePackage();
            try
            {
                string packageFullPhysicalPath = Path.Combine(PackFileSystemLocation, PackageName);
    
                if (String.IsNullOrEmpty(Path.GetExtension(PkgLocation)))
                {
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups