This Blog is discontinued, its only read-only

Thursday, March 24, 2016

ALTER USER RENAME - Part 3

This is part 3 of the ALTER USER RENAME series Part 1: ALTER USER RENAME - A half official option Part 2: ALTER USER RENAME - Part 2 Part 3: ALTER USER RENAME - Part 3 Inspired by a Twitter Comment from Franck Pachot and as I love to test really funny and strange things with Oracle Products. I was trying to rename the SYS user and the SYSTEM user. SQL> alter session set "_enable_rename_user"=true; SQL> alter system enable restricted...

Wednesday, March 23, 2016

ALTER USER RENAME - Part 2

It seems that my first blog post today "ALTER USER RENAME - A half official option" got some great attentions :-) How did I come to the ALTER USER RENAME command? Just a lucky punch due to my customer. My customer were trying to rename an user in an Oracle Database with several objects (tables, view, functions, types and so) by simply updating the sys.user$ table :-) The result were better than expected, just synonyms had to be recreated, but a...

ALTER USER RENAME - A half official option

Many times DBA's have to rename / copy complete users/schemas from the current name to a new name within one database. Since several years DBA's are asking for a simple method inside Oracle to execute something like "ALTER USER RENAME". Common approaches to rename users/schemas are: IMPDP with REMAP_SCHEMA update of sys.user$ For the option "update of sys.user$", which is in my opinion a really bad choice, see Tom Kyte's comment  For...