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: help: how do you rename a primary key

Re: help: how do you rename a primary key

From: Paul Brewer <paul_at_paul.brewers.org.uk>
Date: Fri, 12 Apr 2002 20:55:00 +0100
Message-ID: <3cb92374_2@mk-nntp-1.news.uk.worldonline.com>


Daniel,

You keep top posting (please don't), so I've done so also. Please don't misquote. I said it was bad advice.

Paul

"Daniel Morgan" <damorgan_at_exesolutions.com> wrote in message news:3CB72671.F816A85C_at_exesolutions.com...
> Horrible advice. Drop it and recreate it from scratch.
>
> I would terminate anyone reporting to me that made a change to a
dictionary
> object.
>
> Then again ... I wouldn't give them privileges that allowed them to do it
so
> their jobs are pretty safe.
>
> Daniel Morgan
>
>
>
> Paul Brewer wrote:
>
> > "Svend Jensen" <Svend_at_OracleCare.Com> wrote in message
> > news:3CB5D01F.80904_at_OracleCare.Com...
> > > Joe Sath wrote:
> > >
> > > > Hi, Folks
> > > >
> > > > I need to rename a primary key with a unick index. The table is big,
if
> > I
> > > > drop the primary key and then rebuild it with "using index", it will
> > take a
> > > > while.
> > > >
> > > > Is there any way we can just rename it like we rename a index?
> > > >
> > > > Thanks for your help.
> > > >
> > > >
> > > >
> > >
> > > Yes, log in as sys, update con$ set name = new_name
> > > where con# = (select con# from con$
> > > where owner = 'constraint_owner'
> > > name = 'old_name')
> > >
> > > There is a unique index i_con2 on con$ (con#)
> > > and a unique index i_con1 on (owner, name)
> > >
> > > These cant be rebuild, they are part of instance warmstart, as you can
> > > se from bootstrap$
> > >
> > > I have used this method on 8.1.7 without any negative impact. But only
> > > if the need is there and no other solution could be applied while
> > > 'business as usual' was ongoing.
> > >
> > > rgds
> > >
> > > /svend
> > >
> > This is bad advice.
> >
> > Paul
>
Received on Fri Apr 12 2002 - 14:55:00 CDT

Original text of this message

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