Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Rename a user ?

Re: Rename a user ?

From: Joe Kazimierczyk <kazimiej_at_bms.com>
Date: Tue, 30 Jun 1998 09:08:37 -0400
Message-ID: <3598E355.68C5EFB3@bms.com>


David T. Bath wrote:
>
> rprendin_at_my-dejanews.com wrote:
> >
> > There is no such command in Oracle.
> > The work around is create a new user a via export/import
> > move all the data to the new user... Use the
> > 'fromuser' and 'touser' parameters in your import parameter file.
> >
> > Good Luck,
> >
> > Robert Prendin
> >
> > In article <6mubqh$mcd$1_at_news1.rmi.net>,
> > "Gerry West" <gwest_at_skyconnect.com> wrote:
> > >
> > > Hi,
> > >
> > > Is it possible to rename an Oracle user ?
> > > If so, how ?
> > >
> > > Thanks,
> > > Gerry West
> > >
> > >
> >
> > -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> > http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
> It is possible (at least in versions 4.0 through 7.3) to change
> the names of things in the appropriate tables.
>
> 0. First time? Try on a database you can lose.
> 1. Get everyone out of the database.
> 2. Log in as SYS.
> 3. update the SYS.USR$ table, with the appropriate
> new user in the SET clause, and old username in the
> WHERE clause. (I've not given the SQL cause if you
> cannot figure it out, you shouldn't do it).
> 4. Commit.
> 5. Shut down the database and bring it back up again.
> This is needed to get the new name into the SGA,
> cache.
>
> Similar stunts can be used (with lots of caveats) for object
> names, column names, etc. But your dependencies could be screwed
> up.
>
> Again: This procedure is inherently perilous. I'd use it to change a
> username from [a-naughty-word] to something more innocuous, and not
> much else.
>

You may also need to recreate some database links after doing the above steps. Oracle stores the actual username in sys.link$, not the internal user#. Received on Tue Jun 30 1998 - 08:08:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US