Unix Technical Forum

Relocating undo tablespace

This is a discussion on Relocating undo tablespace within the Oracle Database forums, part of the Database Server Software category; --> Platform: Oracle 9.2.0.6 on Solaris 5.9 Hit a snag today on a box that holds two instances - one ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 03:53 AM
EdStevens
 
Posts: n/a
Default Relocating undo tablespace

Platform: Oracle 9.2.0.6 on Solaris 5.9

Hit a snag today on a box that holds two instances - one for dev, one
for QA for the same app. Started getting alerts that two of the file
systems had filled up. The SA had recently added a LUN to another disk
group, so we created a couple of 'overflow' file systems there. One of
the full FS's had normal data files, and I was able to relocate some of
them to these new file systems on the other disk group. The other
tablespace has only one of the control file mirrors, and the undo
tablespace. I'm a little antsy about relocating that one. The
procedure I used for the normal data files was:
1) offline the TS,
2) move the data file,
3) alter database rename file,
4) online the TS

Doesn't seem like this would work for the one and only undo tablespace.
Am thinking of treating it like the system TS ..

1) shutdown
2) move the data file
3) startup mount
4) alter database rename file
5) alter database open

Am I on track or getting ready to drive over a cliff?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 03:53 AM
Mark D Powell
 
Posts: n/a
Default Re: Relocating undo tablespace

Ed, 'i like the second method because it means I do not have to worry
about any dead sessions or uncommitted distributed transactions holding
undo entries and slowing things down. Kill everybody and roll back
with the shutdown immediate then change the location before anyone can
connect. Simple, clean, and reliable assuming you can type the file
name correctly on the rename.

I would copy rather than move the file. Then once the database is
successfully opened I would remove the old file. Might as well play it
extra safe.

You could also just create a new undo tablespace using the new file
name and switch over to using it. Once the undo retention period has
passed you could then drop the old undo tablespace. Being old
fashioned and wanting to get the job done and over with I would take
advantage of the window and do what you wanted.

HTH -- Mark D Powell --

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-25-2008, 03:54 AM
Herod
 
Posts: n/a
Default Re: Relocating undo tablespace

I agree with Mark.

Shut it down, copy it, bring it back up mount, alter the database, open
the database, breath a sigh of relief then start
running your statspack to make sure the SA didn't create the new LUN in
some nasty RAID configuration and you aren't losing any performance.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-25-2008, 03:54 AM
Mladen Gogala
 
Posts: n/a
Default Re: Relocating undo tablespace

On Tue, 07 Mar 2006 17:08:53 -0800, Mark D Powell wrote:

> I would copy rather than move the file. Then once the database is
> successfully opened I would remove the old file. Might as well play it
> extra safe.


Rename file will require both the old and the new one to be
present. If "mv" is used, he'll have to re-create control file.

--
http://www.mgogala.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-25-2008, 03:54 AM
Mladen Gogala
 
Posts: n/a
Default Re: Relocating undo tablespace

On Tue, 07 Mar 2006 19:16:27 -0800, Herod wrote:

> statspack to make sure the SA didn't create the new LUN in
> some nasty RAID configuration and you aren't losing any performance.


And how exactly will statspack show that?

--
http://www.mgogala.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-25-2008, 03:54 AM
EdStevens
 
Posts: n/a
Default Re: Relocating undo tablespace


Mladen Gogala wrote:
> On Tue, 07 Mar 2006 17:08:53 -0800, Mark D Powell wrote:
>
> > I would copy rather than move the file. Then once the database is
> > successfully opened I would remove the old file. Might as well play it
> > extra safe.

>
> Rename file will require both the old and the new one to be
> present. If "mv" is used, he'll have to re-create control file.
>
> --
> http://www.mgogala.com


Mmm ... don't think so. My understanding is ALTER DATABASE RENAME ...
is simply making the necessary change in the control file -- while the
file is offline to the DB.. Doesn't matter if, at the OS level -- and
wile the file is offline to the DB --- you 'move' the file or 'copy'
the file.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-25-2008, 03:54 AM
Herod
 
Posts: n/a
Default Re: Relocating undo tablespace

Your kidding right?

That is the kind of thing statspack is exactly for.

And as long as the database is brought up properly, only one copy of
the file is correct - EdStevens is correct
as well as the rest of us that said to do that

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-25-2008, 03:54 AM
EdStevens
 
Posts: n/a
Default Re: Relocating undo tablespace


Herod wrote:
> Your kidding right?
>
> That is the kind of thing statspack is exactly for.
>
> And as long as the database is brought up properly, only one copy of
> the file is correct - EdStevens is correct
> as well as the rest of us that said to do that


In Mladen's defense, I'm not sure I see how statspack will show
anything about where the SA placed a file system. What it will show is
poor performance. It can even point that the poor performance is due
to too many xxx_write wait events. That MAY (or may not) be due to the
configuration of the disk farm. I don't think statspack can
distinguish a db_file_parallel_write on a RAID-5 system from that on a
SAME system.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-25-2008, 03:54 AM
EdStevens
 
Posts: n/a
Default Re: Relocating undo tablespace


EdStevens wrote:
> Platform: Oracle 9.2.0.6 on Solaris 5.9
>
> Hit a snag today on a box that holds two instances - one for dev, one
> for QA for the same app. Started getting alerts that two of the file
> systems had filled up. The SA had recently added a LUN to another disk
> group, so we created a couple of 'overflow' file systems there. One of
> the full FS's had normal data files, and I was able to relocate some of
> them to these new file systems on the other disk group. The other
> tablespace has only one of the control file mirrors, and the undo
> tablespace. I'm a little antsy about relocating that one. The
> procedure I used for the normal data files was:
> 1) offline the TS,
> 2) move the data file,
> 3) alter database rename file,
> 4) online the TS
>
> Doesn't seem like this would work for the one and only undo tablespace.
> Am thinking of treating it like the system TS ..
>


> 1) shutdown
> 2) move the data file
> 3) startup mount
> 4) alter database rename file
> 5) alter database open
>
> Am I on track or getting ready to drive over a cliff?


It's nice to be able to sleep on a problem instead of grasping the
first solution that comes to mind.

Last night it struck me there was a simpler, and in my case better,
solution. The only files on this particular FS were the UNDO and a
control file copy from each of the two instances on the box. If I
moved the UNDO, the FS would be nearly empty and unused. The UNDO
isn't *that* much different from other table spaces .... why not just
resize the file in place?

ALTER DATABASE DATAFILE ... RESIZE ...

Poof! My FS usage went from 100% to 70%. The SA is happy, I'm happy,
my files remain in their 'standard' locations ...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-25-2008, 03:55 AM
Herod
 
Posts: n/a
Default Re: Relocating undo tablespace

You missed/misread the first post on it.

> statspack to make sure the SA didn't create the new LUN in
> some nasty RAID configuration and you aren't losing any performance.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:00 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com