Ir al contenido

Data Transformation Services

De Wikipedia, la enciclopedia libre
Esta es una versión antigua de esta página, editada a las 13:01 23 oct 2014 por 190.248.130.118 (discusión). La dirección URL es un enlace permanente a esta versión, que puede ser diferente de la versión actual.

Data Transformation Services, or DTS, es un conjunto de objetos y utilidades para permitir la automatización de extracción transformación y carga a o desde una base de datos . Los objetos son paquetes DTS y sus componentes, y sus utilidades son llamadas herramientas DTS. DTS estaba incluido en las versiones más antiguas de Microsoft SQL Server, y se usaba casi siempre en base de datos SQL, sin embargo puede ser usado independientemente con otras bases de datos.

DTS permite que los datos puedan ser transformados y cargados desde fuentes heterogeneas usando OLE DB, ODBC, o archivos de texto, dentro de cualquier base de datos soportada. DTS también puede automatizar la importación o transformación de datos en una forma calendarizada y puede ejecutar funciones adicionales como archivos FTPing y ejecutar programas externos. Adicionalmente, DTS provee un método alternativo de control de versión y respaldo para paquetes cuando se usan en unión a una versión de sistema de control, tal como Microsoft Visual SourceSafe.

Historia

En SQL Server versión 6.5 y anteriores, los Administradores de base de datos (DBAse) usan SQL Server Transfer Manager y Programa Bulk Copy, incluido en SQL Server, para transferir datos. Esas herramientas tenían defectos significativos, y muchos DBAs usaban herramientas de terceros como Pervasive Data Integrator para transferir datos más fácilmente y flexiblemente. Cuando SQL Server 7 fue liberado, "Data Transformation Services" fue empacado con junto con el para remplazar esas herramientas.

SQL Server 2000 expandió la funcionalidad DTS de varias maneras. Muchos tipos de tareas fueron hechas, incluyendo la habilidad para archivos FTP, mover bases de datos o compomentes de bases de datos, y añadir mensajes dentro de Microsoft Message Queue. Paquetes DTS pueden ser grabados como un archivo Visual Basic en SQL Server 2000, y este puede ser expandido para grabar en en cualquier lenguaje COM-compliant (cumple con COM). Los paquetes son también integrados dentro de Windows 2000 security, las herramientas DTS fueron hechas para uso más amigable, y las tareas pueden aceptar parámetros de ingreso y salida.

DTS viene con todas las ediciones de SQL Server 7 y 2000, pero fue remplazado por SQL Server Integration Services en el lanzamiento de Microsoft SQL Server 2005.

Paquetes DTS

El paquete DTS es el componente lógico fundamental de un DTS; cada objeto DTS es un child component de un paquete. Packages are used whenever one modifies data using DTS. All the metadata about the data transformation is contained within the package. Paquetes pueden ser grabados directamente en SQL Server, o pueden ser grabados en el Microsoft Repository o en archivos COM. SQL Server 2000 también provee un programador para grabar paquetes en Visual Basic u otro archivo de lenguaje (cuando es grabado en un archivo VB, el paquete es propiamente escrito -- eso es, un VB script es ejecutado para dinámicamente crear objetos del paquete y sus objetos componentes).

Un paquete puede contener cualquier número de connection objects, pero no debe contener ninguno. Esto permite al paquete leer datos desde cualquier origen de datos OLE DB-compliant, y puede ser expandido para manejar otro tipo de datos. The functionality of a package is organized into tasks and steps.

A DTS Task is a discrete set of functionalities executed as a single step in a DTS package. Each task defines a work item to be performed as part of the data movement and data transformation process or as a job to be executed.

Data Transformation Services supplies a number of tasks that are part of the DTS object model and that can be accessed graphically through the DTS Designer or accessed programmatically. These tasks, which can be configured individually, cover a wide variety of data copying, data transformation and notification situations. For example, the following types of tasks represent some actions that you can perform by using DTS: executing a single SQL statement, sending an email, and transferring a file with FTP.

A step within a DTS package describes the order in which tasks are run and the precedence constraints that describe what to do in the case of failure. These steps can be executed sequentially or in parallel.

Packages can also contain global variables which can be used throughout the package. SQL Server 2000 allows input and output parameters for tasks, greatly expanding the usefulness of global variables. DTS packages can be edited, password protected, scheduled for execution, and retrieved by version.

Herramientas DTS

Las herramientas DTS incluidas con SQL Server incluyen, asistentes DTS, diseñadores DTS e interfaces de programación DTS.

Asistentes DTS

The DTS wizards can be used to perform simple or common DTS tasks. These include the Import/Export Wizard and the Copy of Database Wizard. They provide the simplest method of copying data between OLE DB data sources. There is a great deal of functionality that is not available by merely using a wizard. However, a package created with a wizard can be saved and later altered with one of the other DTS tools.

A Create Publishing Wizard is also available to schedule packages to run at certain times. This only works if SQL Server Agent is running; otherwise the package will be scheduled, but will not be executed.

Diseñador DTS

The DTS Designer is a graphical tool used to build complex DTS Packages with workflows and event-driven logic. DTS Designer can also be used to edit and customize DTS Packages created with the DTS wizard.

Each connection and task in DTS Designer is shown with a specific icon. These icons are joined with precedence constraints, which specify the order and requirements for tasks to be run. One task may run, for instance, only if another task succeeds (or fails). Other tasks may run concurrently.

The DTS Designer has been criticized for having unusual quirks and limitations, such as the inability to visually copy and paste multiple tasks at one time. Many of these shortcomings have been overcome in SQL Server Integration Services, DTS's successor.

DTS Query Designer

A graphical tool used to build queries in DTS.

DTS Run Utility

DTS Packages can be run from the command line using the DTSRUN Utility.
The utility is invoked using the following syntax:

dtsrun /S server_name[\instance_name]
        { {/[~]U user_name [/[~]P password]} | /E }
    ]
    {    
        {/[~]N package_name }
        | {/[~]G package_guid_string}
        | {/[~]V package_version_guid_string}
    }
    [/[~]M package_password]
    [/[~]F filename]
    [/[~]R repository_database_name]
    [/A global_variable_name:typeid=value] 
    [/L log_file_name]
    [/W NT_event_log_completion_status]
    [/Z] [/!X] [/!D] [/!Y] [/!C]
]


When passing in parameters which are mapped to Global Variables, you are required to include the typeid. This is rather difficult to find on the Microsoft site. Below are the TypeIds used in passing in these values.

Type typeid
Boolean 11
Currency 6
Date 7
Decimal 14
HRESULT 25
Int 22
Integer (1-byte) 16
Integer (8-byte) 20
Integer (small) 2
LPWSTR 31
Pointer 26
Real (4-byte) 4
Real (8-byte) 5
String 8
Unsigned int (1-byte) 17
Unsigned int (2-byte) 18
Unsigned int (4-byte) 19
Unsigned int (1-byte) 21
Unsigned int 23

Véase también

Referencias

  • Chaffin, Mark; Knight, Brian; and Robinson, Todd (2003). Professional SQL Server 2000 DTS. Wrox Press (Wiley Publishing, Inc.). ISBN 0-7645-4368-7. 

Enlaces externos