Working with SQL Server Integration Services



Similar documents
TAMUS Terminal Server Setup BPP SQL/Alva

Developing Own Crystal Reports

Excel Reports and Macros

How to Copy A SQL Database SQL Server Express (Making a History Company)

Crystal Reports Payroll Exercise

Windows XP File Management

Microsoft PowerPoint 2008

ACCESSING IBM iseries (AS/400) DB2 IN SSIS

Using SSH Secure Shell Client for FTP

SQL Server Integration Services with Oracle Database 10g

Video Administration Backup and Restore Procedures

Microsoft Access 2010 handout

Installing Windows Server Update Services (WSUS) on Windows Server 2012 R2 Essentials

VoIP Quick Start Guide

Appendix 1 Install RightNow on your PC

Adobe Acrobat: Creating Interactive Forms

Abstract. For notes detailing the changes in each release, see the MySQL for Excel Release Notes. For legal information, see the Legal Notices.

Exploring SQL Server Data Tools in Visual Studio 2013

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

eshuttle Dictate Manual Software Version 1.0

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

Database Forms and Reports Tutorial

Table of Contents. 1. Content Approval...1 EVALUATION COPY

Welcome to CSU The Software Used To Data Conference.

The basic steps involved in installing FLEETMATE Enterprise Edition and preparing it for initial use are as follows:

Steps for using MagicConnect

Technical Bulletin. SQL Express Backup Utility

Instructions for Creating an Outlook Distribution List from an Excel File

Transitioning from TurningPoint 5 to TurningPoint Cloud - LMS 1

MICROSOFT OUTLOOK 2010 WORK WITH CONTACTS

Steps for using MagicConnect

A database is a collection of data organised in a manner that allows access, retrieval, and use of that data.

DESKTOP CLIENT CONFIGURATION GUIDE BUSINESS

Navigation: Dashboard Definition Wizard

Smart Sync. Computer Classroom Management Software. What is SMART Sync? Table of Contents

KEYWORDS InteractX, database, SQL Server, SQL Server Express, backup, maintenance.

WebSphere Business Monitor V6.2 Business space dashboards

BID2WIN Workshop. Advanced Report Writing

Getting Started Guide. Trimble Accubid Enterprise Software

Appendix A How to create a data-sharing lab

Netmail Search for Outlook 2010

Introduction to Microsoft Access 2013

Hamline University Administrative Computing Page 1

TAMUS Remote Desktop Setup For BPP SQL & Alva

Advanced Presentation Features and Animation

Lync for Mac Get Help Guide

Exercise Safe Commands and Audit Trail

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

As your financial institution completes its system conversion, you

WebSphere Business Monitor V7.0 Business space dashboards

Virtual Office Remote Installation Guide

Schoolwires Staff Website Reference Guide

Getting a Free Comodo Certificate

Setting up an MS SQL Server for IGSS

Transitioning from TurningPoint 5 to TurningPoint Cloud - NO LMS 1

Microsoft Outlook 2007 Calendar Features

Time & Expense Entry WalkThrough

Utilities ComCash

SQL Server Integration Services Using Visual Studio 2005

Changing Your Cameleon Server IP

Creating Forms With Adobe LiveCycle Designer 8.2

Oracle Business Intelligence Publisher: Create Reports and Data Models. Part 1 - Layout Editor

PC Agent Quick Start. Open the Agent. Autonomy Connected Backup. Version 8.8. Revision 0

WebSphere Business Monitor V6.2 KPI history and prediction lab

Introduction to Microsoft Access 2003

Using Spreadsheets, Selection Sets, and COGO Controls

Microsoft Excel 2013: Using a Data Entry Form

Introduction to Microsoft Access 2010

How to Configure Windows 8.1 to run ereports on IE11

Using the Query Analyzer

USING STUFFIT DELUXE THE STUFFIT START PAGE CREATING ARCHIVES (COMPRESSED FILES)

Subscribe to RSS in Outlook Find RSS Feeds. Exchange Outlook 2007 How To s / RSS Feeds 1of 7

Using Remote Web Workplace Version 1.01

Personal Call Manager User Guide. BCM Business Communications Manager

Using SSH Secure File Transfer to Upload Files to Banner

SonicWALL CDP Local Archiving

Microsoft Office Access 2007 Basics

such as USB drives, connected servers, DVDs, CDs, configure file labels, and the information that appears in the Finder window sidebar.

Accounts Payable Workflow Guide. Version 11.2

SQL Server 2005: Report Builder

Microsoft PowerPoint 2010

Enterprise Reporting Advanced Web Intelligence Training. Enterprise Reporting Services

Web Intelligence User Guide

To successfully initialize Microsoft Outlook (Outlook) the first time, settings need to be verified.

Fleet Manager Quick Guide (Non Maintenance Mode)

GETTING STARTED GUIDE 4.5. FileAudit VERSION.

BACKUP UTILITY FOR TIMEFORCE

Migrating MSDE to Microsoft SQL 2008 R2 Express

MicroStrategy Desktop

client configuration guide. Business

Converting InfoPlus.21 Data to a Microsoft SQL Server 2000 Database

1 of 10 1/31/2014 4:08 PM

TimeValue Software Due Date Tracking and Task Management Software

Sync Appointments from the Schedule Certifications Screen

What is OneDrive for Business at University of Greenwich? Accessing OneDrive from Office 365

Using SQL Reporting Services with Amicus

ProjectWise Explorer V8i User Manual for Subconsultants & Team Members

Legal Notes. Regarding Trademarks KYOCERA Document Solutions Inc.

Lab 02 Working with Data Quality Services in SQL Server 2014

TM Online Storage: StorageSync

Transcription:

SQL Server Integration Services (SSIS) is a set of tools that let you transfer data to and from SQL Server 2005. In this lab, you ll work with the SQL Server Business Intelligence Development Studio to develop and run a SSIS transform. When done, you will have transferred a database table from the AS/400 to SQL Server 2005. Create a new database in SQL Server Open the Microsoft SQL Server Management Studio. Connect to the SQL Server database server that is configured for this course. In the SQL Server Management Studio, expand the server name, then expand the Databases item. Right-click on the Databases item and select the New Database menu item as shown in Figure 1. Figure 1: Select the New Database option to create a test database in SQL Server. In the New Database dialog (Figure 2), enter a unique name for the database. Leave all of the other options set to their defaults and click the OK button. ssis001 Figure 2: Enter the name of the database, click the OK button. ssis002 1

Verify that your database is listed in SQL Server, as shown in Figure 3. Expand the Tables item to verify that there are no tables currently in your test database. ssis003 Figure 3: Verify that your database is in SQL Server. You can leave the SQL Server Management Studio program open. Minimize it so that it is not displayed on your Windows desktop. Start a SQL Server Integration Services Project Locate the SQL Server Business Intelligence Development Studio program as shown in Figure 4. If you don t have the program installed on your PC, you will need to install it from the SQL Server 2005 DVD in the Tools section. Figure 4: Start the SQL Server Business Intelligence Development Studio. ssis011 2

The Business Intelligence Development Studio opens a version of Visual Studio 2005, as shown in Figure 5. Figure 5: The Business Intelligence Development Studio opens a version of Visual Studio 2005. Click the Create Project item as shown in Figure 5 to start a new project. In the New Project dialog (Figure 6), select Business Intelligence Projects, Integration Services Project. Enter a name and location for your project, then click the OK button. ssis012 ssis013 Figure 6: Select Business Intelligence Projects, Integration Services Project. Enter a name and location for the project. 3

Visual Studio now displays your project in the Solution Explorer, as shown in the upper right corner of Figure 7. The design surface is set to use the tools shown in the Toolbox (left side), which are specifically designed to work with SQL Server data tasks. Figure 7: Visual Studio now displays your project in the Solution Explorer (upper right) and opens the design surface and toolbox for this type of project. Create connections to your AS/400 and SQL Server Locate the Connection Managers pane near the bottom of the Control Flow design surface. Rightclick within that pane and select the New OLE DB Connection item, as shown in Figure 8. ssis014 Figure 8: Right-click in the Connection Managers pane and select the New OLE DB Connection item. ssis015 4

In the Configure OLE DB Connection Manager dialog (Figure 9), click the New button. ssis016 Figure 9: Click the New button to add a new OLE DB Connection Manager. In the Connection Manager dialog (Figure 10), click the Native OLE DB\SQL Native Client and select the IBMDASQL OLE DB Provider, as shown in the figure. Click the OK button to close the selection list. Figure 10: Select the IBMDASQL OLE DB Provider as the type of OLE DB provider for the connection to the AS/400. ssis017 5

Back in the Connection Manager (Figure 11), specify the name of your AS/400 system. Enter your AS/400 user name and password, then click the Test Connection button. You should see a message box indicating a successful connection. Close the message box, then click OK to exit the Connection Manager. Figure 11: Enter the server name of the AS/400 and your user ID and password. Click the Test Connection button to verify the connection. Back in the Configure dialog (Figure 12), verify that a connection was added for your AS/400. Click the New button again to add the SQL Server connection. ssis018 Figure 12: Verify that your AS/400 connection is added. Click the New button to add a connection for SQL Server. ssis019 6

Verify that the SQL Native Client provider is selected in the Connection Manager, as shown in Figure 13. Click the drop-down list and select the SQL Server from the list/ ssis020 Figure 13: Verify that the Provider is SQL Native Client, then select the SQL Server name. Select or enter the name of your SQL Server database, as shown in Figure 14. ssis021 Figure 14: Select the test database you created and test the connection. Click the OK button to close the Connection Manager. 7

Verify that you have two data connections, as shown in Figure 15. Click the OK button to close the dialog. ssis022 Figure 15: Verify that your two connections are listed, then click the OK button. Verify that the two connections are now shown in the Connection Managers panel in Visual Studio, as shown in Figure 16. Figure 16: Back in Visual Studio, verify that the two connections are listed in the Connection Managers panel. ssis023 8

Add a Data Flow Task to the project Verify that the Control Flow tab is the currently selected tab (at the top of the Visual Studio design surface). In the Toolbox, locate the Data Flow Task tool in the Control Flow Items section. When you hover the mouse over the tool, you will see a description of the tool, as shown in Figure 17. Figure 17: Locate the Data Flow Task tool in the Control Flow Items section of the Toolbox. Drag-and-drop a Data Flow Task tool onto the Control Flow design surface, as shown in Figure 18. ssis024 Figure 18: Drag-and-drop the Data Flow Task onto the design surface. ssis025 9

Add work items to the Data Flow task Click the Data Flow tab at the top of the design surface, as shown in Figure 19. Note that when you click the tab, the Toolbox changes to show tools that are used with that type of task. ssis031 Figure 19: Click the Data Flow tab to switch the design surface. Locate the OLE DB Source in the Data Flow Sources section of the Toolbox, and drag-and-drop the tool onto the Data Flow design surface, as shown in Figure 20. Figure 20: Drag-and-drop the OLE DB Source tool onto the design surface. ssis032 10

Double-click on the OLE DB Source icon in the design surface to open the OLE DB Source Editor, as shown in Figure 21. Verify that the Connection Manager item is selected (left-side column). Select your AS/400 OLE DB connection manager, specify the Data access mode as SQL command, then enter the following for the SQL command text: select * from qiws.qcustcdt Figure 21: Select the OLE DB connection manager that you created for the AS/400, set Data access mode to SQL command and enter the SQL command text. After entering the SQL command, click the Preview button. You will see the data that is in the AS/400 table. Close the Preview window after viewing the data. ssis033 11

Click the Columns item in the left-side column (Figure 22). You will see the list of columns in the database table that will be used in the data transfer. If you don t want to transfer a column, remove the check mark from the list of columns. Figure 22: Click the Columns item to display the list of database columns that will be used. Click the OK button to close the OLE DB Source Editor dialog. In the Toolbox, scroll down to the Data Flow Destination section (Figure 23). Locate the OLE DB Destination tool and drag-and-drop it onto the design surface. ssis034 Figure 23: Drag-and-drop an OLE DB Destination from the Data Flow Destinations section of the Toolbox. ssis035 12

If the message box shown in Figure 24 is displayed, click the Yes button. ssis036 Figure 24: Click the Yes button when this message is displayed. In the design surface, click the OLE DB Source icon to select it (Figure 25). You should see two arrows appear below the icon. ssis041 Figure 25: Click the OLE DB Source to select it. A connection arrow (green arrow) appears below the icon. Drag-and-drop the green (connection) arrow from the OLE DB Source to the OLE DB Destination. When you drop the arrow onto the Destination, you will see a connecting line, similar to that shown in Figure 26. Figure 26: Drag the connection arrow and drop it onto the OLE DB Destination. ssis042 13

Double-click on the OLE DB Destination icon to open the OLE DB Destination Editor (Figure 27). Select the connection manager for the SQL Server, specify Table or View as the Data access mode, then click the New button for the table. ssis043 Figure 27: In the OLE DB Destination Editor, verify that the SQL Server OLE DB connection manager is selected, Table or view is selected for Data access mode, then click the New button for the table. In the Create Table dialog, change the table name to [QCUSTCDT] as shown in Figure 28. Click the OK button after making the change. Figure 28: Change the table name to QCUSTCDT, then click the OK button. CAUTION: when you click the OK button, the table is created in SQL Server. If you entered the table name incorrectly, go to the SQL Server Management Studio and delete the incorrectly named table from the database, then return here and repeat the previous steps. ssis045 14

Click the Mappings item in the left-side column (Figure 29). You should see that all of the columns in the source table (AS/400) are mapped to corresponding columns on the destination table (SQL Server). ssis046 Figure 29: Click the Mappings item to view the column mappings between the source and destination tables. Click the OK button to close the OLE DB Destination Editor dialog. 15

Run the Data Transform Back in Visual Studio, click the Start Debugging icon (Figure 30) or press F5 to start running the data transform. ssis047 Figure 30: Click the Start Debugging icon to run the data transfer. Because you are working with a small database file, the transform should run quickly. Visual Studio changes to show you the run-time environment as shown in Figure 31. ssis048 Figure 31: The data transfer runs. This is what the end result looks like. 16

Click the Progress tab. You will see the results of the data transform and the total run-time, as shown in Figure 32. ssis049 Figure 32: Click the Progress tab to view the results of running the data transfer. To exit the run-time environment, you can click the link shown in Figure 33 or you can click the Debug, Stop Debugging menu item. ssis050 Figure 33: Click the link to return to design mode. Run the data transfer again. 17

Add a Control Flow item to clear the table before the transfer Now go to the SQL Server Manager Studio. Locate your database and the table. Right-click the table name and select the Open Table menu item. You will see the data that was copied from the AS/400 in your table, as shown in Figure 34. If you ran the transfer twice, you will see that the data is duplicated. Figure 34: Go to the SQL Server Management Studio. You should now see the QCUSTCDT table in your database. Right-click the table and select the Open Table option to view it. Go back to Visual Studio. Click the Control Flow tab as shown in Figure 35. ssis051 Figure 35: Back in Visual Studio, click the Control Flow tab. ssis061 18

In the Control Flow Items section of the Toolbox, locate the Execute SQL Task item and dragand-drop it onto the design surface, as shown in Figure 36. Figure 36: Drag-and-drop the Execute SQL Task icon onto the design surface. Right-click the Execute SQL Task icon and select the Edit item from the pop-up menu, as shown in Figure 37. ssis062 Figure 37: Right-click the Execute SQL Task icon and select the Edit menu item. ssis063 19

In the Execute SQL Task Editor dialog (Figure 38), click the Connection item and select the SQL Server connection. In the SQLStatement item, enter the following statement: DELETE FROM QCUSTCDT Figure 38: Select the connection to your SQL Server database. Enter an SQL DELETE statement to delete all rows from the SQL Server QCUSTCDT table. Click the OK button to close the Execute SQL Task Editor. Back in the design surface, click the Execute SQL Task icon to select it. Drag-and-drop its connection arrow (green arrow) to the Data Flow Task icon, as shown in Figure 39. This indicates that the SQL task is to be run before the Data Flow task. ssis064 Figure 39: Drag-and-drop a connection from the Execute SQL Task to the Data Flow Task. Run the data transform again (click the Start icon or press F5). After the transform completes, go to SQL Server Management Studio and open your table. You should see that it has only one set of the rows in it. ssis065 20

Add a Data Viewer to the Data Transform data flow Although you usually don t need to monitor the data flow as it is happening, you can add a data viewer to a data transform task. By adding a viewer, you can see the data as it is being transferred. This can help you debug data transforms when you create a new transform. Click the Data Flow tab to open its design surface. Right-click the connection between the OLE DB Source and the OLE DB Destination and select the Data Viewers item as shown in Figure 40. Figure 40: Right-click the connection between the Data Flow icons and select the Data Viewers item. In the Data Flow Path Editor (Figure 41), be sure the Data Viewers item is selected in the left column, then click the Add button. ssis071 Figure 41: Verify that the Data Viewers item is selected, then click the Add button. ssis072 21

In the Configure Data Viewer dialog (Figure 42), select the Grid type, then click the OK button. ssis073 Figure 42: Select the Grid type of data viewer. Back in the design surface, you will see a small icon for the data viewer, as shown in Figure 43. ssis074 Figure 43: The data viewer icon is now shown as part of the data flow. 22

Start the data transform again. This time, you will see a small floating window in the run-time view, similar to that shown in Figure 44. You will not be able to view the contents of the window until it is docked. When you grab the window and move it, Visual Studio displays docking stations (blue icons with arrows). Drop the window onto one of the docking stations and release the mouse. The viewer window attaches to the position in Visual Studio nearest the docking station. Figure 44: When you run the data transfer, the data viewer may appear as a floating window. Move it to one of the "docking points" shown in Visual Studio and drop it on the docking point. ssis075 23

Figure 45 shows the data viewer docked near the top of Visual Studio. You can see the rows of data that were transferred. ssis076 Figure 45: You can now see the rows that are transferred when you run the data transfer. 24