dbTalk Databases Forums  

Using DTS to update SQL 2000 tables while a web application has users reading tables at the same time.

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Using DTS to update SQL 2000 tables while a web application has users reading tables at the same time. in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave H
 
Posts: n/a

Default Using DTS to update SQL 2000 tables while a web application has users reading tables at the same time. - 10-16-2003 , 03:33 PM






Hi, I am new to news groups and was told I might get an answer to my
question here...

I have a process that gathers information from our mainframe and then sends
this information via FTP to a SQL server in a CSV file.

I then have several DTS packages that load the CSV files and update my SQL
2000 server using DTS...

My question is - how would I best setup this process so I can update my SQL
tables using DTS while my users are currently logged into the application
that accesses the SQL server?

Right now my processes run within 5 minutes - but during that 5 minute
period I could have several to several hundred users logging in to the
application that does reads on the tables I am update with DTS. In some very
rare cases during that 5 minutes it's possible that a user could Update a
record will DTS is also trying to update a record (or delete).

Again, what is the best approach to eliminate failures - either from a user
perspective or the DTS packages themselves?

If anyone can lead me in the right direction I would really appriciate it.

Thanks....



Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Using DTS to update SQL 2000 tables while a web application has users reading tables at the same time. - 10-16-2003 , 03:51 PM






Usually if you have users accessing the same rows that you need to update
from an import it is best to do the updates in small batches. This will
enable you to lock only a small subset of the rows at any one time and makes
for a much friendlier multi-user app. You can DTS the rows into a staging
table first and then loop thru doing the updates / deletes etc a little at a
time.

--

Andrew J. Kelly
SQL Server MVP


"Dave H" <daveh (AT) psu (DOT) edu> wrote

Quote:
Hi, I am new to news groups and was told I might get an answer to my
question here...

I have a process that gathers information from our mainframe and then
sends
this information via FTP to a SQL server in a CSV file.

I then have several DTS packages that load the CSV files and update my SQL
2000 server using DTS...

My question is - how would I best setup this process so I can update my
SQL
tables using DTS while my users are currently logged into the application
that accesses the SQL server?

Right now my processes run within 5 minutes - but during that 5 minute
period I could have several to several hundred users logging in to the
application that does reads on the tables I am update with DTS. In some
very
rare cases during that 5 minutes it's possible that a user could Update a
record will DTS is also trying to update a record (or delete).

Again, what is the best approach to eliminate failures - either from a
user
perspective or the DTS packages themselves?

If anyone can lead me in the right direction I would really appriciate it.

Thanks....





Reply With Quote
  #3  
Old   
Dave H
 
Posts: n/a

Default Re: Using DTS to update SQL 2000 tables while a web application has users reading tables at the same time. - 10-17-2003 , 06:57 AM



Thanks Andrew...

Are there any settings in DTS I should look out for? I do have it setup so
if any one step fails it won't commit any of the updates... But are there
other settings or best practices I should take care of?

Thanks again,
Dave



"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote

Quote:
Usually if you have users accessing the same rows that you need to update
from an import it is best to do the updates in small batches. This will
enable you to lock only a small subset of the rows at any one time and
makes
for a much friendlier multi-user app. You can DTS the rows into a staging
table first and then loop thru doing the updates / deletes etc a little at
a
time.

--

Andrew J. Kelly
SQL Server MVP


"Dave H" <daveh (AT) psu (DOT) edu> wrote in message
news:%23BucNTClDHA.2068 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi, I am new to news groups and was told I might get an answer to my
question here...

I have a process that gathers information from our mainframe and then
sends
this information via FTP to a SQL server in a CSV file.

I then have several DTS packages that load the CSV files and update my
SQL
2000 server using DTS...

My question is - how would I best setup this process so I can update my
SQL
tables using DTS while my users are currently logged into the
application
that accesses the SQL server?

Right now my processes run within 5 minutes - but during that 5 minute
period I could have several to several hundred users logging in to the
application that does reads on the tables I am update with DTS. In some
very
rare cases during that 5 minutes it's possible that a user could Update
a
record will DTS is also trying to update a record (or delete).

Again, what is the best approach to eliminate failures - either from a
user
perspective or the DTS packages themselves?

If anyone can lead me in the right direction I would really appriciate
it.

Thanks....







Reply With Quote
  #4  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Using DTS to update SQL 2000 tables while a web application has users reading tables at the same time. - 10-25-2003 , 10:52 AM



Sorry for the late reply as I have been away for the last week. The only
way to do the updates in batches is to do them in tsql and not as part of
the import. You would import all the rows into a staging table first (using
DTS, BCP etc) and then loop thru with standard tsql to do the final inserts,
updates or deletes on the production tables. You can do this as a DTS task
or outside the DTS package.

--

Andrew J. Kelly
SQL Server MVP


"Dave H" <daveh (AT) psu (DOT) edu> wrote

Quote:
Thanks Andrew...

Are there any settings in DTS I should look out for? I do have it setup so
if any one step fails it won't commit any of the updates... But are there
other settings or best practices I should take care of?

Thanks again,
Dave



"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote in message
news:utCh4cClDHA.1284 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Usually if you have users accessing the same rows that you need to
update
from an import it is best to do the updates in small batches. This will
enable you to lock only a small subset of the rows at any one time and
makes
for a much friendlier multi-user app. You can DTS the rows into a
staging
table first and then loop thru doing the updates / deletes etc a little
at
a
time.

--

Andrew J. Kelly
SQL Server MVP


"Dave H" <daveh (AT) psu (DOT) edu> wrote in message
news:%23BucNTClDHA.2068 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi, I am new to news groups and was told I might get an answer to my
question here...

I have a process that gathers information from our mainframe and then
sends
this information via FTP to a SQL server in a CSV file.

I then have several DTS packages that load the CSV files and update my
SQL
2000 server using DTS...

My question is - how would I best setup this process so I can update
my
SQL
tables using DTS while my users are currently logged into the
application
that accesses the SQL server?

Right now my processes run within 5 minutes - but during that 5 minute
period I could have several to several hundred users logging in to the
application that does reads on the tables I am update with DTS. In
some
very
rare cases during that 5 minutes it's possible that a user could
Update
a
record will DTS is also trying to update a record (or delete).

Again, what is the best approach to eliminate failures - either from a
user
perspective or the DTS packages themselves?

If anyone can lead me in the right direction I would really appriciate
it.

Thanks....









Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.