I am looking at a performance issue at the moment and trying to replicate on a test system. I am initially looking at the impact of upto-date statistics on the main schema's objects.
For this I wanted to:
first run the batch with whatever stats were present in the database Flashback the db to before the batch . Gather stats Re-run the batch with updated stats and compare results.
However, I inadvertently ran the stats job before running the load the first time! I have the SCN from when the environment was set up like production (ie before the stats were run) so am I correct in saying that if I flashback to this point then the stats will be "old" and I can just run the batch then? I know I can verify this when I Flashback the database by looking at LAST_ANALYZED on tables etc but it would be good to know this before hand as it's a 12 hour batch.
While trying partition exchange feature of Oracle with 2 hash partitioned tables, I come to know that I can't directly exchange partitions between 2 partitioned tables
I have two hash partitioned tables , so to move partition data from one table to another will include-
1) Exchange from partitioned table to non-partitioned table. 2) exchange from non-partitioned table to new partitioned table.
But I am not sure in which hash partition my data will go in new partitioned table (data need to be moved has single key value on basis of which tables are partitioned),
The table tb_hxl_hash have two partitions,when i exchange the second partition,it raise error,why?
SQL> Alter Table tb_hxl_hash 2 Exchange Partition P_HS1 With Table tb_hxl_test;
Table altered.
SQL> Alter Table tb_hxl_hash 2 Exchange Partition P_HS2 With Table tb_hxl_test; Exchange Partition P_HS2 With Table tb_hxl_test * ERROR at line 2:ORA-14099: all rows in table do not qualify for specified partition
I have an Oracle Package with a procedure in which
package with a procedure in which there is a truncate partition, ALTER TABLE table_name TRUNCATE partition_name DROP STORAGE and the all is run with an EXECUTE IMMEDIATE 'alter table ...' .
The point is that the procedure in the package is started from another DB via DB Link (schema USER1) and doesn't work because of lack of privileges.
Instead, if the same procedure is started as a procedure, standalone, not in the package but from the same user (USER1) it works perfectly.
Don't understand why and which privileges must give to the user to run the procedure from inside the package.
I am using oracle11g. I want to truncate subpartition on specific partion.
I have partition on statewise. Each state partion has 7 day sub partition.
For intance,
Partion TX Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
Partion CA Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
Partion IA Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
Now i want to perform following tasks.
1. Need to truncate TUE sub partiion on TX partition. 2. Need to truncate WED sub partiion on CA partition. 3. Need to truncate SUN sub partiion on IA partition.
How do we do this?
The below statment truncate all TUE partition on all the partitions.
ALTER TABLE TRX_TABLE TRUNCATE SUBPARTITION TUE;
How do i tuncate specfic sub partition on specific partition?
i have one question that why oracle not set high water mark when we delete data from a table and commit it, on the other hand it set in case of truncate.both of these statement release physical structure(in case of delete after commiting)
i have one procedure that run at same time for two different partition.In the begin of the processes i do the truncate partition and after that the insert of data in the partition.Since i have two processes running at the same time, i will fill up data in two different partition.
But it occurred one error : "ORA-00054: resource busy and acquire with NOWAIT specified"
The problem is caused by the truncate partition. I'm doing two simultaneous execution of the same process, but when one process is doing the truncate other is insert data.How can i do the truncate of this two partition, or insert in to, without get any error. I think the two simultaneous insert is not a problem.
So how can i lock the table in the first truncate and after that release the table for the next truncate?
How to truncate the partition based on the given input. I've below table partitioned on dt field. How can i truncate the whole partition which contain the date 2013/04/30.
CREATE TABLE TST_SUMMARY ( CUST_ID NUMBER(38) NOT NULL ,
when we try to truncate the parent table data although its child tables are empty, the oracle oracle throws an error--"ORA-02292: integrity constraint test_id_constr violated - child record found" , but when we delete this parent table data by "delete" statement then it gets deleted. what is the logic behind "truncate".
My requirement is to to truncate the table and load it with the data present in file. In the control file, I used the "TRUNCATE" command as well.In case, if the file has some invalid data and sqlldr fails, my existing data will be lost. Is there any option in which the sqlldr does not TRUNCATE the table in case of a failure.
create table tb_hxl_user_rh ( statedate number(8), provcode number not null, usernumber varchar2(13) not Null ) partition by range (statedate) ( partition HXL_USER_20110516 values less than (to_number(to_char(TO_DATE('2011-05-17 00:00:00', 'YYYY-MM-DD HH24:MI:SS'),'YYYYMMDD'))) );
ORA-14019: partition bound element must be one of: string, datetime or interval literal, number, or MAXVALUE
i want to create tablespace in raw partion on windows.I have added a hard disk and added extended partition to it. Then created 4 logical partitions of 256 MB with diskpart.exe.I have assigned a drive letter to one of them as X:
However, I am having trouble in creating tablespace on it. I referred to [URL]... I get following error,
C:UsersAdministrator>sqlplus SQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 17 15:32:17 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. Enter user-name: SYSTEM Enter password:
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing opti
How can i check a partition whether it has been compressed? just as flowing test,i can not get the information about partition P_L1 whether been compressed.
SQL> Select 2 aa.compression, 3 aa.partition_name 4 From dba_tab_partitions aa 5 Where aa.table_name = 'TB_HXL_LIST';
If I am not using data of many partitions in any way, will it affect my performance if I am firing select query that uses other/active partitions data.
How can I check when that partitioned was last accessed, also can I brought those inactive partitions offlie? If we can, what will be the advantages or disadvantages of that?
I am not able to exchange partition by following below steps:
drop table manu_tst_hashed_tbl_org; drop table manu_tst_hashed_tbl_bkp; drop table manu_tst_smpl_tbl; CREATE TABLE manu_tst_hashed_tbl_org
[code]...
and getting the below erro:
ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION 14097. 00000 - "column type or size mismatch in ALTER TABLE EXCHANGE PARTITION" *Cause: The corresponding columns in the tables specified in the ALTER TABLE EXCHANGE PARTITION are of different type or size *Action: Ensure that the two tables have the same number of columns with the same type and size.
I have one user CD_APP. I have one partition table CD.T_FCDR_DT. User has got ALTER/INSERT/UPDATE/DELETE/SELECT privileges on the table..
Now when I try to drop a partition, I get error as below: ------------------------------------- SQL> show user USER is "CD_APP" SQL> ALTER TABLE CD.T_FCDR_DT DROP PARTITION D01 UPDATE GLOBAL INDEXES; ALTER TABLE CD.T_FCDR_DT DROP PARTITION D01 UPDATE GLOBAL INDEXES * ERROR at line 1: ORA-01031: insufficient privileges -------------------------------------- Do I have to grant some other privileges for this user.