Re: Using fixit Job

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Thu, 22 May 2003 21:11:36 GMT
Message-ID: <MPG.1936dce28b65384c989791_at_news.la.sbcglobal.net>


neokimia_at_hotmail.com said...
> Hi all,
>
> I want to use a fixit job to automatically add space to a tablespace when it
> reach the warning level. What script I can right into the fixit job to only
> add, for example 5MB to a tablespace, without adding a datafiles nor use the
> autoextend option for the tablespace. I want to be notified when a
> tablespace excess 90% of space use, and if I use the autoextend, I will not
> be notified.
>
> Thanks
>
> Regards,
> -Yanick
>
It's hard to tell from your post if you already have a fixit script written, or if you want someone to suggest such a script. If the former, see below; if the latter, it depends on your language of choice.

But you ask what you need to write "into" (implying an existing script) the fixit job to add 5MB to a tablespace. After finding the datafile name and its current size - eg, from the dba_data_files view), the command to do that is:

  alter database datafile '/path/to/datafile.dbf' resize nnnM;

where nnn = target size (previous size in MB plus 5 MB) and M is, of course, the symbol that tells Oracle you're specifying MB.

-- 
/Karsten
DBA > retired > DBA
Received on Thu May 22 2003 - 23:11:36 CEST

Original text of this message