View previous topic :: View next topic
|
Author |
Message |
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
Dear Friends,
If we use UR in the program for some certain queries and if the program execution is over then will it again continue with UR level?
If suppose the transaction level is of RR and im setting the transaction level to UR in the program and if once the program execution is over will it automatically switch over to RR or it will stay as UR since we have set the transaction level to UR.... |
|
Back to top |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
Sorry to Rephrase this question.
What is the difference between providing the Isolation level during the Bind and providing a isolation levels inside the code? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I believe that the ISOLATION Level you use in your imbedded sql statement is only 'active/valid' for that query. Thus you could have two selects in your program, one with UR the other without. With RR in the bind, the one without UR will always execute as RR and the one with UR will always execute with UR. |
|
Back to top |
|
|
Raghu navaikulam
Active User
Joined: 27 Sep 2008 Posts: 193 Location: chennai
|
|
|
|
Hi Manigandan
The ISOLATION level in the SQL will bypass the ISOLATION level in the BIND.
Regards
Raghu |
|
Back to top |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
Thanks a lot....
Is there any difference in order by clause in the SQLs with the isolation level UR??
or is there any syntax in DB2 that it will return different result for Uncommited read?? |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Quote: |
Is there any difference in order by clause in the SQLs with the isolation level UR??
|
No.
Quote: |
or is there any syntax in DB2 that it will return different result for Uncommited read?? |
The results obtained by having WITH UR may differ from other Isolation levels I believe. |
|
Back to top |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
Ya thats what exactly i need to know whether the results will differ when comparing to other isolation levels with UR??
Lets keep the database in Read only mode and if we compare the results with UR and isolation levels then will it differ the results?? |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
If there are no data modification statements, then the result of a query will be same irrespective of the isolation levels.
Lets not make this a question and answers session. Please come up with what exactly are you trying to achieve. Lets talk about solutions. |
|
Back to top |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
Our Database will be in read only mode...at certain times and during those periods there are some jobs to be executed. At present these jobs are bound with the CS isolation level.......and we are planning to convert it in to UR level..................we have concern here is that whether the results retrieved will be different from CS level....... |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Quote: |
If there are no data modification statements, then the result of a query will be same irrespective of the isolation levels.
|
But, If there is a chance of data modification statements, the results may differ.
WITH UR fetches all the rows matching the where clause which may not even be committed. But CS will fetch all the rows that are committed. |
|
Back to top |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
Agreed. But since the database is in read only mode i beleive that there might not be any problem to change the isolation level from CS to UR..
Just need your inputs/comments on this statement |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
It should not be a problem. |
|
Back to top |
|
|
Manigandan Aravindhan
New User
Joined: 09 Oct 2007 Posts: 81 Location: India
|
|
|
|
Thank you...... |
|
Back to top |
|
|
|