Skip to Main Content
  • Questions
  • know if enabling row movement and shrink compact will be safe

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, gonzalo.

Asked: March 01, 2017 - 4:20 pm UTC

Last updated: March 02, 2017 - 5:03 am UTC

Version: 11g r2

Viewed 1000+ times

You Asked

Hello,

I am reading about enabling row movement, in order to shrink space.

One one thread, Tom answered this :

“Is there anything wrong on enabling row moevement? Only you can answer that, do you have any application that expects rowid to be constant for a row? If so - then it is wrong, if not - then it is likely OK”

My question is:

Is there some way to know if I have applications expecting rowid to be constant?

So if there is not, i can enable row movement, and shrink compact.


and Connor said...

There are two potential issues

1) Applications actually *store* rowid's somewhere in the database

You can search for columns of datatype 'ROWID' but of course, if they are storing rowid's in (say) a varchar2, then you'll need to look for column names and make some educated guesses.

2) Applications read the rowid back from the database, and then use it for subsequent updates etc.

That you could assess by keeping an eye on V$SQL and looking for queries that explcitly do: select rowid, [other cols] from ...



Is this answer out of date? If it is, please let us know via a Comment