Flowers To India

Flowers To India
Send cakes,flowers to India

Tuesday, May 24, 2011

Schema Rename in Oracle

I have tested by updating the schema name in user$ table. It was worked, but I didn't tried on production box so i am not sure whether below method is correct or not.

Method 1)

I want to rename schema name from SATISH to SATISH1 so used below command.

SQL> conn / as sysdba

SQL> update user$ set name='SATISH1' where name = 'SATISH';

Method 2)

I trusted always below method is safe.

1. create user new_user...
2. grant ... to new_user;
3. execute dbms_tts.transport_set_check(...);
4. lock old user;
5. exp old user
6. imp fromuser=old_user touser=newuser
7. [drop user old_user cascade;]

No comments: