all groups > sql server dts > july 2003 >
You're in the

sql server dts

group:

how DTS transact begin and commit data



how DTS transact begin and commit data flor_lai
7/21/2003 3:59:24 PM
sql server dts: hi.

I have a DTS to import data from a file. Due to the file is large, it will
take 1-2 mins to import to database.
Step 1: delete data in destination table (Execute SQL Task )
Step 2: Import data to table from a txt file (Text file Source -> Microsoft
OLE DB Provider for SQL Service )
Step 3: done.


During the transaction process, people search the table to find a item , it
return no record because the table is empty. How do I block to customer to
search this table ?
or When they search, Can the query wait for the DTS process done then run
the query ?

How to set the transaction begin and commit in the whole DTS process?

Can I set the transaction begin before execute the delete task , and set the
transaction commit after import the data to the table ?

Thanks for help, I am really appreciated .

Florence

Re: how DTS transact begin and commit data Allan Mitchell
7/22/2003 7:44:26 AM
1. You cannot stop people issuing a SELECT against you table. The locks
taken when inserting will stop/or not them seeing the data
2. The default fetch commit in DTS is "Get the lot and insert it in one go"
Chageable on the last tab of the Data pump task.
3. You can let them wait for DTS by using a control table which DTS at the
start inserts a record in to say "Load in Progress". At the end it adds a
record to say "Finished". Your app will query this table looking for the
entry with the greatest date and only querying if record = "Finished"
4. For transactions look at the package properties and the workflow
properties of the tasks.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtssql/dts_
addf_tx_950f.asp



--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



[quoted text, click to view]

Re: how DTS transact begin and commit data flor_lai
7/23/2003 5:32:41 PM
Thx.

1. How to make a control table?

2. begin transaction

delete from table_name

commit transaction

Before run the commit statement, is the data in table deleted?

before delete the data, do the sql server make a orginal table in the

system?

Thx for help

[quoted text, click to view]

Re: how DTS transact begin and commit data Allan Mitchell
7/24/2003 7:17:52 AM
Read these topics in BOL

mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\acd
ata.chm::/ac_8_md_06_2it2.htm
mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\arc
hitec.chm::/8_ar_sa2_1k9x.htm

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



[quoted text, click to view]

AddThis Social Bookmark Button