------------------------------------------------------------------
--                                                              --
--  File:  BulkInsert_1.SQL                                     --
--         Microsoft TPC-E Benchmark Kit Ver.   1.12.0-1022        --
--         Copyright Microsoft 2008, 2009                       --
--                                                              --
--         This script is generated by the Setup_tpce.vbs file  --
--                                                              --
------------------------------------------------------------------
 
USE  tpce
GO
 
SET NOCOUNT ON
GO
 
PRINT 'BULK INSERT CHARGE - STREAM 1'
GO
BULK INSERT CHARGE
FROM 'v:\Device\flatfile01\01\Charge.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 5,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT CHARGE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT COMMISSION_RATE - STREAM 1'
BULK INSERT COMMISSION_RATE
FROM 'v:\Device\flatfile01\01\CommissionRate.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 240,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT COMMISSION_RATE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT EXCHANGE - STREAM 1'
GO
BULK INSERT EXCHANGE
FROM 'v:\Device\flatfile01\01\Exchange.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 4,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT EXCHANGE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT INDUSTRY - STREAM 1'
GO
BULK INSERT INDUSTRY
FROM 'v:\Device\flatfile01\01\Industry.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 102,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT INDUSTRY - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT SECTOR - STREAM 1'
GO
BULK INSERT SECTOR
FROM 'v:\Device\flatfile01\01\Sector.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 12,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT SECTOR - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT STATUS_TYPE - STREAM 1'
GO
BULK INSERT STATUS_TYPE
FROM 'v:\Device\flatfile01\01\StatusType.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 5,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT STATUS_TYPE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT TAXRATE - STREAM 1'
GO
BULK INSERT TAXRATE
FROM 'v:\Device\flatfile01\01\TaxRate.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 320,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT TAXRATE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT TRADE_TYPE - STREAM 1'
GO
BULK INSERT TRADE_TYPE
FROM 'v:\Device\flatfile01\01\TradeType.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 5,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT TRADE_TYPE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT ZIP_CODE - STREAM 1'
GO
BULK INSERT ZIP_CODE
FROM 'v:\Device\flatfile01\01\ZipCode.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 14741,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT ZIP_CODE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT ACCOUNT_PERMISSION - STREAM 1'
GO
BULK INSERT ACCOUNT_PERMISSION
FROM 'v:\Device\flatfile01\01\AccountPermission.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 195750,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT ACCOUNT_PERMISSION - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT ADDRESS - STREAM 1'
GO
BULK INSERT ADDRESS
FROM 'v:\Device\flatfile01\01\Address.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 40504,
       TABLOCK)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT ADDRESS - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT BROKER - STREAM 1'
GO
BULK INSERT BROKER
FROM 'v:\Device\flatfile01\01\Broker.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 270,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT BROKER - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT COMPANY - STREAM 1'
GO
BULK INSERT COMPANY
FROM 'v:\Device\flatfile01\01\Company.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 13500,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT COMPANY - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT COMPANY_COMPETITOR - STREAM 1'
GO
BULK INSERT COMPANY_COMPETITOR
FROM 'v:\Device\flatfile01\01\CompanyCompetitor.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 40500,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT COMPANY_COMPETITOR - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT CUSTOMER - STREAM 1'
GO
BULK INSERT CUSTOMER
FROM 'v:\Device\flatfile01\01\Customer.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 27000,
       TABLOCK)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT CUSTOMER - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT CUSTOMER_ACCOUNT - STREAM 1'
GO
BULK INSERT CUSTOMER_ACCOUNT
FROM 'v:\Device\flatfile01\01\CustomerAccount.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 135000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT CUSTOMER_ACCOUNT - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT CUSTOMER_TAXRATE - STREAM 1'
GO
BULK INSERT CUSTOMER_TAXRATE
FROM 'v:\Device\flatfile01\01\CustomerTaxrate.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 54000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT CUSTOMER_TAXRATE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT DAILY_MARKET - STREAM 1'
GO
BULK INSERT DAILY_MARKET
FROM 'v:\Device\flatfile01\01\DailyMarket.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 24135975,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT DAILY_MARKET - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT FINANCIAL - STREAM 1'
GO
BULK INSERT FINANCIAL
FROM 'v:\Device\flatfile01\01\Financial.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 270000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT FINANCIAL - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT LAST_TRADE - STREAM 1'
GO
BULK INSERT LAST_TRADE
FROM 'v:\Device\flatfile01\01\LastTrade.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 18495,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT LAST_TRADE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT NEWS_ITEM_TEMP - STREAM 1'
GO
BULK INSERT NEWS_ITEM_TEMP
FROM 'v:\Device\flatfile01\01\NewsItem.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 27000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT NEWS_ITEM_TEMP - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT NEWS_XREF - STREAM 1'
GO
BULK INSERT NEWS_XREF
FROM 'v:\Device\flatfile01\01\NewsXref.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 27000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT NEWS_XREF - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT SECURITY - STREAM 1'
GO
BULK INSERT SECURITY
FROM 'v:\Device\flatfile01\01\Security.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 18495,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT SECURITY - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT WATCH_ITEM - STREAM 1'
GO
BULK INSERT WATCH_ITEM
FROM 'v:\Device\flatfile01\01\WatchItem.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 2727000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT WATCH_ITEM - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT WATCH_LIST - STREAM 1'
GO
BULK INSERT WATCH_LIST
FROM 'v:\Device\flatfile01\01\WatchList.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 27000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT WATCH_LIST - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT CASH_TRANSACTION - STREAM 1'
GO
BULK INSERT CASH_TRANSACTION
FROM 'v:\Device\flatfile01\01\CashTransaction.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 429701760,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT CASH_TRANSACTION - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT HOLDING - STREAM 1'
GO
BULK INSERT HOLDING
FROM 'v:\Device\flatfile01\01\Holding.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 25194240,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT HOLDING - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT HOLDING_HISTORY - STREAM 1'
GO
BULK INSERT HOLDING_HISTORY
FROM 'v:\Device\flatfile01\01\HoldingHistory.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 627056640,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT HOLDING_HISTORY - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT HOLDING_SUMMARY - STREAM 1'
GO
BULK INSERT HOLDING_SUMMARY
FROM 'v:\Device\flatfile01\01\HoldingSummary.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 1348650,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT HOLDING_SUMMARY - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT SETTLEMENT - STREAM 1'
GO
BULK INSERT SETTLEMENT
FROM 'v:\Device\flatfile01\01\Settlement.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 466560000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT SETTLEMENT - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT TRADE - STREAM 1'
GO
BULK INSERT TRADE
FROM 'v:\Device\flatfile01\01\Trade.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 466560000,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT TRADE - STREAM 1'
PRINT ' '
GO
PRINT 'BULK INSERT TRADE_HISTORY - STREAM 1'
GO
BULK INSERT TRADE_HISTORY
FROM 'v:\Device\flatfile01\01\TradeHistory.txt'
WITH ( FIELDTERMINATOR = '|',
       ROWS_PER_BATCH = 1124409600,
       TABLOCK,
       KEEPNULLS)
GO
SELECT 'Rows Inserted:',
@@ROWCOUNT
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT TRADE_HISTORY - STREAM 1'
PRINT ' '
GO
PRINT ' '
PRINT 'FINISHED BULK INSERT - STREAM 1'
GO
