DBMS ไทย บทที่ 20 การ Import – Export ข้อมูล

Preview:

DESCRIPTION

DBMS ไทย บทที่ 20 การ Import – Export ข้อมูล

Citation preview

20 Import Export

20 Import Export

SQL Server Import / Export ( / ) SQL Server SSIS

SSIS Import /Export Wizard

SSIS SQL Server Integration Services SQL Server 2005 Data Transformation Services (DTS SQL Server) Note DTS SQL Server 2005 Object Browser Management>Legacy DTS SQL Server SSIS SQL Server (Flat files)

Microsoft Office Access

Microsoft Office Excel OLE DB

SSIS Export Wizard

Export () Export Export 1. Object Explorer Tasks>Export Data SQL Server Import and Export Wizard Next

2. Microsoft Office Access Microsoft Office Excel Data source SQL Native Client SQL Server

Server name Authentication , Database Next

3. Destination Flat File Destination ( Access Excel )

Destination Flat File Destination File nameLocal, Unicode Code page Export ( Export )

Format 3

Delimited

Fixed width ColumnA 10 , ColumnB 200 Space ( 1 )

Ragged right Fixed width Fixed width Text qualifierColumn manes in first data row4. 2 Copy data from one or more tables or viewsWrite a query to specify the data to transfer Transact-SQL

5. Source table or view ( Export Export Image Binary )Row delimiter ( Format 3 Fixed width ) {CR}{LF} {CR}

(carriage return)

{LF}

(line feed)

Column delimiter ( Format 3 Fixed width Ragged right ) Semicolon{;} Colon{:} Comma{,} Tab{T} Vertical bar{|} ,==, Preview Export

Edit transform

6. Export

Execute immediatelySave SSIS Package

SQL Server msdb SQL Server

File system .dtsx Package Protection level 6

Do not save

Sensitive(sensitive information) (Blank)

Encrypt all with password SQL Server

Encrypt all with user key

Encrypt sensitive with password Encrypt all with password (Sensitive information)

Encrypt sensitive with user key Encrypt all with user key (sensitive information)

Rely on server storage for encryption SQL Server File system

7. , , .dtsx

10. Flat File ,==,

SSIS Import Wizard

SQL Server 1. Object Explorer Tasks>Import Data SQL Server Import and Export Wizard Next

2. Flat File Source Data Source General Flat File, , Format Export Header rows to skip Flat File Flat File

Columns Export Refresh

Advanced Flat File (Text) 200 Suggest Types SQL Server Import

Preview Data rows to skip 1

3. SQL Native Client Destination SQL Server Server name Authentication , Database

4. Orders Preview Edit Mappings

5. Edit Mappings Import ok 4 Next

6. Import

Execute immediatelySave SSIS Package

SQL Server msdb SQL Server

File System .dtsx Package protection level Export 7. , , .dtsx

10. TBlCustomers 2 Import Flat File

Import/Export SSIS .dtsx SQL Server SSIS JOB Import Export SSIS Job

Recommended