Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Partition Info
You may use the following query will identify the 'highest' partition by date range.
select partition_name, partition_position , high_value, tablespace_name
from dba_tab_partitions
where table_name = '<table_name>'
and table_owner = '<owner>'
and partition_position = ( select max(partition_position)
from dba_tab_partitions where table_name = '<table_name>' and table_owner = '<owner>' )
You can store the high_value in another table and start manipulating the way you want such as:
select max(add_months( to_date( substr(high_value,3,19), 'SYYYY-MM-DD HH24:MI:SS' ), 1 ))
into new_high_value
from temp_table
I don't know how we can directly manipulate HIGH_VALUE column in dba_tab_partitions. But I have tried the above in a PL/SQL program and it worked.
Hope this helps.
-----Original Message-----
Sent: Monday, December 02, 2002 4:39 PM
To: Multiple recipients of list ORACLE-L
DBA_TAB_PARTITIONS
-----Original Message-----
Sent: Monday, December 02, 2002 3:49 PM
To: Multiple recipients of list ORACLE-L
Hello everybody.
I have a number of tables with range by date partitions. I need to
write a script to monitor the latest partitions and send me an e-mail if
it's close to a current date.
I am just looking for tables or views that will help me find out the date of the last partition.
Sergei.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Sergei
INET: sergei_at_netflip.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: <Govind.Arumugam_at_alltel.com
INET: Govind.Arumugam_at_alltel.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Dec 02 2002 - 19:48:44 CST
![]() |
![]() |