SQL Server Performance

Ponerle dinámicamente el path del log a un DTS???

Discussion in 'SQL Server DTS-Related Questions' started by cgarcia, Nov 26, 2003.

  1. cgarcia New Member

    Tengo una variable de entorno de Windows con el path donde están los archivos y los logs y la utilizo en varios lugares del DTS...
    Para poner el log de errores voy a PackageProperties y ahí pongo el path y el nombre del fichero pero como hago para asignarle dinámicamente el path que tiene la variable de entorno??? Con VBScript al principio del DTS leo el valor de la variable y lo asigno a conexiones de texto pero no se como asignárselo al log y si pongo directamente en la caja de texto: %PathCargas%fileCustomer.txt NO me genera el log.
    Como hago para asignarle dinámicamente el path que tiene la variable de entorno???


    Claudio
  2. cgarcia New Member

    Sorry,

    Log file in DTS????
    I have a Windows environment variable... I use it in the DTS with VBScript to assign the path of Text File Connections, but I need to use it to indicate the path of the log file.
    I go to PackageProperties and put for example: %PathExample%fileCustomer.txt and the log file NOT is generate...
    How do I assign it in execution time for the log file???


    Claudio
  3. satya Moderator

    Have you referred to SQL books online for How to Enable Package Logging topic.

    _________
    Satya SKJ
    Moderator
    SQL-Server-Performance.Com
  4. cgarcia New Member

    But If I put in the textbox “ERROR FILE” C:fileCustomer.txt the log is generated correctly but if I put %PathExample%fileCustomer.txt the log isn#%92t generated
    How do I assign the path in execution time for the log file???


    Claudio
  5. Luis Martin Moderator

    Take a look this link, may be help.

    http://www.sqldts.com/

    Luis Martin

    ...Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
    Bertrand Russell
  6. satya Moderator

    In that case you can also log this information to SQL Server tables in msdb. Logging to tables is especially useful, if you want to generate statistics like 'on an average, how much time each step is taking to complete, in your critical DTS package'.

    To configure logging for your package, right click on the package in DTS Designer, select 'Package Properties'. Go to 'Logging' tab. In this tab, specify the error file, as well as the SQL Server to which you want to log the package execution. When logging to SQL Server, the information will be logged into sysdtspackagelog and sysdtssteplog tables in the msdb database.

    HTH

    _________
    Satya SKJ
    Moderator
    SQL-Server-Performance.Com

Share This Page