Ssis error timeout expired

the job has 3 dataflow task. dataflow task will get data from oracle database through stored procedure and insert into sqlserver database.
  • Remove From My Forums
  • Question

  • the job has 3 dataflow task. dataflow task will get data from oracle database through stored procedure and insert into sqlserver database.

    the error message is :

    OnError,test,R1-COREsvc-sqlserveruser,getdata,{719937CA-F561-4675-92BA-AFC2B0F41C74},{B3470F19-B422-4A7D-99E2-C29BAA6EBDC8},3/12/2013 12:30:53 AM,3/12/2013 12:30:53 AM,-1,0x,Timeout expired.  The timeout period elapsed prior to obtaining a connection
    from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
    OnError,test,R1-COREsvc-sqlserveruser,getdata1,{D3091659-FDEA-44D8-A8E9-1013C49699FA},{B3470F19-B422-4A7D-99E2-C29BAA6EBDC8},3/12/2013 12:30:53 AM,3/12/2013 12:30:53 AM,-1,0x,Timeout expired.  The timeout period elapsed prior to obtaining a connection
    from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
    OnError,test,R1-COREsvc-sqlserveruser,getdata2 Main,{45715463-AC21-4C6A-9315-8889DCC5D451},{B3470F19-B422-4A7D-99E2-C29BAA6EBDC8},3/12/2013 12:30:53 AM,3/12/2013 12:30:53 AM,-1,0x,Timeout expired.  The timeout period elapsed prior to obtaining a connection
    from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.

Answers

  • Hi,

    This typically happens when connections are not closed after they are used.

    I think you need to check how many open connections you have while the application is running.

    In general, this error may occur in the following situations:

    1) You have a very large number of users using your database in the same time and you run out of free connections. Possible solutions: increase number of allowed connections on your server and/or (if your system is a webserver) increase the pool size specified
    in database connection string.

    2) Your system has poor database logic design and/or connection leaks like when connection open isn’t closed properly later. Solution for this will be auditing your code for such connection leaks and fixing them by properly closing connections all the time.

    Regards,

    Zaim Raza

    • Marked as answer by

      Friday, March 22, 2013 6:45 AM

SQL Server 2012 Business Intelligence SQL Server 2012 Developer SQL Server 2012 Enterprise SQL Server 2012 Standard SQL Server 2014 Business Intelligence SQL Server 2014 Developer SQL Server 2014 Enterprise SQL Server 2014 Standard More…Less

Symptoms

Consider the following scenario:

  • You use Microsoft SQL Server 2012 or SQL Server 2014 and Microsoft SQL Server Data Tools (SSDT) to design a SQL Server Integration Services (SSIS) Package.

  • In the Dataflow Task, you use a source component such as OLE DB source, ADO.NET source, or ODBC source, to set the Data Access mode to SQL Command and type a query in the command box.

  • You click Preview to see the result of the query.

In this scenario, the command that is previewed runs longer than 30 seconds and fails in the designer. Additionally, you receive an error resembles «Query Timeout Expired.»

Cause

The issue occurs because the CommandTimeout threshold is hard coded as 30 seconds for the preview feature in SSIS designer.

Resolution

The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 3 for SQL Server 2014 /en-us/help/2984923

Cumulative Update 1 for SQL Server 2012 SP2 /en-us/help/2976982

Cumulative Update 10 for SQL Server 2012 SP1 /en-us/help/2954099

Notes:

  • Before you apply this hotfix, the time out settings is fixed to 30 seconds in data preview for all SSIS components.

  • After you apply this hotfix:

    • For ADO.NET source component and OLE DB source component, they already have a property CommandTimeout. This property will be used in data preview.

    • For all other components that have data preview feature but don’t have CommandTimeout property:

      • If there is a DWORD value DataPreviewTimeout under system registry key:\HKLMSOFTWAREMicrosoftMicrosoft SQL ServerSSISPreferences SSIS will use that value as time out during preview.

      • If there is no DWORD value DataPreviewTimeout, SSIS still uses 30 seconds.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

Need more help?

Recently, a challenge arose with a client’s SSIS packages occasionally failing. They received the following error:

Description: “Login timeout expired”.

An OLE DB record is available. Source: “Microsoft SQL Server Native Client 11.0” Hresult: 0x80004005 Description: “A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information, see SQL Server Books Online.”

After reviewing possible reasons for this occurrence, we determined the issue was network-related. I checked for a ‘Connect Timeout’ setting in the connection string and noticed that it was not specified. This means that it was set to the default setting, 15 seconds. We recommended they set the ‘Connect Timeout’ high enough to account for any network hiccups. To my surprise, the client responded that they initially set the ‘Connect Timeout’ in the Visual Studio’s connection manager to 0 per their documentation. Setting the ‘Connect Timeout’ to 0 gives the SSIS package an unlimited amount of time to attempt connection. This should have displayed in the connection string and prevented the error they received. This was not the case. I decided to attempt to duplicate their problem.

All testing was done in Microsoft Visual Studio 2015 Update 3. The instances and databases used are on XTIVIA test servers.

I started by creating a simple OLE DB connection through the connection manager. So far, no problems.

SSIS Package

The issue occurred when I went to the ‘All’ tab. Though ‘Connect Timeout’ was set to 15 seconds by default, there was a 0 in the space next to it.

connection manager

It registered as being null when saved, and ‘Connect Timeout’ was not specified in the connection string.

In this example, the resulting connection string was as followed:

Data Source=;Initial Catalog=Test;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;

package utility

I ran the test SSIS package I created and duplicated the timeout error they received.

The setting falsely registers as null if a number higher than 0 is not specified. Because of this, it only presents a problem if the goal is to set the ‘Connect Timeout’ setting to unlimited.

The Connection Manager Workaround

Our team does not usually recommend having the connection timeout set to unlimited. This causes the SSIS package to continue to use resources until the command can complete. If there are multiple SSIS package jobs and the server is unavailable for an extended period, this could cause the SSIS package jobs to pile up until the server becomes available. Nonetheless, I wanted to find a way to set it 0 in case it was necessary. After numerous tests, I identified a workaround which did not involve manually setting the connection string or setting up a configuration file.

Step 1: Set the ‘Connect Timeout’ Setting to Any Value

As shown in the image below, I set the timeout to 1 minute, in seconds.

connection timeout

Once I clicked ‘OK’, it generated two following connection strings, as predicted:


Data Source=;Initial Catalog=Test;Provider=SQLNCLI11.1;Integrated Security=SSPI;Connect Timeout=60;Auto Translate=False;

connection string

Step 2: Change the ‘Connect Timeout’ Setting to 0

I re-opened the connection manager for. Test and changed the ‘Connect Timeout’ setting to 0.

connection timeout 0

I again clicked ‘OK’ and saved the package. The following was the new connection string:

Data Source=;Initial Catalog=Test;Provider=SQLNCLI11.1; Integrated Security=SSPI;Connect Timeout=0;Auto Translate=False;

connection string false

I re-ran the test SSIS package and confirmed it was no longer failing due to the “Login timeout expired” error.

In summary, a few extra steps are needed to set ‘Connect Timeout’ through the configuration manager:

  1. Set “Connection Timeout” to any number
  2. Save the connection manager
  3. Reopen configuration manager
  4. Set the “Connection Timeout” to 0
  5. Save the package

Now ‘Connect Timeout’ should be set to “Unlimited” in the connection string.

The Configuration File Workaround

The connection string is overridden when a configuration file is added. This also allows ‘Connect Timeout’ to be set to 0 by altering an XML file.

Step 1: Create a Connection Manager

As shown in the image below, I set the timeout to 1 minute as I did in the configuration manager work around. This is not necessary. It can be left as 0, but this made it easier to alter the connection string in a later step.

connection timeout

It generated the following connection string:

Data Source=;Initial Catalog=Test;Provider=SQLNCLI11.1;Integrated Security=SSPI;Connect Timeout=60;Auto Translate=False;

connection string

Step 2: Open Package Configuration Organizer

Under the SSIS tab, I opened the Package Configuration Organizer.

package config

Step 3: Ensure the Package Configuration is Enabled & Click Add

package check

Step 4: Follow the Package Configuration Wizard Instructions

I set my configuration type as a XML configuration file.

config wizard

I selected the connection manager and property I wanted in the configuration file. Here any configurable properties can be selected. For the sole purpose of setting the ‘Connect Timeout’, I only selected was ConnectionString under properties.

config wizard 2

From here, I reviewed my choices and finished.

Step 5: Open and Edit the XML File

I opened the XML configuration file that I created in step 4. Inside the file was the following connection string:

Data Source=;Initial Catalog=Test;Provider=SQLNCLI11.1;Integrated Security=SSPI;Connect Timeout=60;Auto Translate=False;

I altered the 60 for the Connect Timeout to 0 and saved.

ssis xml code

The new connection string when I executed the SSIS package was as followed:

Data Source=;Initial Catalog=Test;Provider=SQLNCLI11.1;Integrated Security=SSPI;Connect Timeout=0;Auto Translate=False;

connection string false

If you would like more help getting this setup on your SQL Server please get in touch with one of our SQL Server DBA experts today!

Понравилась статья? Поделить с друзьями:
  • Ssid unknown android как исправить
  • Ssid mismatched error 0fl01
  • Sshexception error reading ssh protocol banner
  • Squirrel газовая колонка ошибка е4 решение
  • Sshd error unable to resolve group administrators