PL/SQL :: DBMS_STATS.GATHER_DATABASE_STATS / Partition Doesn't Gets Analysed

Mar 20, 2013

If we provide an object filter list in dbms_stats.gather_database_stats specifying the partition name to be analysed , then the partition doesn't gets analysed.The version details are as below

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Solaris: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 -

ProductionAs already pointed out ,the version 11.2.0.3 is already having a bug for dbms_stats.gather_schema_stats where the object filter list doesn't work.Is this behaviour also a bug ?

View 8 Replies


ADVERTISEMENT

SQL & PL/SQL :: DBMS_STATS For Table Level Vs Partition Level

Nov 17, 2010

what is the difference on DBMS_STATS for table level and partition level , which will provide the best optimizer . If the table xxxx is partitioned from 1 to 10 ,then running gather stats on table xxxx as whole table level or partition level which will provide best result on the performance.

View 1 Replies View Related

Default Parameter For Statistic Generation / DBMS_STATS.SET_DATABASE_PREFS()

Dec 10, 2012

I am running a database version 11.2.0.3 on a RHEL 5.3 system.A nightly ETL job drops all tables of a certain schema and recreates them as part of this job.After recreation of the tables statistics are generated to make query execution faster.

The ETL job uses following statement to gather the statistics for each table: EXEC dbms_stats.gather_table_stats('SCHEMA', 'TABLE', cascade => TRUE); As we had performance issues on the database I analysed the statistics and found that there were no histograms collected for the tables although the data are skewed.

Therefore I searched a database wide parameter where I can change the default statistic collection method from 'SIZE AUTO' to 'SIZE SKEWONLY'. I found following method: DBMS_STATS.SET_DATABASE_PREFS () I used this package to set the database prefs to 'size skewonly' and recreated the statistics. All was fine. exec DBMS_STATS.SET_DATABASE_PREFS (pname=>'METHOD_OPT', pvalue=>'FOR ALL COLUMNS SIZE SKEWONLY');But one day later after the ETL job we had the same issue again. After a further analyse I saw that there were no histograms generated on the tables. It seems that the drop and recreation of the tables make the system wiede default parameter useless.

how to set system wide optimizer defaults even after dropping and recreating a table?

View 4 Replies View Related

SQL & PL/SQL :: Dropping Sub-partition / Range-partition And List Sub-partition

May 28, 2010

i have table with range partition and list sub-partition..can i add one more list sub-partition if it is not possible , i have to drop first sub-partition.

View 6 Replies View Related

SQL & PL/SQL :: Create Normal Partition Range On Date And Sub Partition List On Batch ID

Mar 17, 2011

I Know we can create dynamic partitions on table in oracle 11g. Is it possible to create normal partition and sub partition both dynamically.I have to create Normal partition range on date and sub partition list on Batch ID (varchar).

View 3 Replies View Related

Performance Tuning :: Select Partition Table With Non-partition Key Condition?

Jun 26, 2010

I have a table that partitioned into six partitions. each partitions placed in different table space and every two table space placed it on a different hardisk

when I will do query select with the non-partition keys condition, how the search process ? whether the sequence (scan sequentially from partition 1 to partition 6) or partition in a hardisk is accessed at the same time with other partition in other hardisk. ( in the image, partition 1,4 accessed at the same time with partition 2,5 and 3,6)

View 3 Replies View Related

SQL & PL/SQL :: Apply Redefinition And Create Range Partition And Hash Sub-partition?

Apr 3, 2013

At present we have a non partitioned table.

Can we apply redefinition and create range partition and hash sub partition on it?

View 2 Replies View Related

SQL & PL/SQL :: Add Range Sub-Partition To Hash Partition Table

Jan 2, 2013

Can I add range sub partition to a hash partition table. Example like this.

CREATE TABLE test
(
test_id VARCHAR2(10 ) ,
test_TYPE VARCHAR2(5) ,
CREATE_DATE date
)
partition by hash (test_id, test_type)
Partitions 3
SUBPARTITION BY RANGE (CREATE_DATE);

When Tried, I am getting syntax error as invalid option.

View 8 Replies View Related

SQL & PL/SQL :: Tables Activity - Inserted Partition Key Does Not Map To Any Partition

Sep 22, 2011

I have two tables Activity and Activity1.

Activity Structure
ACTIVITY_TYPE CHAR (1) NOT NULL,
ACTIVITY_DATE DATE DEFAULT sysdate NOT NULL,
ACTIVITY_ON VARCHAR2 (30) NOT NULL,
REFERENCE_NO VARCHAR2 (19),
CHILD_REFERENCE_NO VARCHAR2 (19),
USER_ID VARCHAR2 (30) DEFAULT user NOT NULL,
TERMINAL VARCHAR2 (30) DEFAULT userenv ('TERMINAL') NOT NULL )

Activity1 Structure Which I have Done Partitioning When I insert data from Activity to Activity1 it gives that error ORA-14400: inserted partition key does not map to any partition what I am doing wrong

CREATE TABLE ACTIVITY1(
ACTIVITY_TYPE CHAR (1) NOT NULL,
ACTIVITY_DATE DATE DEFAULT sysdate NOT NULL,
ACTIVITY_ON VARCHAR2 (30) NOT NULL,
REFERENCE_NO VARCHAR2 (19),

[code]....

Insert Statement

insert into ACTIVITY1(ACTIVITY_TYPE,
ACTIVITY_DATE,
ACTIVITY_ON,
REFERENCE_NO,
CHILD_REFERENCE_NO,

[code]....

View 2 Replies View Related

SQL & PL/SQL :: Adding A New Partition To Existing Partition Table

Jun 14, 2011

i want to create a new partition for version 2

existing table is as below

create table test
(
name varchar2(100),
version NUMBER(12)
)

[Code]....

View 15 Replies View Related

SQL & PL/SQL :: Can Drop Partition Based Indexes From A Particular Partition

Mar 3, 2011

I have partition based table one the basis of year month. And we have 8 local indexes on this table. Every month we have to create a new partition and load data into this partition and the volume of the data is around 14million and the load process is taking long time due to indexes. Is it possible to drop the indexes from particular partition?

View 8 Replies View Related

SQL & PL/SQL :: Partitioned Table - Inserted Partition Key Does Not Map To Any Partition

Jul 10, 2012

I have two tables in which one is partitioned table with the following details.

CREATE TABLE "SCOTT"."TBL_MITTAL"
("ACCOUNT_NAME" VARCHAR2(50 BYTE),
"BILL_NO" VARCHAR2(50 BYTE),
"BILL_DATE" VARCHAR2(50 BYTE),
"CLI" VARCHAR2(50 BYTE),
"ANI" VARCHAR2(50 BYTE),

[code].....

When I am trying to insert record from tbl_mittal into tbl_temp table. I am facing "ORA-14400: inserted partition key does not map to any partition" error

SQL> insert into tbl_temp select * from tbl_mittal;
insert into tbl_temp select * from tbl_mittal
*
ERROR at line 1:
ORA-14400: inserted partition key does not map to any partition

AS tbl_mittal is having hugh number of records so I am providing only few rows from tbl_mittal table as test data.

ACCOUNT_NAMEBILL_NOBILL_DATECLIANICHARGE_START_DATEDURFROM_LOCATIONTO_LOCATIONINVOICE_IDCIRCLE
10000010357423128271095119301-Feb-111723006000931488182328-JAN-11 11.30.54.000000000 AM59.04CHANDIGARHJAIPUR271095119
10000011844187128348720198715-Jun-121409470011825531896615-MAY-12 09.10.36.000000000 AM28.03CHANDIGARHBANTWAL348720198
10000011844187128348720198715-Jun-121409470011825531927115-MAY-12 09.10.41.000000000 AM38.32CHANDIGARHBANTWAL348720198
10000011844187128348720198715-Jun-121409470011825531933015-MAY-12 09.10.46.000000000 AM28.81CHANDIGARHBANTWAL348720198
10000011844187128348720198715-Jun-121409470011825531930215-MAY-12 09.10.53.000000000 AM28.96CHANDIGARHBANTWAL348720198

[code].....

I also tried to upload the same data using sqlldr.

sqlldr log file contents is as follows:

Total logical records skipped: 0
Total logical records read: 1857532
Total logical records rejected: 801092
Total logical records discarded: 37

[code].....

So some sqlldr bad file contents is as follows.

100000118441871,283487201987,15-JUN-12,1723958000,9355115251,10-JUN-12 05.56.05.000000 PM,36.99,CHANDIGARH,AMBALA,348720198,,
100000118441871,283487201987,15-JUN-12,1723958000,7520533825,10-JUN-12 05.56.14.000000 PM,44.12,CHANDIGARH,AGRA,348720198,,
100000118441871,283487201987,15-JUN-12,1723958000,9356452151,10-JUN-12 05.56.17.000000 PM,116.83,CHANDIGARH,JALANDHAR,348720198,,
100000118441871,283487201987,15-JUN-12,1723958000,9331223048,10-JUN-12 05.56.21.000000 PM,28.33,CHANDIGARH,KOLKATA,348720198,,
100000118441871,283487201987,15-JUN-12,1723958000,7827927893,10-JUN-12 05.56.24.000000 PM,3384.33,CHANDIGARH,DELHI,348720198,,

[code].....

View 2 Replies View Related

SQL & PL/SQL :: Updated PartitionID With Partition Number For Each Partition Set

Apr 12, 2010

needed in stored procedure to achieve this...how to get this..(stored procedure)

table:
studentid,sname,partitonid
901,x,null
902,y,null
903,z,null
904,p,null
905,q,null
906,a,null
907,b,null
908,d,null
909,f,null
910,m,null

For the above data set i need to divide into 5 partittions and need to updated the partitonid with the partition number for each partition set,like the below result set

studentid,sname,partitonid
901,x,p1
902,y,p1
903,z,p2
904,p,p2
905,q,p3
906,a,p3
907,b,p4
908,d,p4
909,f,p5
910,m,p5

View 3 Replies View Related

PL/SQL :: Alter Script For Adding Partition And Sub-partition

Mar 28, 2013

write ALTER STATEMENT for adding new partition P1 and SUBPARTITION P1_201001 and P1_201002.

TABLE
=======
CREATE TABLE TEST
(
"REPORT_ID"    NUMBER,
"MONTH_ID"      NUMBER,
"GROUP_ID"      NUMBER,
"AGE_GROUP_ID"  NUMBER,
[code]...........  

View 4 Replies View Related

Partition Size In A Partition Table

Jun 8, 2011

How to find the size pf a partition in a partition table?I guess we need to query views like dba_tab_partitions but I am not very sure. will running dbms_stats.gather_table_stats('schema_name,'table_name,'partition_name')

View 3 Replies View Related

Performance Tuning :: How To Assure Partition Table Is Better Than Non-partition Table

Mar 25, 2011

I think that performance better partition table than non-partition table. How to assure partition table is better than non-partition table at SELECT operation?

I have compare a specific query EXPLAIN PLAN at partition table and non-partition table. both tables data is same. Is it true way or not?

View 11 Replies View Related

SQL & PL/SQL :: How To Add Sub-partition To Existing Partition

Jul 17, 2010

I have a partitioned table in which at the first level it is been partitioned based on date column(C1) and within in each partition it is again sub-partitioned based on a column(C1) which is a numeric value now at first level(C1 column level) there are 6 partitions and in the last partition i want to add another partition how can i do that.

View 8 Replies View Related

SQL & PL/SQL :: Add Partition To Table Without Partition?

May 5, 2011

I am trying to add partition to table without partition

with following code

ALTER TABLE ACC_LOC1_TAB
ADD PARTITION testpart BY RANGE (ALT_AUTHDT)
(PARTITION UPTO_2010 values less than (31-mar-2010),
PARTITION APR_JUN_10 VALUES less than (30-JUN-2010),
PARTITION JUL_SEP_10 VALUES less than (30-SEP-2010),
PARTITION OCT_DEC_10 VALUES less than (31-DEC-2010),
PARTITION JAN_MAR_11 VALUES less than (31-MAR-2011))

it will raise error ora-14020

View 4 Replies View Related

Partition A Non-Partition Table In 11.2.0.1

Feb 21, 2013

I am using Oracle 11.2.0.1 Oracle Database.I have a table with 10 Million records and it's a Non Partitioned Table.

1) I would like to partition the table (with partition by range ) without creating new table . I should do it in the existing table itself (not sure DBMS_ REDEFINITION is the only option ) (or) can i use alter table ...?

2) Add one partition which will have data for the unspecified range.

View 5 Replies View Related

SQL & PL/SQL :: Why Doesn't Number Add Up When Do SUM On Column

Mar 21, 2011

I think I am having a rounding issue, but not sure. If I add all 4 rows below I get 1530.06. But when I use SUM, I get 1529.87

select PAY_EVENTS_AMOUNT
from PAYROLL_PAY_EVENTS_T1 PPET1
where ppet1.regnum = 130402134
and ppet1.pay_period = 2

PAY_EVENTS_AMOUNT
=================
-1499.19
2998.38
-30.68
61.36
=======
1530.06 TOTAL

========================================================

select sum(PAY_EVENTS_AMOUNT ) PAY_EVENTS_AMOUNT
from PAYROLL_PAY_EVENTS_T1 PPET1
where ppet1.regnum = 130402134
and ppet1.pay_period = 2

PAY_EVENTS_AMOUNT
=================
1529.87 TOTAL

View 12 Replies View Related

RAC - Listener - VIP Doesn't Migrate From One Node To Another

Apr 17, 2012

I have the following problem on a 10.2.0.4 Oracle on AIX 1.6..I have 2 RAC nodes as the node # 2 goes down, the VIP migrated correctly to the node # 1, but the listener # 1 do not see the change, and just resolve to the local ip.

The same does not apply in the reverse case, when it drops the node N 1, the listener attends to the fallen VIP node and migrated.The configuration is correct and identical in both nodes, according to the documentation, but I can not find a reasonable answer.

IP node # 1.
scm1or01 192.68.60.11
scm1or01-VIP 192.68.60.13

IP node # 2
scm1or02 192.168.60.12
scm1or01-VIP 192.168.60.14

when scm1or02 is down: scm1or01:/cots/oracle/app/oracle/product/10.2.0/db_1/network/admin> lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 11-APR-2012 19:56:46
Copyright � 1991, 2007, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_SCM1OR01
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 11-APR-2012 16:50:19
[code]...

I do not understand the reason, I've rebuilt the configuration of the listener, and netmgr netca tools, but the problem persists

View 3 Replies View Related

Doesn't Calculate Any Excel Functions

Jul 26, 2010

My applications is integrate with Excel 2003 by Ole2 package. Some of them excel books are using functions activates with Excel Complements (activate with men options: Tools-Complements-Analyisis Complements and Analysis complements VBA).

The problem is when I invoke this excel book in Oracle Forms, this functions don't work.

View 3 Replies View Related

Listener Doesn't Currently Know Of Service Requested

Jul 15, 2010

I am using Oracle 10g and when i start my server then my database is running and my application use this database.But after 15 min automatically application show this error

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

View 1 Replies View Related

SQL & PL/SQL :: Oracle Procedure Doesn't Work On Web

Jul 28, 2010

I was working on an applications program It is written in PL/SQL . It is running on an oracle 8i database It was not written by me but now I am responsible of it. I made some changes to database tables for this years regulations. Everything was working fine but yesterday I have recompiled two of the packages for some regulations and one of the procedures was stopped working.

It is called 'sayfa2'. Packages names are 'aday1' and 'aday2'. They both have a procedure called sayfa2 and both of them don't work now. They gave me no compilation errors. All I did is I have copied the original code from toad and compiled it at sqlplus I have changed nothing except some texts inside html tags. I couldn't guess what is wrong.

It actually converts to html pages. All procedures are working fine except sayfa2. aday1 is for to fill information and submit but when I click submit button it gives an error:

The requested URL /pls/kon/aday1.sayfa1 was not found on this server. Oracle HTTP Server Powered by Apache/1.3.19 Server at ...

There is also a problem with Turkish characters they don't appear correctly.

Below is sayfa2 and I also added aday1 package could you have a look at it .

PROCEDURE sayfa2(stuid VARCHAR2,tckimlik VARCHAR2, ad VARCHAR2, ad2 VARCHAR2, soyad VARCHAR2,
sex VARCHAR2, mdurum VARCHAR2, bad VARCHAR2, aad VARCHAR2,
dyer VARCHAR2, dgun VARCHAR2, day VARCHAR2, dyil VARCHAR2,
nil VARCHAR2, nilce VARCHAR2, nkoy VARCHAR2, cilt VARCHAR2,
asira VARCHAR2, sira VARCHAR2, asuba VARCHAR2, kang VARCHAR2, agorev VARCHAR2,
[code].......

View 10 Replies View Related

Forms :: Go_block Doesn't Seem To Work?

May 7, 2013

I have a master block (MASTER with Item 1 and 2) and details block (DETAILS). If the user enters the query mode and queries the Master block, the Details get populated automatically. So far so good.

Now I attached an LOV to Item 1 in the Master Block and the requirement is that when the user picks an item in the LOV, the details should automatically populate. Because of "restricted procedures" (GO_BLOCK) in triggers, I put a Button in a Control Data Block and the code in the WHEN-BUTTON-PRESSED trigger is as follows :

GO_BLOCK('DETAILS');
EXECUTE_QUERY;

It does go to the Details block and also displays all the details. However, when I try to update, insert or delete data, it fails with "Insufficient Privileges". So when I looked at the query being executed (Cntrl + Shift + E), I can see that it is trying to perform these operations on the Master block. (ie for some reason the scope is still in the Master and not Details even after Go_Block(DETAILS) has been executed.

I then tried to use Go_Item('DETAILS.Dept_No') to see if that would work. That too did not work. I tried to set the Navigation Style on these Data Blocks to "Change Data Block". Still no success.

View 3 Replies View Related

SQL & PL/SQL :: ORA-14251 - Specified Subpartition Doesn't Exist

Jun 12, 2013

why Oracle is saying my sub partition does not exist when I can clearly see it?

Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0

SQL> SELECT table_name,
2 partition_name,
3 subpartition_name
4 FROM user_tab_subpartitions
5 WHERE table_name = 'DAY_NETWORK_AGG'
6 AND subpartition_name = 'P_USER_1_P_201302010000';
[code].....

ORA-14251: Specified subpartition does not exist

This is what I used to create the table and I have yet to put any data in it, so I am wondering if Oracle doesn't really create the subpartitons from the template until there is actual data.

CREATE TABLE day_network_agg(
partition_date DATE,
user_id NUMBER,
[code].....

View 4 Replies View Related

SQL & PL/SQL :: SELECT Works But View Doesn't

Jun 11, 2012

I'm trying to create a view that includes both custom and delivered tables. The SQL code produces the desired results in SQL Developer. However, when I create and test the view using that code, I get very different and incorrect results. The SQL part of the view is below:

SELECT j.emplid, pt.deptid, pt.y_policy_id, pt.effdt, pt.title, pt.comments, pt.y_policy_covg, pt.doc_url
FROM psoprdefn a
, ps_job j
, ps_y_policy_tbl pt
WHERE substr(a.oprid,1,1) = '0'
AND a.emplid = j.emplid
AND j.job_indicator = 'P'
AND j.effdt = (SELECT MAX(effdt) FROM ps_job
WHERE emplid = j.emplid AND empl_rcd = j.empl_rcd AND effdt <= sysdate)
[code]....

View 8 Replies View Related

SQL & PL/SQL :: Execute Immediate Doesn't Like Dynamic String

Feb 29, 2012

why is this procedure with EXECUTE IMMEDIATE not working for me, when I pass a dynamic string to it.

this is the proc:

CREATE OR REPLACE FUNCTION MIGRATION.execute_sql (pSQL varchar2) RETURN varchar2 IS
vResult Varchar(200);
BEGIN
vResult := null;
[code]......

and when I invoke it like this it's fine:

select execute_sql ('select sysdate from dual') test from dual. However, when I try something like this, it won't work:

select execute_sql ('select max(al_code) from alert_log where al_user= '||user) test_sql from dual

the error message I get is:

ORA-00904: "MIGRATION": invalid identifier
ORA-06512: at "MIGRATION.EXECUTE_SQL", line 26

View 11 Replies View Related

PL/SQL :: Procedure Doesn't Return Values

Nov 29, 2012

I have a stored procedure which has varchar2 as IN and sys_recursor has OUT parameters.

CREATE OR REPLACE PROCEDURE check_values (
     my_values            IN          emp.dept_no%TYPE,
     p_cursor        OUT sys_refcursor
)

[Code]....

/The problem I am facing is in where condition, if I give quoteValues it doesn't fetch me any records when I execute the procedure from sqlplus, but if I am giving my_values it does fetch me records. I am receiving IN parameters like 9856,9712,8723, so first I put single quote around the emp_no and pass that to where condition.

How can I resolve this issue?

View 15 Replies View Related

PL/SQL :: - NO_DATA_FOUND But Triggers Doesn't Continue Job

Sep 9, 2012

i've a problem regarding my code at line: 76. URL....

If i put a RAISE_APPLICATION_ERROR just before:
SELECT ID_GIOCATORE INTO CONTR_GIOCATORE2
FROM COMP_CONTR_GIOCATORE_PARTITA GC JOIN CONTRATTO C ON GC.ID_CONTRATTO = C.ID_CONTRATTO
WHERE GC.ID_PARTITA = :NEW.ID_PARTITA AND (C.ID_CASELLA = 28 OR C.ID_CASELLA = 12) AND C.ID_CASELLA <> :NEW.ID_CASELLA AND
[code]....

But if i put the RAISE_APPLICATION_ERROR just after this statement and before IF(CONTR_GIOCATORE2 IS NOT NULL AND CONTR_GIOCATORE2 = CONTR_GIOCATORE) THEN, nothing happens after the insert(that goes well) and the trigger doesn't do his job(insert,update etc). if i do that select, i got the no data found, so i put the exception to set the variable CONTR_GIOCATORE2 to NULL.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved