How to Find partition name by value ?
hey,
I have a big loading process into a certain fact table. the table is partitioned first by interval on a date column and then sub partitioned by hash. this is a big fact table so there are alot of bitmap indexes on it.
i want to disable all indexes on a specific partition given a certain value of the partition key.
is there any nice good looking way of finding the partition name by value ?
i would realy like to avoid running a loop on the high_value long column in all_tab_partitions
the etl process is running on the entire partition - after finding the partition name i would disable all sub partitions
if i could only do something like...
select $partition_name from some_table for (to_date('01/03/2012','dd/mm/yyyy'));i'm using oracle 11.2.0.2
haki_benita wrote:
now if we want to find the corresponding partition for a given value we need to check for the partition it's high value is greater then thy value and the previous one is lower then.Not necessarily. You can use the CBO to tell you what partition(s) will be used for a SQL statement. E.g.
// partition range table using dates and yearly partitions
SQL> create table testtab(
2 id number,
3 day date,
4 flag varchar2(1)
5 )
6 partition by range(day)
7 (
8 partition year_1900 values less than (TO_DATE('2000/01/01','yyyy/mm/dd')),
9 partition year_2000 values less than (TO_DATE('2001/01/01','yyyy/mm/dd')),
10 partition year_2001 values less than (TO_DATE('2002/01/01','yyyy/mm/dd')),
11 partition year_2002 values less than (TO_DATE('2003/01/01','yyyy/mm/dd')),
12 partition year_2003 values less than (TO_DATE('2004/01/01','yyyy/mm/dd')),
13 partition year_2004 values less than (TO_DATE('2005/01/01','yyyy/mm/dd')),
14 partition year_2005 values less than (TO_DATE('2006/01/01','yyyy/mm/dd')),
15 partition year_2006 values less than (TO_DATE('2007/01/01','yyyy/mm/dd')),
16 partition year_2007 values less than (TO_DATE('2008/01/01','yyyy/mm/dd')),
17 partition year_2008 values less than (TO_DATE('2009/01/01','yyyy/mm/dd')),
18 partition year_2009 values less than (TO_DATE('2010/01/01','yyyy/mm/dd')),
19 partition year_2010 values less than (TO_DATE('2011/01/01','yyyy/mm/dd')),
20 partition year_2011 values less than (TO_DATE('2012/01/01','yyyy/mm/dd')),
21 partition year_2012 values less than (TO_DATE('2013/01/01','yyyy/mm/dd'))
22 );
Table created.
// the following can be automated using PL/SQL - e.g. passing the date parameter to
// a PL/SQL function and the function using the following approach to determine the
// target partition
SQL> explain plan
2 set statement_id = 'partition.testtab.1' for
3 select * from testtab where day = to_date( '2002/10/09','yyyy/mm/dd' );
Explained.
SQL> col PARTITIONS format a40
SQL> select
2 column_value as PARTITIONS
3 from TABLE(
4 XmlSequence( extract(
5 DBMS_XPLAN.Build_Plan_Xml( 'PLAN_TABLE', 'partition.testtab.1' ),
6 '/plan/operation/partition'
7 )
8 )
9 );
PARTITIONS
<partition start="4" stop="4"/>
<partition start="4" stop="4"/>
SQL> select partition_name from user_tab_partitions where table_name = 'TESTTAB' and partition_position = 4;
PARTITION_NAME
YEAR_2002
SQL>
Similar Messages
-
How to find Table names for PO & Invoices in SRM Standalnoe system SRM 7.0?
Hi,
How to find Table names for PO & Invoices in SRM Standalnoe system SRM 7.0? Please let me know.
Thanks,
MonicaHi,
In SRM for all objects like SC ( BUS21210),BID,PO(BUS22010),Confirmation (BUS2203),invoice etc all the data stored
in BBP_PDHGP and BBP_PDBEI tables only, These is no separate tables..
for your reference below are the few SRM tables
BBP_PDACC Account Assignment
BBP_PDATT Document Attachment
BBP_PDBEH Backend Specific Header Data
BBP_PDBEI Backend Specific Item Data
BBP_PDBGP Partner Extension Gen. Purchasing Data
BBP_PDBINREL Transaction Object Linkage (EBP)
BBP_PDHCF Set for Tabular Customer and Solution Fields on Hdr
BBP_PDHGP Business Transaction Purchasing Information
BBP_PDHSB Bid Invitation
BBP_PDHSC Header Extension for Customer Fields
BBP_PDHSS Hdr Extension for SAP Internal Enhancements (IBUs and so on)
BBP_PDICF Set for Tabluar Customer and Solution Fields on Itm
BBP_PDIGP Business Transaction Item-Purchasing Information
BBP_PDISB Bid Invitation/Bid-Specific Item Data
BBP_PDISC Item Extension for Customer Fields
BBP_PDISS Item Ext. for SAP Internal Enhancements (IBUs and so on)
BBP_PDLIM Value Limit
BBP_PDORG Purchasing Organizational Unit
BBP_PDPSET Further Procurement Information
BBP_PDTAX Tax
CDCLS Cluster structure for change documents
CDHDR Change document header
CDPOS_STR Additional Change Document - Table for STRINGs
CDPOS_UID Additional Table for Inclusion of TABKEY>70 Characters
CRM_JCDO Change Documents for Status Object (Table JSTO)
CRM_JCDS Change Documents for System/User Statuses (Table JEST)
CRM_JEST Individual Object Status
CRM_JSTO Status Object Information
CRMD_LINK Transaction - Set - Link
CRMD_ORDERADM_H Business Transaction
CRMD_ORDERADM_I Business Transaction Item
CRMD_PARTNER Partners
SROBLROLB Persistent Roles of BOR Objects
SROBLROLC Persistent Roles of Business Classes
SRRELROLES Object Relationship Service: Roles
Thanks & Regards,
Prasad S -
How To Find Opening Stock And Value For a Material
Hi Experts,
How To Find Opening Stock And Value For a Material in Given Dates
Moderator Message: Search.
Edited by: kishan P on Sep 15, 2010 4:05 PMThanks For Answering.....
But I Need Any Function Module To Get Opening Stock And Value For Given Material With in Dates. -
How to find the Names of Most costly Views or Most Time consuming views
Hi All,
I had a database consisting of almost 200 views,as a part of Optimization process i want to find out the most costlier views.How to do that.Actually i want the names of the VIEWS,so that i can optimize that.Can any one help me out?
I had one more doubt in our Database a view is created like view A( which is created by joining several tables).so do i need to add index on this view separately or does it take the index of the tables which i joined? And in our Database i had created
a VIEW which is derived from other views(the Joining objects are views not tables),so while i select recoreds from this views which is derived from other views it is taking a lot of time.Is tehre any problem with that?Please avoid such double post spread over several forums:
http://social.msdn.microsoft.com/Forums/en-US/bae4042a-10b8-4d12-aa46-88a05ea37a76/how-to-find-the-names-of-most-costly-views-or-most-time-consuming-views?forum=sqldataaccess
Olaf Helper
[ Blog] [ Xing] [ MVP] -
How to find table name for the fields from Standard Extractor in CRM system
How to find table name of fields from the standard extractor in CRM system ?
e.g. We use LBWE TCode in R/3 system to find table name for the field from Extractor VCSCL(e.g.).
Likewise is there any way to find table name for the fields from Standard extractor like 0CRM_LEAD_I.Hi ,
Please find the link below for understanding BW CRM analysis.
http://help.sap.com/bp_biv135/html/bw.htm
activate the CRM DSs by scenario:
1) Activate the application component hierarchy (tcode RSA9). Changes made to the application component hierarchy in the CRM system can be transferred to the BW using the "Edit Application Component Hierarchy" (SBIW - Postprocessing of DataSources).
SAP Note 434886 must be implemented in CRM 3.0 before the application component hierarchy is activated.
2) Activate the Business Content DataSources (tcode RSA5).
Select/enter the application component and choose Execute (F8).
To compare the shipped and active versions, choose the 'Select Delta' pushbutton. If there is no active version of the DataSource, it is selected automatically.
To activate the shipped version, choose the 'Transfer DataSources' pushbutton.
3) Management of the versions of the BW-Adapter metadata (tcode BWA5). All DataSources are displayed that are managed by the BW Adapter.
As in transaction RSA5 (Service API Metadata Activation), the 'Select Delta' function can be used to select the inactive DataSources or compare shipped and active versions.
You can also go directly to the screen for maintaining DataSources that are managed by the BW Adapter.
The 'Compare Version' function makes a detailed comparison of the shipped and active versions.
All BW-Adapter metadata is considered when versions are compared:
Header information (Table SMOXHEAD)
Mapping information (Table SMOXRELP)
Global selection conditions (Table SMOXGSEL)
Attribute key fields (Table SMOXAFLD)
Hope this helps.
Regards,
csm reddy -
How to find if COLUMN DEFAULT VALUE is stored as metadata?
Hello,
I'm using Oracle 11g enhanced ADD COLUMN Functionality. Adding new columns with DEFAULT values and NOT NULL constraint no longer requires the default value to be stored in all existing records.
Sometimes we change DB columns from NOT NULL with DEFAULT to NULL with DEFAULT. This operation "materialize" column default.
Is there an easy way (Dictionary view) how to find, that COLUMN default value is stored as metadata or is "materialized" ?
Thanks. Filip
Oracle RDBMS version : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionThanks for your suggestion, but it is not what i'm looking for :-(
I don't need to find the default value, i need to know how is default value stored. It could be stored in 2 ways.
1. "materialized" - prior to 11G (value is physicaly stored for every column)
2. "as a metadata" - new 11G functionality (default is not physicaly stored and if you query the column DB transalte NULL value to defaut value)
Now I would like to now if my column is type 1) or 2). How can I do it?
Thank you.Filip -
How to find RFC names in e-commerce application JSPs or in Java coding.
Hi Experts.
Please explain me ,how to find RFC names which were used in e-commerce b2b/b2c applications in Java coding using SAP NWDS IDE.
Thanks in Advance!!!!
Regards,
KiranThere are two ways to do this.
I. Create your own Session Log file
1. Go to http://url:port/b2b/admin/index.jsp
2. Login with Admin user id and password.
3. Click on 'Logging' from the left hand navigation
4. Click on 'Session Logging' tab
Here you can start your e-commerce application using a URL and 'Start' session logging when you need it. When you 'Stop' the session logging, you will see a log file for download.
II. View ISA Log files in the system
The path varies based on how the log config was done. But usually, if you look in this folder structure on the Java Stack, you will see log files.
.../JC00/j2ee/cluster/server0/log/applications/..
I hope this helps.
Pavan -
How to find index name with primarykey and column on a table?
Hi,
how to find index name with primarykey and column on a table?
please help me.
Thankyou.1 select ac.table_name, ac.index_name, aic.column_name
2 from user_constraints ac, user_ind_columns aic
3 where ac.constraint_type = 'P'
4 and ac.index_name = aic.index_name
5* order by 1,2,3
SQL> /
TABLE_NAME INDEX_NAME COLUMN_NAME
ACTION_TABLE SYS_C0011033 NESTED_TABLE_ID
ACTION_TABLE SYS_C0011033 SYS_NC_ARRAY_INDEX$
CATEGORIES_TAB SYS_C0011038 CATEGORY_ID
CUSTOMERS CUSTOMERS_PK CUSTOMER_ID
INVENTORIES INVENTORY_IX PRODUCT_ID
INVENTORIES INVENTORY_IX WAREHOUSE_ID
LINEITEM_TABLE SYS_C0011034 NESTED_TABLE_ID
LINEITEM_TABLE SYS_C0011034 SYS_NC_ARRAY_INDEX$
ORDERS ORDER_PK ORDER_ID
ORDER_ITEMS ORDER_ITEMS_PK LINE_ITEM_ID
ORDER_ITEMS ORDER_ITEMS_PK ORDER_ID
PRODUCT_DESCRIPTIONS PRD_DESC_PK LANGUAGE_ID
PRODUCT_DESCRIPTIONS PRD_DESC_PK PRODUCT_ID
PRODUCT_INFORMATION PRODUCT_INFORMATION_PK PRODUCT_ID
PROMOTIONS PROMO_ID_PK PROMO_ID
WAREHOUSES WAREHOUSES_PK WAREHOUSE_ID
16 rows selected. -
How to find the name of the program of session in sm35 ?
I have some session in sm35.
How to find the name of the program of session in sm35 ?
Could you please help me ?In the list of sessions displayed -> double click the session that an error (i.e. Transaction Ended with errors).
Then it will take you to another screen, here you choose the Screens tab.
Check
Re: BDC session's program name
Re: BDC session's program name
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha -
How to find Object name for a object?
Hi Experts,
How to find Object name for a particular Object? Is there a Tcode for it?
__Like Object name for__
Material number - materialnr
Goods receipts / return - matbeleg
Accounting documents - rf_beleg
How to find Object name for other Objects? Is there a particular way?
Thanks & Regards
ChandanHi,
You can find objects in SNRO transaction.
In SNRO search by giving long text...
for eg., Service .. for service entry sheet. keep the first letter in capital letter only.
Thanks & Regards,
Anand. -
How to find Program Name by Recording name
Hi,
How o find program name ? for example i have recording(SHDB) name is:ZVA01REC.
i want to find the respective porgram for that recoring?
Thanks and Regards,
Anu.Hi Anitha,
"No it's showing standard program name like:SAPMM06E
but actual program name is:ZBDCME22."
SAPMM06E is the program the recording runs
ZBDCME22 must be an additional program that someone must have created for running the recording.
There is no way for u to find a program for a given recording (this is only a one way trafic; recording -> program create; not visa versa)
your best bet would be that search in se38 for programs starting with ZBDC* and then check the short text. may be the person who made it was kind enough to update the short text with teh recording name.
Hope this was of some help.
Regards,
Sagar.
Edited by: Sagar Mehta on Nov 12, 2008 10:00 AM -
How to pass tag name and value dynamically in the output of PCo notification?
Hi,
I have a requirement to develop such a scenario where there can be multiple no of tags in PCo (Say 10) but there will be single notification to push the tag name when the value got changed and the changed value to MII. for any value change for any of the tag, the notification will be trigger. So As per my knowledge I have to pass the tag name and value dynamically in the "output" tab of the notification. But need your support to find out how to pass them dynamically.
Thanks in advance.
Regards,
SumanHi Suman/Jeedesh,
As per Pco notification, it will trigger whenever any of the tag value changes in Agent instance subscription items.
For above issue, My suggestion
1. Create DB table name TAGLIST with 200 tags as rows in columns (Tagname, TagValue)
2. Based on notification trigger, create a transaction and update values w.r.t TagNames in above table
3. Next time, when notification trigger with fresh value for any of the tag, cross check with existing TagName with Value and update in DB table.
4. And in the mean time, send those Tag details vie mail trigger or as per requirement
Instead of creating 200 notification, above is a just alternate way suggestion to achieve dynamic tag value change notification.
Hope it might solve your problem
Regards,
Praveen Reddy -
Interval partitioning. How to choose partition name
Hi all,
Is there any wat to choose partition name when new partitions are created?
I mean insted of "SYS_P101" something like CUSTOMRES_P_256 where 256 is the new value that caused the creation of the partition.
The reason is that before running a long process I need to gather statistics on the partition based on that number
Thanks in advance,You can rename a partition with your preferred naming convention:
alter table CUSTOMER rename partition SYS_P101 to CUSTOMRES_P_256;But first you need to know the name of the partition. One thing I have used in cases when an interval partition has not been created yet is to insert a record with the new partition key value so that the interval partition is created, then get the partition name and then roll back the insert. This way you know the partition name in advance of any data loading.
You can of course query dba_tab_partitions and look at the high_value column to select the correct partition. However, I prefer the following method of getting the partition name. It gives you the name of the partition for a row in a table. This is also useful for existing data (not just new partitions) if you ever need to find the partition where a certain row lives.
select subobject_name
into v_partition
from ALL_OBJECTS
where OWNER = 'SCHEMA_OWNER'
AND data_object_id in (select dbms_rowid.rowid_object(rowid)
from FACT_TABLE
where PARTITION_KEY_COL = MY_VALUE
and rownum = 1);You can then use the partition name to load your facts, gather statistics, or rename the partition. -
Hi
I just start to learn SQL server now. I am trying to migrate data from oracle to SQL server 2005 using SQL server migrant assistant for Oracle. But I don't know how to fiill this connection details
SQL Server host:
<ServerHost>
SQL Server port
(leave empty if default):
<8888>
SQL Server instance name
(leave empty if default):
<your_instance>
Target database:
<your_db_name>
Target schema:
dbo (by default)
User name:
<your_username>
Password:
<your_password>
How to find these properties? Anyone can help?
Thanks
Liset nocount on
Declare @key Varchar(100), @PortNumber varchar(20)
if charindex('\',CONVERT(char(20), SERVERPROPERTY('servername')),0) <>0
begin
set @key = 'SOFTWARE\MICROSOFT\Microsoft SQL Server\'+@@servicename+'\MSSQLServer\Supersocketnetlib\TCP'
end
else
begin
set @key = 'SOFTWARE\MICROSOFT\MSSQLServer\MSSQLServer\Supersocketnetlib\TCP'
end
EXEC master..xp_regread @rootkey='HKEY_LOCAL_MACHINE', @key=@key,@value_name='Tcpport',@value=@PortNumber OUTPUT
SELECT CONVERT(char(20), SERVERPROPERTY('servername')) ServerName,
CONVERT(char(20), SERVERPROPERTY('InstanceName')) instancename,
CONVERT(char(20), SERVERPROPERTY('MachineName'))
as HOSTNAME, convert(varchar(10),@PortNumber) PortNumber -
How to find the name of query for a given report
Hi All,
I am having the name of a report and i need to find out the name of query for that report . Plz tell me how to find out the name of the query for a given report.
Thanks.
Regards,
Pooja Joshi.Use this FM
RSAQ_DECODE_REPORT_NAME
This FM takes program name as I/P and gives Query Name as O/P.
This FM uses the structure AQADEF to fetch the data.
Hope this helps.
Regards
Vinayak
Maybe you are looking for
-
Backup failure from SAP after oracle upgrade
Hi All, We have upgraded oracle from 11.2.0.1.0 to 11.2.0.3.0 on windows 2008 R2 VM(64 bit). We are able to take backup successfully through BRtools at OS level but when we are trying through DB13 we are getting error as mentioned below. BR0274E File
-
Best Back-up UPS for MAC Pro?
What is the best back-up battery system to provide UPS and to allow my computer to shut down before the battery runs out? UPS modesl with Parachute worked in the past but I've seen reviews that they are not compatible with Lion. Any suggestions woul
-
Too many ejb serialization in pstore directory
Hello guys, my weblogic(8.1) is creating too many files in the directory /pstore and is consuming too much of my file system, it has actually reached 25GB in three days. I did not find any thing that could give any clue about what is going on. I wond
-
How to reinstall Vista with no Bloatware?​?
Hi guys, I was just wondering how to go about reinstalling my Windows Vista Business edition which came preinstalled with all these ads telling me to purchase various stuff from lenovo. Ideally i want to format the whole HDD, remove the hidden pariti
-
Missing pairing file what now?
just restored my ipad 1 to factory, and updated it to 5.1. When I try to connect to itunes it says it can not connect because pairing files are missing. What now?