locked
Possible missing information in the BOL ( Transfer.BulkCopyTimeout ) RRS feed

Answers

  • Hi Papy Normand,

    Indeed, the default value of the BulkCopyTimeout property is 30 seconds. A value of 0 indicates no limit; the bulk copy will wait indefinitely. About your proposal, personally, I recommend you that submit the requirement at https://connect.microsoft.com/SQLServer/ .  If the requirement mentioned by customers for many times, the product team may consider to add this requirement in the future. Your feedback is valuable for us to improve our products and increase the level of service provided.

    Regards,
    Sofiya Li


    Sofiya Li
    TechNet Community Support

    • Marked as answer by Papy Normand Wednesday, October 19, 2016 7:34 PM
    Friday, May 23, 2014 6:47 AM
  • If I do a Little test with SMO Version 11.0.0.0:

    using System;
    using System.Data.SqlClient;
    using Microsoft.SqlServer.Management.Smo;
    
    namespace SmoCSharp
    {
        class Program
        {
            static void Main(string[] args)
            {
                var transfer = new Transfer();
                var command = new SqlCommand();
                Console.WriteLine("Default BulkCopyTimeout value is {0}, default for SqlCommand is {1}", transfer.BulkCopyTimeout, command.CommandTimeout);
                Console.ReadKey();
            }
        }
    }

    I get

    and a timeout of 0 means no timeout at all.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by Papy Normand Wednesday, October 19, 2016 7:35 PM
    Friday, May 23, 2014 7:09 AM

All replies

  • Hi Papy Normand,

    Indeed, the default value of the BulkCopyTimeout property is 30 seconds. A value of 0 indicates no limit; the bulk copy will wait indefinitely. About your proposal, personally, I recommend you that submit the requirement at https://connect.microsoft.com/SQLServer/ .  If the requirement mentioned by customers for many times, the product team may consider to add this requirement in the future. Your feedback is valuable for us to improve our products and increase the level of service provided.

    Regards,
    Sofiya Li


    Sofiya Li
    TechNet Community Support

    • Marked as answer by Papy Normand Wednesday, October 19, 2016 7:34 PM
    Friday, May 23, 2014 6:47 AM
  • If I do a Little test with SMO Version 11.0.0.0:

    using System;
    using System.Data.SqlClient;
    using Microsoft.SqlServer.Management.Smo;
    
    namespace SmoCSharp
    {
        class Program
        {
            static void Main(string[] args)
            {
                var transfer = new Transfer();
                var command = new SqlCommand();
                Console.WriteLine("Default BulkCopyTimeout value is {0}, default for SqlCommand is {1}", transfer.BulkCopyTimeout, command.CommandTimeout);
                Console.ReadKey();
            }
        }
    }

    I get

    and a timeout of 0 means no timeout at all.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by Papy Normand Wednesday, October 19, 2016 7:35 PM
    Friday, May 23, 2014 7:09 AM
  • Hi Sofiya,

    Before creating this thread , I have filled a feedback on the corresponding  page to the BulkCopyTimeout propriety for SQL Server 2014 ( BOL ) where I have warned that it is to have more information which could be useful and avoids many errors and loss of time for the BOL users.

    I have asked as politely as possible with my English a request for the same page of the BOL corresponding to the SQL Server 2012 version. I have not asked for SQL Server 2008 R2 as I know how it is difficult to obtain a modification for a so old version ( around 5 years for the release date ).

    Anyway , I consider that , if the default value is 0 , it is an error as it seems it is not right. I would suggest to have a look at this thread in the SMO Forum :

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b450e8de-b20e-4b23-b4c4-da2d48594db5/problem-with-copy-database-with-smomethod?forum=sqlsmoanddmo

    You will see in the list of exceptions

    • Operating System: Windows Server 2012 R2
      SQL server: SQL Server 11.03128 (source and destination on the same local machine)
      Database compatibility level: SQL Server 2012 (110)

      We: 
      Started the Copy Database Wizard.
      Set the source server to "Source server"
      Chose use Windows authentication for source (We tried to use SQL Server Authentication but achieved the same results.)
      Set destination server to "Source server" (both databases should be on the same server).
      Chose use Windows authentication for destination (We tried to use SQL Server Authentication but achieved the same results.)
      Chose use the SQL Management Object method (Important! The use of the detach and attach method works, but it is unacceptable for us to shut down the database to make a copy) 
      Set the name for destination database to "new_db" 
      Checked if destination database files’ status are OK (they both are)
      Chose drop any database on the destination server with the same name, then continue with the database transfer, overwriting existing database files. 
      Kept the default package name and check the "Save transfer logs?" box.
      Chose run immediately (tried to choose schedule but it made no difference)
      Used the SQL Server Agent Service Account as the Integration Services Proxy account

      Both services SQLSERVER and SQLSERVERAGENT are started by a local administrator account.

      After about 2 minutes the Execute SQL Server Agent job stops with an error.

      The following is the entry in the event log:

      Log Name:      Application
      Source:        SQLISPackage110
      Date:          2014-04-28 11:34:13
      Event ID:      12550
      Task Category: None
      Level:         Error
      Keywords:      Classic
      User:          ServerName\Administrator
      Computer:      ServerName.domain.com
      Description:
        Event Name: OnError
       Message: An error occurred while transferring data. See the inner exception for details.
      StackTrace:    at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
         at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer()
      InnerException-->Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
      CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
      StackTrace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
         at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
         at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
         at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
         at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
         at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
         at Microsoft.SqlServer.Management.Smo.Transfer.ExecuteStatements(SqlConnection destinationConnection, IEnumerable`1 statements, SqlTransaction transaction)
         at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
      InnerException-->The wait operation timed out

    However , I am not sure to have really understood the last error message

    "The wait operation timed out"I have never seen this kind of error message. Maybe , it could mean that there was a timeout on the increase of the size of the transaction log. I will do some research and if I find something , I will post it.

    Thanks to have replied quickly and have a nice day.

    PS : I have never really understood the difference between to create a feedback on a page of the BOL and to create a requirement thru https://connect.microsoft.com/SQLServer/.

    Maybe , a question of duration between the creation of the feedback or the requirement and the modification of the BOL ?

    If someone could give me a full explanation , It would be useful for me as it is a current habit for to face this kind of problems when a new version of SQL Server is released as I like to test most of the SMO classes.

    Thanks beforehand.


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    Friday, May 23, 2014 11:41 AM