Return-Path: <oracle-l-bounce@freelists.org>
X-Original-To: oracle-l@orafaq.com
Delivered-To: oracle-l@orafaq.com
Received: from turing.freelists.org (turing.freelists.org [206.53.239.180])
 by malta2546.startdedicated.com (Postfix) with ESMTPS id 7D1991003A9660
 for <oracle-l@orafaq.com>; Wed, 17 Jan 2018 21:30:10 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BA3B826A7D;
 Wed, 17 Jan 2018 15:28:59 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1516220939;
 bh=07JIcx2NemBHNyRoS3PqWJbCzgaXQ8hWD6IfMFcVfWY=;
 h=From:To:Subject:Date:References:In-Reply-To:Reply-To:List-help:
	 List-unsubscribe:List-Id:List-subscribe:List-owner:List-post:
	 List-archive;
 b=nC++IXDXjpmNcUk6TNUSYjbHIiqHeYpNP1QkrKapdw/XG1fd1flw89QMat9IxYHAT
	 m2aNgNr974n35gdxIy2Yy82Qqs4/eSbUqatTsSOK5A6go2CKGZiw1+10Qw7X5WaB6G
	 1pufINjfqT5+Vnbfci/Nj3FooDvCj3+FT+JImOMo=
X-Virus-Scanned: Debian amavisd-new at turing.freelists.org
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id wgTsrOG0g9rS; Wed, 17 Jan 2018 15:28:59 -0500 (EST)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D699C25F7B;
 Wed, 17 Jan 2018 15:28:46 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1516220938;
 bh=07JIcx2NemBHNyRoS3PqWJbCzgaXQ8hWD6IfMFcVfWY=;
 h=From:To:Subject:Date:References:In-Reply-To:Reply-To:List-help:
	 List-unsubscribe:List-Id:List-subscribe:List-owner:List-post:
	 List-archive;
 b=RXi67ia2pC1s0wNjPsgLjdx1lFpTw3SIa4WCCm0hFlECzFQv0g3zpiTLyzaoox+6D
	 6u1GMe4fEYlhUDEaV18JKK7EiJB185rm1QFDAXWqLnw6aZBQUzzCzNBTBiPoP/7Wei
	 37UQbN6rIKTA89dhOmi6KRyo+dbyi06E72ft2Rn0=
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 17 Jan 2018 15:27:25 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 10F2928544
 for <oracle-l@freelists.org>; Wed, 17 Jan 2018 15:27:25 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id TqQ147-gduwl for <oracle-l@freelists.org>;
 Wed, 17 Jan 2018 15:27:25 -0500 (EST)
Received: from GBR01-LO2-obe.outbound.protection.outlook.com (mail-eopbgr100080.outbound.protection.outlook.com [40.107.10.80])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
 (No client certificate requested)
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3924928543
 for <oracle-l@freelists.org>; Wed, 17 Jan 2018 15:27:23 -0500 (EST)
Received: from MM1P12301MB1658.GBRP123.PROD.OUTLOOK.COM (10.167.22.149) by
 MM1P12301MB1657.GBRP123.PROD.OUTLOOK.COM (10.166.216.153) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.20.407.7; Wed, 17 Jan 2018 20:27:21 +0000
Received: from MM1P12301MB1658.GBRP123.PROD.OUTLOOK.COM ([10.167.22.149]) by
 MM1P12301MB1658.GBRP123.PROD.OUTLOOK.COM ([10.167.22.149]) with mapi id
 15.20.0407.012; Wed, 17 Jan 2018 20:27:21 +0000
From: Jonathan Lewis <jonathan@jlcomp.demon.co.uk>
To: "oracle-l@freelists.org" <oracle-l@freelists.org>
Subject: Re: DBA_TAB_PARTITIONS
Thread-Topic: DBA_TAB_PARTITIONS
Date: Wed, 17 Jan 2018 20:27:21 +0000
Message-ID: <MM1P12301MB1658182AE544CF4E8EA9D64CA5E90@MM1P12301MB1658.GBRP123.PROD.OUTLOOK.COM>
References: <258575162B63424EB58DAE3A5475B6ED012CD0646B@EXNJMB25.nam.nsroot.net>
In-Reply-To: <258575162B63424EB58DAE3A5475B6ED012CD0646B@EXNJMB25.nam.nsroot.net>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
 smtp.mailfrom=jonathan@jlcomp.demon.co.uk; 
x-originating-ip: [86.140.110.251]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1;MM1P12301MB1657;7:A5hbcmRcznmdd3Ezegd4jsc6P4cPg8NAsE/Jk+FQKvJpgJfIH7kggGlIMsZasEOj8XtO2X04R6dlzDRzk7rS46GKlaaT5//TtyX1q5EgvzlZqNV9Hl4++GbgQS2F4tPr9C3KkPJhyf+W4H72PnKc0++3dxWloZQuPZGFBz+tUVpi9cFYYyHMiF7Aczbm9o640gU24x8cs96NmJX/44uC5XzUUldcKNx9TR+Par3WGu8XPtS22laAypzZ83J0I6N/
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 10c4ae4d-6155-4be2-9036-08d55de8b654
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(7021125)(5600026)(4604075)(3008032)(4534125)(7022125)(4602075)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603307)(7153060)(7193020);SRVR:MM1P12301MB1657;
x-ms-traffictypediagnostic: MM1P12301MB1657:
x-microsoft-antispam-prvs: <MM1P12301MB1657D23461C430D018E92383A5E90@MM1P12301MB1657.GBRP123.PROD.OUTLOOK.COM>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(2401047)(8121501046)(5005006)(3002001)(3231023)(944501161)(93006095)(93001095)(10201501046)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(2016111802025)(6043046)(6072148)(6042181)(201708071742011);SRVR:MM1P12301MB1657;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:MM1P12301MB1657;
x-forefront-prvs: 0555EC8317
x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39380400002)(39830400003)(366004)(396003)(376002)(346002)(189003)(199004)(377424004)(42882006)(76176011)(53546011)(3660700001)(106356001)(105586002)(6116002)(7696005)(6506007)(99286004)(6436002)(102836004)(14454004)(97736004)(3846002)(81166006)(77096007)(316002)(33656002)(8676002)(2906002)(229853002)(81156014)(3280700002)(2351001)(25786009)(305945005)(6246003)(68736007)(53936002)(2501003)(5640700003)(2900100001)(8936002)(5660300001)(7116003)(66066001)(55016002)(6916009)(74482002)(2950100002)(86362001)(26005)(478600001)(9686003)(74316002)(7736002);DIR:OUT;SFP:1101;SCL:1;SRVR:MM1P12301MB1657;H:MM1P12301MB1658.GBRP123.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:0;LANG:en;
received-spf: None (protection.outlook.com: jlcomp.demon.co.uk does not
 designate permitted sender hosts)
x-microsoft-antispam-message-info: xRPzDkHDAuKOzrdcvmcFt8zzk0ZXTDFeAxyoTJ9Fs37rC47z/zBwoquxdz79vKwhXHRv/xAkYx15pCdSJGOY1w==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: jlcomp.demon.co.uk
X-MS-Exchange-CrossTenant-Network-Message-Id: 10c4ae4d-6155-4be2-9036-08d55de8b654
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2018 20:27:21.4959
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: c5ec3dea-08bd-405e-942c-f61dff9a4831
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MM1P12301MB1657
X-archive-position: 70355
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: jonathan@jlcomp.demon.co.uk
Precedence: normal
Reply-To: jonathan@jlcomp.demon.co.uk
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l

What you can do depends on the version of Oracle you've got and what you kn=
ow about the partitioned object. You may not need to convert the high_value=
 at all, just query the database for the data_object_id of each partition y=
ou think you will need by value e.g: assuming you have a partitioned table =
that is partitioned by month and you want to compress all partitions prior =
to 1st Jan 2018, here's a literal string method to point the way:

select
        dbms_rowid.rowid_object(rowid),
        dbms_mview.pmarker(rowid)
from
        transactions partition for (to_date('28-Dec-2017','dd-mon-yyyy'))
where
        rownum =3D 1
;

DBMS_ROWID.ROWID_OBJECT(ROWID) DBMS_MVIEW.PMARKER(ROWID)
------------------------------ -------------------------
                         92485                     92485

(pmarker() returns the data_object_id for the row, but it's not really docu=
mented as such, so dbms_rowid is a better bet.)


select object_name, subobject_name from user_objects where object_name =3D =
'TRANSACTIONS' and data_object_id =3D 92485;

OBJECT_NAME          SUBOBJECT_NAME
-------------------- ----------------------
TRANSACTIONS         SYS_P723


Regards,
Jonathan Lewis
________________________________________
From: oracle-l-bounce@freelists.org <oracle-l-bounce@freelists.org> on beha=
lf of Reen, Elizabeth  <dmarc-noreply@freelists.org>
Sent: 16 January 2018 19:46
To: oracle-l@freelists.org
Subject: DBA_TAB_PARTITIONS

               We are trying to create a sql which will create a script of =
partitions to compress which are older than a certain date.  That informati=
on is kept in High_value.  When displayed high_value looks like this

TO_DATE(' 2017-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=3DG=
REGORIAN')

               So the first thing we did was to query where high_value like=
 =91TO_DATE%=92.  We got an invalid character error.   Long story short, we=
 discovered that high_value=92s data type is long.  There must be a way to =
translate this into text.  SQLplus, Sqldeveloper, and TOAD all do that.  Th=
e question is how do they do it?  Does anyone know how it is done?

Thanks,

Liz
--
http://www.freelists.org/webpage/oracle-l


