DTS

  • Set objFileSystem = CreateObject("Scripting.FileSystemObject")

    objFileSystem.MoveFile objControlFile.parentfolder & "\" & mid(strLine, 1, 24),strProcessedDir & "file."& strFileExtension

    This code works fine. Sometimes if the size of the file is very large it timesout immediately. Is there any way i can increase the timeout in this process.

    I am running a DTS script to move files from one folder to another . I run this thru a job. It timesout quiet freq. Please advise

  • I am not sure if this works. Try to set the value for the Command Timeout property to a huge value in the "Edit All Package Properties" diaolog box.

    To navigate to this dialog box:

    1. Open your Package in Design mode.

    2. Select Package -> Disconnected Edit from the menu.

    3. Choose "Tasks" -> select the task in question -> Select Destination Command Properties and under that you will see the "Command Timeout" Property.

    Hope it helps.

    Venky

  • I couldn't find any property like that in my DTS Tasks Disconnected Edit properties. Can you please explain me in detail, where can I find this property setting..

    Thanks

  • 1. Click the Package Menu

    2. Select Disconnected Edit menu option

    3. In the Edit All Package Properties dialog, expand the Tasks Item.

    4. Under that expand, DTSTask_DTSDataPumpTask_1

    5. Under that expand look for Source Command Properties / Destination Command Properties.

    6. Depending on what whether your DTS task is opeing the file under Source or Destination or under both look for Command TimeOut Property.

    7. Choose the Command Timeout property and you will see a value option on the right side.

    8. Try setting the value to some huge no.

    Again I am not sure if this will work. But play with it and see if it helps.

    Venky

  • I think , I missing something here to explain in detail.

    I just have only one task(ActiveX Script) in my package. I am creating a FileSystemObject and using that object , I move the file from one system to another loaction. If the file size is small it works great. If the file size is about 1 GB or more, i am getting timedout...

    I didn't find any Destination or Source Task as well I couldn't find Command Timeout property any where in my code.

    Can you please advise....

    Thanks

  • Hey I am sorry, I didn't realise you are using an ActiveX script. I am such a fool.

    I made you chase a ghost. There is no such property for an ActiveX script.

    Once again my apologies.

  • I run quite a few DTS jobs every morning and at one time we have a similar issue. We receive zip files from the clients and those files have to be run to update their database.

    This said, we use the following ActiveX script to avoid the timeout when those files were being unzipped. Maybe this can help a little. there you go, good luck!!!

    /*____________________________________*/

    '**********************************************************************

    ' Visual Basic ActiveX Script

    '************************************************************************

    Function Main()

    Dim fso

    Dim folInUse

    Dim filInUse

    Dim strFileName

    Dim datDateToCompare

    Set fso = CreateObject( "Scripting.FileSystemObject" )

    Set folInUse = fso.GetFolder(DTSGlobalVariables("FolderPath").Value)

    For Each filInUse in folInUse.Files

    If filInUse.DateCreated >datDateToCompare Then

    strFileName = filInUse.Name

    datDateToCompare = filInUse.DateCreated

    End If

    Next

    DTSGlobalVariables("DateCurrent").Value = Mid( strFileName , 5 , 4 )

    Main = DTSTaskExecResult_Success

    End Function

    /*____________________________________*/

    This script loops while the file is being use.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply