If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Issue with Isolation Level 0 and tempoary tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-10-11, 17:52
nistalavijay nistalavijay is offline
Registered User
 
Join Date: May 2011
Posts: 2
Question Issue with Isolation Level 0 and tempoary tables

Hi,

I have table in sybase which is named as test ( which also has a unique index on it)

I am trying to do the below in 1st Session

Begin tran
update test
set......

( now as I am not doing a commit or rollback so there is a lock)

in the second session:


************ the below works fine******************
set transaction isolation level 0

select * from test


-------------------------------------------

but if I use a temp table then it gets hung up until I commit/rollback the first session

select *
into #temp
from test


Is there any workaround for setting isolation level 0 and getting dirty data in a temp table?
Reply With Quote
  #2 (permalink)  
Old 05-11-11, 11:04
nistalavijay nistalavijay is offline
Registered User
 
Join Date: May 2011
Posts: 2
Smile

I have figured that using a cursor helps in this case.

First create a cursor for a select (at isolation read uncommitted)

and then fetch the data of the cursor in a temp table...
in this way we would be able to catch the uncommitted data in a temp table.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On