tsql - SQL Transactions - allow read original data before commit (snapshot?) -


i facing issue, possibly quite easy solve, new advanced transaction settings.

every 30 minutes running insert query getting latest data linked server client's server, table can call importtable. have simple job looks this:

begin tran      delete  importtable       insert importtable (columns)           select (columns)           querygettingresultsfromlinkedserver commit 

the thing is, each time job runs importtable locked query run time (2-5 minutes) , nobody can read records. i wish table read-accessible time, little downtime possible.

now, read possible allow snapshot isolation in database settings solve problem (set false @ moment), have never played different transaction isolation types , not db client's, i'd rather not alter database settings if not sure if can break something.

i know have intermediary table records inserted , inserted final table , possible solution, hoping more sophisticated , learning new in process.

ps: client's server & database new , barely used, expect little impact if change settings, still, cannot randomly change various settings learning purposes.

many thanks!

inserts wont block table ,unless escalated table level.in case,you deleting table first , inserting data again,why not insert updated data?.for query using transaction level (rsci)snapshot isolation you,but have added impact of row version means sql store row versions of rows changed in tempdb.

please see mcm isolation videos of kimberely tripp indepth understanding ,also dont forget test in stage enviornment.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -