[dba-SQLServer]

Francisco H Tapia my.lists at verizon.net
Tue Oct 14 13:24:07 CDT 2003


if you SELECT * FROM TableName WITH(NOLOCK) you won't have the locking 
issues as you are providing the hint not to lock the table.  Some 
side-effects that any uncommitted insert will show up with this type of 
select.

additionally a quick select every 5minutes should suffice and be quick 
enough even w/o the hint (depending on your rate of input).

lastly you can also look at replication to get the records out of there 
or even logshipping.




Billy Pang wrote:

> Hello:
> 
> Our IIS Server is logging website hits to SQL Server.  We are trying to 
> figure out best way to export certain records from this table into 
> another table every 5 minutes.  So far, we came up with two options:
> 
> 1) in a separate table, store the ID of the last record in the IIS Log 
> table that was exported.  Every 5 minutes, export the records that are 
> greater than the last exported ID.
> 
> 2) pick one of the columns in the log table to be the "Exported" flag 
> column.  After exporting a record from the log table, update that record 
> as exported.
> 
> We are leaning towards #2 but am unsure about any locking issues.  
> AKAIK, IIS only inserts records into that table, never update.
> 
> Any ideas or thoughts?
> 
> Thanks in advance,
> Billy



-- 
-Francisco




More information about the dba-SQLServer mailing list