Tải bản đầy đủ - 0 (trang)
4-15. Importing Sybase ASE Data on a Regular Basis

4-15. Importing Sybase ASE Data on a Regular Basis

Tải bản đầy đủ - 0trang

Chapter 4 ■ SQL Databases



5.



Enter the username and password.



6.



Select the database (Initial Catalog) you wish to connect to.



7.



Click OK.



8.



Extend and finish the SSIS package with an appropriate destination.



You can then import data from Sybase ASE into SQL Server.



How It Works

Once again, the art here is to ensure that the Sybase OLEDB provider is installed and functioning correctly.

With the provider up and running, connecting to Sybase ASE and selecting data for import is easy. Virtually the

only trick to know is that you must add a colon ( : ) and the Sybase ASE port number to the server name for the

connection manager to work properly.



Hints, Tips, and Traps





You can also use the Sybase ODBC provider (assuming that it is installed on the SQL

Server). You will have to create a DSN first, and then use this with the ODBC source in a

Data Flow task.



4-16. Loading Teradata Data

Problem

You have data stored in a Teradata database that you need to load into SQL Server Enterprise edition.



Solution

Download and install the Attunity SSIS Connector for Teradata. Then load the data using an SSIS Data Flow task.

1.



Download the Attunity SSIS Connector for Teradata that corresponds to your

environment (32-bit or 64-bit). They are currently available from

www.microsoft.com/en-gb/download/details.aspx?id=29284.



2.



Double-click the .msi file and install the connector. You can modify some of the

installation parameters, but accepting the defaults is nearly always easier.



3.



In an SSIS package, right-click inside the Connection Managers tab. Select MSTERA

in the Add SSIS Connection Manager dialog box. The dialog box should look like

Figure 4-40.



232

www.it-ebooks.info



Chapter 4 ■ SQL Databases



Figure 4-40.  Adding an Attunity SSIS connection manager for Teradata

4.



Click OK. Add all the required connection parameters. The dialog box should look

like Figure 4-41—but with your specific connection parameters, of course.



233

www.it-ebooks.info



Chapter 4 ■ SQL Databases



Figure 4-41.  Configuring the Attunity SSIS connection manager for Teradata



234

www.it-ebooks.info



Chapter 4 ■ SQL Databases



5.



Add a Data Flow task to the SSIS package. Double-click to edit.



6.



Double-click Source Assistant in the SSIS toolbox.



7.



Select Teradata as the source type in the left pane. Select the Teradata connection

manager that you just created in the right pane. The dialog box should look like

Figure 4-42.



Figure 4-42.  Adding a Teradata Source using the Attunity Teradata provider for SSIS

8.



Click OK. An Attunity Teradata source component is added to the Data Flow pane.

Double-click to edit.



9.



Ensure that the required connection manager is selected. Then select the required

data access mode (Table or SQL command).



10.



Select the table or view—or enter the SQL SELECT statement, and click OK.



11.



Add a destination component, connect the source to it, and map the columns. Since

this aspect of SSIS is handled in other recipes (1-7, for instance), I will not explain all

the details. The Data Flow pane should look something like Figure 4-43.



235

www.it-ebooks.info



Chapter 4 ■ SQL Databases



Figure 4-43.  The complete Teradata data flow

You can now run your Teradata data import.



How It Works

While it is possible to use the Teradata ODBC driver to connect to Teradata and load data into SQL Server, in

my opinion, it is much easier to use the Attunity-developed Teradata Connector, which can be used with the

Enterprise edition of SQL Server. Once downloaded and installed, it makes connection to Teradata extremely

simple. You could need the help of a Teradata DBA, however, when it comes to configuring the connection

correctly, because a discussion of the available connection mechanisms and other Teradata subtleties are beyond

the scope of this book.



4-17. Sourcing Data from PostgreSQL

Problem

You want to load data that is currently in a PostgreSQL database into SQL Server.



Solution

Install and configure the PostgreSQL ODBC driver. Use this with an SSIS or T-SQL-based solution.

1.



Install the PostgreSQL ODBC driver from the PgFoundry.org web site.



2.



Launch the ODBC Data Source Administrator (odbcad32.exe in %SystemRoot%\

system32\ or Control Panel ➤ Administrative Tools ➤ Data Sources ODBC). Click the

System DSN tab. You should see the dialog box shown in Figure 4-44.



236

www.it-ebooks.info



Chapter 4 ■ SQL Databases



Figure 4-44.  Configuring a PostgreSQL ODBC driver

3.



Click Add. Select the PostgreSQL ODBC driver.



4.



Click Finish. The ODBC Connector dialog box will appear. Configure the PostgreSQL

ODBC driver so that it contains the elements shown in Figure 4-44. You will use your

own specific parameters, of course.



5.



Save your changes.



How It Works

There is an excellent and functional ODBC driver available to download from the PostgreSQL web site (www.

postgresql.org), which, once configured, allows you to use SSIS, linked servers, OPENROWSET, and OPENQUERY

without any difficulties. As was the case with DB2 and MySQL, no client software is required, which certainly

simplifies matters.

So, to avoid fruitless repetition, and assuming that you have downloaded the latest version of this driver, all you

have to do is to create a DSN as described for MySQL—only configured as in Figure 4-44 (step 4 for DSN setup).

The configuration elements are largely self-explanatory, but nonetheless a concise description is given

in Table 4-2.



237

www.it-ebooks.info



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

4-15. Importing Sybase ASE Data on a Regular Basis

Tải bản đầy đủ ngay(0 tr)

×