Skip to Main Content
  • Questions
  • how to retain oracle database userid during database migration

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, sharath.

Asked: January 21, 2009 - 10:20 am UTC

Last updated: May 11, 2009 - 6:47 pm UTC

Version: 9.2.0

Viewed 1000+ times

You Asked

Hi Tom,
We are planning to do a database migration+upgrade from 9.2.0.4.0 on windows 2000 to 10.2.0.4 on linux platform. We are thinking of installing 10.2.0.4 on linux and do an exp and imp.
But the problem we are having is that some of our application tables has insert_user and update_user columns that has the database userid.
Now, when we do exp on old database and and imp into new database, the database users will created with new userid's and our application will loose data integrity.
Tom, Is there a way to retain the database userid's during the migration process? Or is there a better way to do this?

Any help will be greatly appreciated.

Thanks
Sharath

and Tom said...

You should not export/import.

check out:

http://docs.oracle.com/cd/B19306_01/backup.102/b14191/dbxptrn.htm#CHDEFAEE

upgrade windows to 10.2.
then move it.

Rating

  (4 ratings)

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

Comments

sharath, January 21, 2009 - 4:24 pm UTC

Thank you. That was an excellent suggestion.

Contents of v$db_transportable_platform

Russ Cannon, January 23, 2009 - 10:59 am UTC

The v$db_transportable_platform view appears only to include platforms that are implicitly compatible with the present one. Is there some reason for this, and is there any way to expand the list to test for other platforms?
Tom Kyte
January 23, 2009 - 1:04 pm UTC

it has to do with byte ordering and word size - yes, and there is no way to expand the list.

For all other platform to platform conversions - we can do everything pretty much except for SYSTEM, rman does that be processing and reformatting the files.

what if its cross-platform with different endian format

sharath, May 05, 2009 - 2:50 pm UTC

Hi Tom, what if i need to migrate cross-platform with different endian format and need to retain oracle database usersids.
For example source A(aix 64 bit) to source b(linux 32 bit).

Tom Kyte
May 11, 2009 - 8:54 am UTC

you'd need to use exp/imp (or more preferably the data pump in 10g and above) to migrate the user accounts.

what if its cross-platform with different endian format

Sharath, May 11, 2009 - 10:16 am UTC

But that will not retain my databse userid.
Tom Kyte
May 11, 2009 - 6:47 pm UTC

I thought you mean your usernames/passwords.

There is no way to "preserve" the user_id assigned and visible in ALL_USERS, that is just our internal surrogate key (reason 1523523 to not use surrogates :( )