Regarding Partition Table:Spilt Partition
Hi ,
I have create one partition table. I did range partitioned on this .original table has 1035 Millions records.
table has data from Jan 2008 to till May.I have create one partition of Jan-2008 to March 2009.
Name is PS_INTRIMDETAIL_TILL_MAR2009 .This Partition has one table space
Which has Five datafile of 20 GB.
Next Onwards Partitions are Apr2009,May2009 this partitons are Monthwise.
Now I want to split this PS_INTRIMDETAIL_TILL_MAR2009 partition on quaterly basis.
Kindly suggest me how can I split this partiton.
I also want to know the appropriate tablespace size for split partition.
Hello,
Here;s how you can split your partition by quartely
ALTER TABLE TBLMEDRATINTRIM_DETAIL_ROAM_01
SPLIT PARTITION PS_INTROAM_TILL_MAR2009 AT
(TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
INTO (PARTITION PS_INTROAM_TILL_Q4
TABLESPACE TABLESPACE TS_INTROAM_TILL_MAR2009
PARTITION PS_INTROAM_TILL_MAR2009);
ALTER TABLE KLONDIKE.TBLMEDRATINTRIM_DETAIL_ROAM_01
SPLIT PARTITION PS_INTROAM_TILL_Q4 AT
(TO_DATE(' 2008-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
INTO (PARTITION PS_INTROAM_TILL_Q3
PARTITION PS_INTROAM_TILL_Q4);
ALTER TABLE KLONDIKE.TBLMEDRATINTRIM_DETAIL_ROAM_01
SPLIT PARTITION PS_INTROAM_TILL_Q3 AT
(TO_DATE(' 2008-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
INTO (PARTITION PS_INTROAM_TILL_Q2
PARTITION PS_INTROAM_TILL_Q3);
ALTER TABLE TBLMEDRATINTRIM_DETAIL_ROAM_01
SPLIT PARTITION PS_INTROAM_TILL_Q2 AT
(TO_DATE(' 2008-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
INTO (PARTITION PS_INTROAM_TILL_Q1
PARTITION PS_INTROAM_TILL_Q2);To compress old partitions;
You can create one temp compressed for one quaretly partiton, you can repeat this process
1. create table Q1_cmp tablespace <ts_name> compress as select * from TBLMEDRATINTRIM_DETAIL_ROAM_01 where CALLEND between to_date('20080101,'YYYYMMDD') and to_date('20080331','YYYYMMDD');
2. Then exchange Q1 uncompressed partition with Q1_cmp
ALTER TABLE TBLMEDRATINTRIM_DETAIL_ROAM_01
EXCHANGE PARTITION PS_INTROAM_TILL_Q1
WITH TABLE Q1_CMP
EXCLUDING INDEXES
WITHOUT VALIDATION;
3. Then just rename partition back to original nameyou are in telecom and are you saving CDRs or MSUs, so tablespace size depends upon the volume. I suggest to go with the default value of 32 gig and I think it will grow upto 20 G
create tablespace q1_ts datafile '/location/q1_ts/q1_tsdat01.dbf' size 512M autoextend on next 256M maxsize unlimited.Hope this helps
Regards
Similar Messages
-
ORA-00604 ORA-00904 When query partitioned table with partitioned indexes
Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
Query runs fine when query the partitioned table without partitioned indexes.
Here is the query.
SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
al27.accessory_code
FROM vlc.veh_vdc_accessorization_fact al1,
vlc.vdc_dim al2,
vlc.model_attribute_dim al7,
vlc.ppo_list_dim al18,
vlc.ppo_list_indiv_type_dim al23,
vlc.accy_type_dim al27
WHERE ( al2.vdc_id = al1.vdc_location_id
AND al7.model_attribute_id = al1.model_attribute_id
AND al18.mydppolist_id = al1.ppo_list_id
AND al23.mydppolist_id = al18.mydppolist_id
AND al23.mydaccytyp_id = al27.mydaccytyp_id
AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
AND al2.vdc_name IN
('PORT OF BALTIMORE',
'PORT OF JACKSONVILLE - LEXUS',
'PORT OF LONG BEACH',
'PORT OF NEWARK',
'PORT OF PORTLAND'
AND al27.accessory_code IN ('42', '43', '44', '45')
GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_codeI would recommend that you post this at the following OTN forum:
Database - General
General Database Discussions
and perhaps at:
Oracle Warehouse Builder
Warehouse Builder
The Oracle OLAP forum typically does not cover general data warehousing topics. -
Convert non-partition table to partition table
Hello Everybody
I am just want to ask about how to Convert non-partition table to partition table ?
Thanks
Ramez S. SawiresDear ARF
First of all thank you for replying me , second do u have any links talking about dbms_redefinition package
I am using Database Oracle 10g
Thanks
Ramez S. Sawires
Message was edited by:
Ramez S. Sawires -
"A GUID Partition Table (GPT) partitioning scheme is required."
Hi.
Im trying to encrypt an external HDD and it says "A GUID Partition Table (GPT) partitioning scheme is required."
Im aware HDD needs a MAC OS Plus (Journaled), I have check disk Information and its formated as MAC OS Plus (Journaled), so why its keep saying to a GPT Partion scheme is required)
Any idea on how to overcome this?
Thanks!Issue was with partition map, it was Apple instead GUID as listed in diskutil list
-
Move data from Non Partitioned Table to Partitioned Table
Hi Friends,
I am using Oracle 11.2.0.1 DB
Please let me know how can i copy /move the data from Non -Partitioned Oracle table to the currently created Partiotioned table.
Regards,
DB839396 wrote:
Hi All,
Created Partitioned table but unable to copy the data from Non Partitioned table:
SQL> select * from sales;
SNO YEAR NAME
1 01-JAN-11 jan2011
1 01-FEB-11 feb2011
1 01-JAN-12 jan2012
1 01-FEB-12 feb2012
1 01-JAN-13 jan2013
1 01-FEB-13 feb2013into which partition should row immediately above ("01-FEB-13") be deposited?
[oracle@localhost ~]$ oerr ora 14400
14400, 00000, "inserted partition key does not map to any partition"
// *Cause: An attempt was made to insert a record into, a Range or Composite
// Range object, with a concatenated partition key that is beyond
// the concatenated partition bound list of the last partition -OR-
// An attempt was made to insert a record into a List object with
// a partition key that did not match the literal values specified
// for any of the partitions.
// *Action: Do not insert the key. Or, add a partition capable of accepting
// the key, Or add values matching the key to a partition specification>
6 rows selected.
>
SQL>
SQL> create table sales_part(sno number(3),year date,name varchar2(10))
2 partition by range(year)
3 (
4 partition p11 values less than (TO_DATE('01/JAN/2012','DD/MON/YYYY')),
5 partition p12 values less than (TO_DATE('01/JAN/2013','DD/MON/YYYY'))
6 );
Table created.
SQL> SELECT table_name,partition_name, num_rows FROM user_tab_partitions;
TABLE_NAME PARTITION_NAME NUM_ROWS
SALES_PART P11
SALES_PART P12
UNPAR_TABLE UNPAR_TABLE_12 776000
UNPAR_TABLE UNPAR_TABLE_15 5000
UNPAR_TABLE UNPAR_TABLE_MX 220000
SQL>
SQL> insert into sales_part select * from sales;
insert into sales_part select * from sales
ERROR at line 1:
ORA-14400: inserted partition key does not map to any partition
Regards,
DB -
Why I cannot split a partition table whose partitions are in a tablespace?
SQL> CREATE TABLE "GDRK"."LT2_701C_RANGE"
2 ( "CHAR_CODE" VARCHAR2(40),
3 "STAT_UNIT_CODE" VARCHAR2(20),
4 "ORGN_TYPE_CODE" CHAR(1) NOT NULL ENABLE,
5 "ORGN_CODE" VARCHAR2(26) NOT NULL ENABLE,
6 "ORGN_NAME" VARCHAR2(60) NOT NULL ENABLE,
7 "UUID" VARCHAR2(36) NOT NULL ENABLE,
8 "CYC_CODE" VARCHAR2(2) NOT NULL ENABLE,
9 "H10" VARCHAR2(2),
10 "H11" VARCHAR2(3),
11 "H12" VARCHAR2(1),
12 "H13" VARCHAR2(1),
13 "H14" VARCHAR2(1),
14 "H15" VARCHAR2(1),
15 "H16" VARCHAR2(1),
16 "H17" VARCHAR2(1),
17 "H18" VARCHAR2(1),
18 "H19_01" VARCHAR2(3),
19 "H19_02" VARCHAR2(1),
20 "H2" VARCHAR2(1),
21 "H20" VARCHAR2(4),
22 "H3_01" VARCHAR2(2),
23 "H3_02" VARCHAR2(2),
24 "H4_01" VARCHAR2(1),
25 "H4_02" VARCHAR2(1),
26 "H5_01" VARCHAR2(1),
27 "H5_02" VARCHAR2(1),
28 "H6" VARCHAR2(1),
29 "H7" VARCHAR2(1),
30 "H8" VARCHAR2(1),
31 "H9" VARCHAR2(4),
32 "REG_NUM" NUMBER,
33 "ERA_NUM" NUMBER,
34 "POWER_1" FLOAT(126),
35 "POWER_2" FLOAT(126)
36 )
37 PARALLEL
38 partition by range(CHAR_CODE) --substr(c1,1,1)
39 (
40 partition p0 values less than ('10'),
41 partition p1 values less than ('20'),
42 partition p2 values less than ('50'),
43 partition p5 values less than (maxvalue));
Table created.
SQL> set timi on
SQL> insert /*+ append */ into LT2_701C_RANGE select * from LT2_701C;
539398 rows created.
Elapsed: 00:00:28.02
SQL> commit;
Commit complete.
Elapsed: 00:00:00.06
SQL> select count(*) from LT2_701C_RANGE partition(p0);
COUNT(*)
0
Elapsed: 00:00:00.00
SQL> c/p0/p5
1* select count(*) from LT2_701C_RANGE partition(p5)
SQL> /
COUNT(*)
0
Elapsed: 00:00:00.02
SQL> c/p5/p2
1* select count(*) from LT2_701C_RANGE partition(p2)
SQL> /
COUNT(*)
539398
Elapsed: 00:00:01.15
SQL> ALTER TABLE LT2_701C_RANGE SPLIT PARTITION p2 at ('4420')INTO (
2 PARTITION p20,
3 PARTITION p21);
ALTER TABLE LT2_701C_RANGE SPLIT PARTITION p2 at ('4420')INTO (
ERROR at line 1:
ORA-01652: unable to extend temp segment by 128 in tablespace EPRAS
Elapsed: 00:00:00.89SQL> drop table LT2_701c_RANGE;
Table dropped.
Elapsed: 00:00:00.58
SQL> drop index idx_c_p2;
drop index idx_c_p2
ERROR at line 1:
ORA-01418: specified index does not exist
Elapsed: 00:00:00.00
SQL> CREATE TABLE "GDRK"."LT2_701C_RANGE"
2 ( "CHAR_CODE" VARCHAR2(40),
3 "STAT_UNIT_CODE" VARCHAR2(20),
4 "ORGN_TYPE_CODE" CHAR(1) NOT NULL ENABLE,
5 "ORGN_CODE" VARCHAR2(26) NOT NULL ENABLE,
6 "ORGN_NAME" VARCHAR2(60) NOT NULL ENABLE,
7 "UUID" VARCHAR2(36) NOT NULL ENABLE,
8 "CYC_CODE" VARCHAR2(2) NOT NULL ENABLE,
9 "H10" VARCHAR2(2),
10 "H11" VARCHAR2(3),
11 "H12" VARCHAR2(1),
12 "H13" VARCHAR2(1),
13 "H14" VARCHAR2(1),
14 "H15" VARCHAR2(1),
15 "H16" VARCHAR2(1),
16 "H17" VARCHAR2(1),
17 "H18" VARCHAR2(1),
18 "H19_01" VARCHAR2(3),
19 "H19_02" VARCHAR2(1),
20 "H2" VARCHAR2(1),
21 "H20" VARCHAR2(4),
22 "H3_01" VARCHAR2(2),
23 "H3_02" VARCHAR2(2),
24 "H4_01" VARCHAR2(1),
25 "H4_02" VARCHAR2(1),
26 "H5_01" VARCHAR2(1),
27 "H5_02" VARCHAR2(1),
28 "H6" VARCHAR2(1),
29 "H7" VARCHAR2(1),
30 "H8" VARCHAR2(1),
31 "H9" VARCHAR2(4),
32 "REG_NUM" NUMBER,
33 "ERA_NUM" NUMBER,
34 "POWER_1" FLOAT(126),
35 "POWER_2" FLOAT(126)
36 )
37 PARALLEL
38 partition by range(CHAR_CODE) --substr(c1,1,1)
39 (
40 partition p0 values less than ('4410'),
41 partition p1 values less than ('4420'),
42 partition p2 values less than ('4450'),
43 partition p5 values less than (maxvalue));
Table created.
Elapsed: 00:00:00.22
SQL> insert /*+ append */ into LT2_701C_RANGE select * from LT2_701C;
insert /*+ append */ into LT2_701C_RANGE select * from LT2_701C
ERROR at line 1:
ORA-01688: unable to extend table GDRK.LT2_701C_RANGE partition P0 by 128 in
tablespace EPRAS
Elapsed: 00:00:06.20
SQL> show parameter recy
NAME TYPE VALUE
buffer_pool_recycle string
db_recycle_cache_size big integer 0
recyclebin string OFF -
GUID partition table/Apple Partition Map
Hello,
I just bought recently a Seagate FreeAgent Go for Mac and I'm planning on using it with Time Machine. My question is the following: since the Seagate is partitioned following the GUID partition table, and my mac's internal HD is partitioned according to the Apple Partition Map; would that affect in any way the backups?
Thx!From http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/diskutil .8.html
the +APMFormat specifies that an Apple Partition Map scheme should be used. This is the traditional Apple partitioning scheme used to start up a PowerPC-based Macintosh computer, to use the disk as a non-startup disk with any Mac, or to create a multiplatform compatible startup disk+.
For more on GPT, see:
http://developer.apple.com/technotes/tn2006/tn2166.html
http://db.tidbits.com/article/8405 and
http://www.macfixit.com/article.php?story=20060721104222189 -
Dbms_redefinition used to convert a non partitioned table to partitioned
A table is created with below DDL
CREATE TABLE TEST1("EQUIPMENT_DIM_ID" NUMBER(9,0) NOT NULL ENABLE,
"CARD_DIM_ID" NUMBER(9,0),
"NH21_DIM_ID" NUMBER(5,0) NOT NULL ENABLE);
Interim table created with
CREATE TABLE INTERIM("EQUIPMENT_DIM_ID" NUMBER(9,0) NOT NULL ENABLE,
"CARD_DIM_ID" NUMBER(9,0),
"NH21_DIM_ID" NUMBER(5,0) NOT NULL ENABLE);
PARTITION BY RANGE ("EQUIPMENT_DIM_ID")
(PARTITION "P0" VALUES LESS THAN (1)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) NOCOMPRESS ,
PARTITION "P1" VALUES LESS THAN (2)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) NOCOMPRESS ,
Performed dbms_Redefinition (start,sync and finish) to get the table test1 data from nonpartitioned to partitioned one. At the end of table conversion, dbms_metadata.get_ddl shows like below
CREATE TABLE TEST("EQUIPMENT_DIM_ID" NUMBER(9,0) CONSTRAINT "SYS_C005605" NOT NULL ENABLE,
"CARD_DIM_ID" NUMBER(9,0),
"NH21_DIM_ID" NUMBER(5,0) CONSTRAINT "SYS_C005601" NOT NULL ENABLE);
PARTITION BY RANGE ("EQUIPMENT_DIM_ID")
(PARTITION "P0" VALUES LESS THAN (1)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) NOCOMPRESS ,
PARTITION "P1" VALUES LESS THAN (2)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) NOCOMPRESS
Can you help me how to hide or remove the "CONSTRAINT "SYS_C005605"" etc section showing in ddl for the table?The reason being if take this ddl definition and load in another database where it can give error in case same named constraint already exist.
Many thanks
Regards
Manoj Thakkan
Oracle DBA
BangaloreCreate your NOT NULL check constraints using ALTER TABLE and name them as you would a primary or foreign key ... with a name that makes sense.
I personally have a strong dislike for system generated naming and would be thrilled if this lazy practice of defining columns as NOT NULL during table creation went away. -
Deadlock issue in Oracle 10g Partitioned Tables
Hi ALL,
I am facing an issue of Deadlock while inserting data into a partitioned table.
I get an error "ORA-00600: Deadlock detected". when i see the trace files, following lines are appearing in them:
"Single resource deadlock: blocking enqueue which blocks itself".
Here is the detail of my test case:
1. I have a list-partitioned table, with partitioning defined on some business codes.
2. I have a query that merges data into partitioned table (actually compares unique keys between temporary table and partitioned table and then issue an insert if keys not matched, no update part).
3. The temporary table contains transactional data against many business codes.
3. when calling the above query from multiple (PL/SQL) sessions, i observe that when we merge data in same partition (from different sessions) than deadlock issue occurs, otherwise it is OK.
4. Note that all sessions are executed at same time. Also note that Commit is called after each session is completed. Each session contains 2-3 more queries after the mentioned merge statement.
Is there an issue with oracle merge/insert on same partition (from different sessions)? What is the locking mechanism for this particular case (partitioned tables)?
My oracle version is Oracle 10g (10.2.0.4). Kindly advice.
Thanks,
QQ.Could you print the deadlock tree so we can see the type and mode of the locking. (Please use the 'code' tags - see FAQ at top right of screen - to showthe output in fixed font). can you list any SQL operated by this session that gets reported in the trace file.
Does the table reference itself in a foreign key.
Is this table involved in any referential integrity constraints.
Do you have a global primary key index, or a local primary key index ?
Are there any triggers on the table - if so do they contain autonomous transactions.
At present the only though that springs to mind is that the merge command has to lock the target table to do the insert/update, but it also has to lock any child table. The mode of the child lock depends on whether it has a suitable index or not, and whether the child table IS also the parent table. If you have two merges to the same partition one partition may get its locks, and the other partition may be in a state where it can't get one of the locks because it's wait for the other. (This shouldn't be a self-deadlock, though, but the scenario might be heading in the right direction for a self-deadlock).
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." (Stephen Hawking) -
Partitioned table takes more time to load
Hi,
Recently I have been test loading a partition table (Datawarehouse fact table). However, I notice almost 2X to 2.5X jump in timing compared to the non-partitioned table.
The partition is on the TIME Key on the basis of monthly range. Since this key is not entirely consistent (less than 1% cases) and can change sometimes, I have enabled row movement.
Is there anything that you can do to improve timing when everything else remains same?
Regards
PremHi,
When you load data into a partitioned table oracle has to check every record
to decide in which partition store it.
When you load data in a heap table oracle hasn't to check it. All records
are saved in the same segment.
You can save time when you load in partitioned tables using partition
clause.
Regards
K.Rajkumar -
An interesting error: "recursive partition table"
So I just found an old 8 Gb SD card I had forgotten about (and was overjoyed because I had just said "if only I had a bigger SD card". Why do good things happen to bad people?). Several months ago I'd used some Windows tool, I think, to make a live USB for ArchBang, which hadn't worked. I put it in my computer and ran `fdisk -l` and got this:
# fdisk -l
Disk /dev/sdd: 7948 MB, 7948206080 bytes
64 heads, 32 sectors/track, 7580 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0c7e5ddb
Device Boot Start End Blocks Id System
/dev/sdd1 * 0 1003519 501760 17 Hidden HPFS/NTFS
Disk /dev/sdd1: 513 MB, 513802240 bytes
64 heads, 32 sectors/track, 490 cylinders, total 1003520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0c7e5ddb
Device Boot Start End Blocks Id System
/dev/sdd1p1 * 0 1003519 501760 17 Hidden HPFS/NTFS
When I ran gparted (a graphical partition editor), it threw up "Invalid partition table: recursive partition on /dev/sdd". Gparted then treats the disk as unformatted, which is presumably its "fallback" behaviour.
This isn't actually a problem for me as I don't need any of the data on the card, but I thought it was a pretty interesting error, so I'd post it here for discussion. I can't work out what's going on, but it seems to me that someething is seriously bawsled up here! Perhaps there was a bug in the library the Windows utility used? I haven't found anything similar online, although this was interesting.
Today may be a day for me to read up on partition tables and the heads/disks/cylinders/sectors/tracks abstractions!I get the same result when using dd to write the archlinux installer image to usb. It's nothing really. it can easily have a new partition table made with gparted. It's likely the tool you used in Windows also wrote the bootable image with a low level utility similar to dd. dd generally starts at the very beginning of a disk when pointed at the device and not a partition number. /dev/sdb instead of /dev/sdb1. Meaning it overwrites the first 512byte sector too(mbr) With whatever the image/ISO contains. I've never regarded it as an issue. Just kinda confusing to tools that expect data like a partition table to be present in a normal structure.
-
I have an Early 2011 13" MBP going strong with an SSD and original HDD installed in the optical drive. However, having had success with windows 7 on my old HDD I was planning to install Windows 8.1 (from .iso) on my SSD. However, for the past day or so it's been a nightmare.
I tried the official procedure but by editing the bootcamp info.plist so I could boot from USB (you can't install windows from an external optical drive apparently) partitioning as bootcamp wanted too.
I then tried it a number of different ways using disk utility etc and with an empty space
However, I always seem to end up with the error "“Windows cannot be installed on this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only installed on GPT disks“
I read some interesting stuff here http://www.royhochstenbach.com/installing-windows-8-1-on-a-2013-mac-pro/
He points out that
"Windows 7 and 8 in x64 support EFI. Normally if you install Windows on a Mac and use the installation DVD, it boots into regular BIOS mode, thus can be installed on an MBR partition. I tried the same, but since the Mac Pro doesn’t have an optical drive I had to use an external drive. And apparently the Mac boots external optical drives in EFI mode too. The Bootcamp wizard is aware of this, and creates a GPT partition on a non-superdrive Mac but an MBR partition on a superdrive Mac."
This means Bootcamp is essentially making the wrong type of partition?
My real question is? How do I install it windows 8? I'm really on my last legs!
I really don't want to have to open this thing up and reinsert my optical drive as its really really difficult to get out of the enclosure (would probably have to break it).
A huge thanks in advance!Hi,
Have you tried that suggestion?
You also could use this commands to check and install again:
Inside windows installer, hit Shift+F10 to get a command prompt, then run diskpart and type List disk to displays a list of disks and information about them, such as their size, amount of available free space, whether the disk is a basic or dynamic disk,
and whether the disk uses the master boot record (MBR) or GUID partition table (GPT) partition style.
and then select the target disk. Zap the drive (with the clean command), create GPT table (new gpt), create the GPT-EFI special partitions.
Step-by-step instructions is here for reference:
HOW TO: Use the Diskpart.efi Utility to Create a GUID Partition Table Partition on a Raw Disk in Windows
http://support.microsoft.com/kb/297800?wa=wsignin1.0
Then reboot so the firmware finds those partitions and adds the disk to the EFI-native boot order (Windows installer checks this).
Karen Hu
TechNet Community Support -
Deadlock issue in Partitioned Tables
Hi ALL,
I am facing an issue of Deadlock while inserting data into a partitioned table.
I get an error "ORA-00600: Deadlock detected". when i see the trace files, following lines are appearing in them:
"Single resource deadlock: blocking enqueue which blocks itself".
Here is the detail of my test case:
1. I have a list-partitioned table, with partitioning defined on some business codes.
2. I have a query that merges data into partitioned table (actually compares unique keys between temporary table and partitioned table and then issue an insert if keys not matched, no update part).
3. The temporary table contains transactional data against many business codes.
3. when calling the above query from multiple (PL/SQL) sessions, i observe that when we merge data in same partition (from different sessions) than deadlock issue occurs, otherwise it is OK.
4. Note that all sessions are executed at same time. Also note that Commit is called after each session is completed. Each session contains 2-3 more queries after the mentioned merge statement.
Is there an issue with oracle merge/insert on same partition (from different sessions)? What is the locking mechanism for this particular case (partitioned tables)?
My oracle version is Oracle 10g (10.2.0.4). Kindly advice.
Thanks,
QQ.Oracle MERGE statements are slow as they must validate every record before insert.
If you use array processing with BULK COLLECT and FORALL with the SAVE EXCEPTIONS clause you can avoid most of the overhead. Just collect your rows in an array, issue a FORALL INSERT SAVE EXCEPTIONS and let Oracle handle whatever happens.
When Oracle is done, and it will be hundreds of times faster than what you are doing now, you can either process or ignore the records in the exceptions array.
Another solution, more efficient if you can do it, is to just to an INSERT INTO SELECT FROM using an exceptions table created with DBMS_ERRLOG.
www.psoug.org/reference/dbms_errlog.html -
Partition pruning not working for partitioned table joins
Hi,
We are joining 4 partitioned tables on partition column & other key columns. And we are filtering the driving table on partition key. But explain plan is showing that all tables except the driving table are not partition pruning and scanning all partitions.Is there any limitation that filter condition cannot be dynamic?
Thanks a lot in advance.
Here are the details...
SELECT a.pay_prd_id,
a.a_id,
a.a_evnt_no
FROM b,
c,
a,
d
WHERE ( a.pay_prd_id = b.pay_prd_id ---partition range all
AND a.a_evnt_no = b.b_evnt_no
AND a.a_id = b.b_id
AND ( a.pay_prd_id = c.pay_prd_id---partition range all
AND a.a_evnt_no = c.c_evnt_no
AND a.a_id = c.c_id
AND ( a.pay_prd_id = d.pay_prd_id---partition range all
AND a.a_evnt_no = d.d_evnt_no
AND a.a_id = d.d_id
AND (a.pay_prd_id = ---partition range single
CASE '201202'
WHEN 'YYYYMM'
THEN (SELECT min(pay_prd_id)
FROM pay_prd
WHERE pay_prd_stat_cd = 2)
ELSE TO_NUMBER ('201202', '999999')
END
DDLs.
create table pay_prd
pay_prd_id number(6),
pay_prd_stat_cd integer,
pay_prd_stat_desc varchar2(20),
a_last_upd_dt DATE
insert into pay_prd
select 201202,2,'OPEN',sysdate from dual
union all
select 201201,1,'CLOSE',sysdate from dual
union all
select 201112,1,'CLOSE',sysdate from dual
union all
select 201111,1,'CLOSE',sysdate from dual
union all
select 201110,1,'CLOSE',sysdate from dual
union all
select 201109,1,'CLOSE',sysdate from dual
CREATE TABLE A
(PAY_PRD_ID NUMBER(6) NOT NULL,
A_ID NUMBER(9) NOT NULL,
A_EVNT_NO NUMBER(3) NOT NULL,
A_DAYS NUMBER(3),
A_LAST_UPD_DT DATE
PARTITION BY RANGE (PAY_PRD_ID)
INTERVAL( 1)
PARTITION A_0001 VALUES LESS THAN (201504)
ENABLE ROW MOVEMENT;
ALTER TABLE A ADD CONSTRAINT A_PK PRIMARY KEY (PAY_PRD_ID,A_ID,A_EVNT_NO) USING INDEX LOCAL;
insert into a
select 201202,1111,1,65,sysdate from dual
union all
select 201202,1111,2,75,sysdate from dual
union all
select 201202,1111,3,85,sysdate from dual
union all
select 201202,1111,4,95,sysdate from dual
CREATE TABLE B
(PAY_PRD_ID NUMBER(6) NOT NULL,
B_ID NUMBER(9) NOT NULL,
B_EVNT_NO NUMBER(3) NOT NULL,
B_DAYS NUMBER(3),
B_LAST_UPD_DT DATE
PARTITION BY RANGE (PAY_PRD_ID)
INTERVAL( 1)
PARTITION B_0001 VALUES LESS THAN (201504)
ENABLE ROW MOVEMENT;
ALTER TABLE B ADD CONSTRAINT B_PK PRIMARY KEY (PAY_PRD_ID,B_ID,B_EVNT_NO) USING INDEX LOCAL;
insert into b
select 201202,1111,1,15,sysdate from dual
union all
select 201202,1111,2,25,sysdate from dual
union all
select 201202,1111,3,35,sysdate from dual
union all
select 201202,1111,4,45,sysdate from dual
CREATE TABLE C
(PAY_PRD_ID NUMBER(6) NOT NULL,
C_ID NUMBER(9) NOT NULL,
C_EVNT_NO NUMBER(3) NOT NULL,
C_DAYS NUMBER(3),
C_LAST_UPD_DT DATE
PARTITION BY RANGE (PAY_PRD_ID)
INTERVAL( 1)
PARTITION C_0001 VALUES LESS THAN (201504)
ENABLE ROW MOVEMENT;
ALTER TABLE C ADD CONSTRAINT C_PK PRIMARY KEY (PAY_PRD_ID,C_ID,C_EVNT_NO) USING INDEX LOCAL;
insert into c
select 201202,1111,1,33,sysdate from dual
union all
select 201202,1111,2,44,sysdate from dual
union all
select 201202,1111,3,55,sysdate from dual
union all
select 201202,1111,4,66,sysdate from dual
CREATE TABLE D
(PAY_PRD_ID NUMBER(6) NOT NULL,
D_ID NUMBER(9) NOT NULL,
D_EVNT_NO NUMBER(3) NOT NULL,
D_DAYS NUMBER(3),
D_LAST_UPD_DT DATE
PARTITION BY RANGE (PAY_PRD_ID)
INTERVAL( 1)
PARTITION D_0001 VALUES LESS THAN (201504)
ENABLE ROW MOVEMENT;
ALTER TABLE D ADD CONSTRAINT D_PK PRIMARY KEY (PAY_PRD_ID,D_ID,D_EVNT_NO) USING INDEX LOCAL;
insert into c
select 201202,1111,1,33,sysdate from dual
union all
select 201202,1111,2,44,sysdate from dual
union all
select 201202,1111,3,55,sysdate from dual
union all
select 201202,1111,4,66,sysdate from dualBelow query generated from Business Objects and submitted to Database (the case statement is generated by BO). Cant we use Case/Subquery/Decode etc for the partitioned column? We are assuming that the case causing the issue to not to dynamic partition elimination on the other joined partitioned tables (TAB_B_RPT, TAB_C_RPT).
SELECT TAB_D_RPT.acvy_amt,
TAB_A_RPT.itnt_typ_desc,
TAB_A_RPT.ls_typ_desc,
TAB_A_RPT.evnt_no,
TAB_C_RPT.pay_prd_id,
TAB_B_RPT.id,
TAB_A_RPT.to_mdfy,
TAB_A_RPT.stat_desc
FROM TAB_D_RPT,
TAB_C_RPT fee_rpt,
TAB_C_RPT,
TAB_A_RPT,
TAB_B_RPT
WHERE (TAB_B_RPT.id = TAB_A_RPT.id)
AND ( TAB_A_RPT.pay_prd_id = TAB_D_RPT.pay_prd_id -- expecting Partition Range Single, but doing Partition Range ALL
AND TAB_A_RPT.evnt_no = TAB_D_RPT.evnt_no
AND TAB_A_RPT.id = TAB_D_RPT.id
AND ( TAB_A_RPT.pay_prd_id = TAB_C_RPT.pay_prd_id -- expecting Partition Range Single, but doing Partition Range ALL
AND TAB_A_RPT.evnt_no = TAB_C_RPT.evnt_no
AND TAB_A_RPT.id = TAB_C_RPT.id
AND ( TAB_A_RPT.pay_prd_id = fee_rpt.pay_prd_id -- expecting Partition Range Single
AND TAB_A_RPT.evnt_no = fee_rpt.evnt_no
AND TAB_A_RPT.id = fee_rpt.id
AND (TAB_A_RPT.rwnd_ind = 'N')
AND (TAB_A_RPT.pay_prd_id =
CASE '201202'
WHEN 'YYYYMM'
THEN (SELECT DISTINCT pay_prd.pay_prd_id
FROM pay_prd
WHERE pay_prd.stat_cd = 2)
ELSE TO_NUMBER ('201202', '999999')
END
And its explain plan is...
Plan
SELECT STATEMENT ALL_ROWS Cost: 79 K Bytes: 641 M Cardinality: 3 M
18 HASH JOIN Cost: 79 K Bytes: 641 M Cardinality: 3 M
3 PART JOIN FILTER CREATE SYS.:BF0000 Cost: 7 K Bytes: 72 M Cardinality: 3 M
2 PARTITION RANGE ALL Cost: 7 K Bytes: 72 M Cardinality: 3 M Partition #: 3 Partitions accessed #1 - #1048575
1 TABLE ACCESS FULL TABLE TAB_D_RPT Cost: 7 K Bytes: 72 M Cardinality: 3 M Partition #: 3 Partitions accessed #1 - #1048575
17 HASH JOIN Cost: 57 K Bytes: 182 M Cardinality: 874 K
14 PART JOIN FILTER CREATE SYS.:BF0001 Cost: 38 K Bytes: 87 M Cardinality: 914 K
13 HASH JOIN Cost: 38 K Bytes: 87 M Cardinality: 914 K
6 PART JOIN FILTER CREATE SYS.:BF0002 Cost: 8 K Bytes: 17 M Cardinality: 939 K
5 PARTITION RANGE ALL Cost: 8 K Bytes: 17 M Cardinality: 939 K Partition #: 9 Partitions accessed #1 - #1048575
4 TABLE ACCESS FULL TABLE TAB_C_RPT Cost: 8 K Bytes: 17 M Cardinality: 939 K Partition #: 9 Partitions accessed #1 - #1048575
12 HASH JOIN Cost: 24 K Bytes: 74 M Cardinality: 957 K
7 INDEX FAST FULL SCAN INDEX (UNIQUE) TAB_B_RPT_PK Cost: 675 Bytes: 10 M Cardinality: 941 K
11 PARTITION RANGE SINGLE Cost: 18 K Bytes: 65 M Cardinality: 970 K Partition #: 13 Partitions accessed #KEY(AP)
10 TABLE ACCESS FULL TABLE TAB_A_RPT Cost: 18 K Bytes: 65 M Cardinality: 970 K Partition #: 13 Partitions accessed #KEY(AP)
9 HASH UNIQUE Cost: 4 Bytes: 14 Cardinality: 2
8 TABLE ACCESS FULL TABLE PAY_PRD Cost: 3 Bytes: 14 Cardinality: 2
16 PARTITION RANGE JOIN-FILTER Cost: 8 K Bytes: 106 M Cardinality: 939 K Partition #: 17 Partitions accessed #:BF0001
15 TABLE ACCESS FULL TABLE TAB_C_RPT Cost: 8 K Bytes: 106 M Cardinality: 939 K Partition #: 17 Partitions accessed #:BF0001
Thanks Again. -
Dropping tablespace for a partitionned table
Hi all,
I have a table partitionned and I want to drop the tablespace for a specific partition. So what happen in the table if I drop one tablespace with a commande drop tablespace tbs including contents and datafiles;
Does the index unusable in this table?
RegardsNo, you can not drop a tablespace which contains tables whose partitions are not completely contained in this tablespace.
db9i :SQL> create tablespace users2 datafile '/u02/oradata/db9i/users201.dbf' size 10M;
Tablespace created.
db9i :SQL> CREATE TABLE sales_by_region (item# INTEGER, qty INTEGER,
2 store_name VARCHAR(30), state_code VARCHAR(2),
3 sale_date DATE)
4 STORAGE(INITIAL 10K NEXT 20K) TABLESPACE test
5 PARTITION BY LIST (state_code)
6 (
7 PARTITION region_east
8 VALUES ('MA','NY','CT','NH','ME','MD','VA','PA','NJ')
9 STORAGE (INITIAL 20K NEXT 40K PCTINCREASE 50)
TABLESPACE users,
10 11 PARTITION region_west
12 VALUES ('CA','AZ','NM','OR','WA','UT','NV','CO')
13 PCTFREE 25
14 TABLESPACE users2,
15 PARTITION region_unknown
16 VALUES (DEFAULT)
17 TABLESPACE test
18 );
Table created.
db9i :SQL> insert into sales_by_region values (1, 100, 'store 1','NY',sysdate);
1 row created.
db9i :SQL> insert into sales_by_region values (2, 200, 'store 2','UT',sysdate);
1 row created.
db9i :SQL> insert into sales_by_region values (3, 300, 'store 3','ZZ',sysdate);
1 row created.
db9i :SQL> commit;
Commit complete.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
3
--insure all data went to the right partition
db9i :SQL> alter table sales_by_region truncate PARTITION region_east;
Table truncated.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
2
db9i :SQL> alter table sales_by_region truncate PARTITION region_west;
Table truncated.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
1
db9i :SQL> alter table sales_by_region truncate PARTITION region_unknown;
Table truncated.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
0
db9i :SQL> insert into sales_by_region values (1, 100, 'store 1','NY',sysdate);
insert into sales_by_region values (2, 200, 'store 2','UT',sysdate);
insert into sales_by_region values (3, 300, 'store 3','ZZ',sysdate);
1 row created.
db9i :SQL>
1 row created.
db9i :SQL>
1 row created.
db9i :SQL>
db9i :SQL>
db9i :SQL> commit;
Commit complete.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
3
--now drop one tablespace
db9i :SQL> drop tablespace users2 including contents and datafiles
2 /
drop tablespace users2 including contents and datafiles
ERROR at line 1:
ORA-14404: partitioned table contains partitions in a different tablespace
db9i :SQL> !oerr ora 14404
14404, 00000, "partitioned table contains partitions in a different tablespace"
// *Cause: An attempt was made to drop a tablespace which contains tables
// whose partitions are not completely contained in this tablespace
// *Action: find tables with partitions which span the tablespace being
// dropped and some other tablespace(s). Drop these tables or move
// partitions to a different tablespace
--move table partition from users2 to users
db9i :SQL> alter table sales_by_region move partition region_west
tablespace users; 2
Table altered.
--drop tablespace again
db9i :SQL> drop tablespace users2 including contents and datafiles
2 /
Tablespace dropped.
Maybe you are looking for
-
Problem: More than one VPN user at a time - Airport Extreme Base Station
Hey Folks, Myself and my girlfriend both have work laptop PCs. It appears that the AEBS only allows one VPN user at a time. When a new user is logging in, it will kick out the other user. Is there a setting on the AEBS that will allow more than one V
-
Floating images mess up bullet lists
When I place a floating object to the left of bulleted or numbered text, the bullet indentations fall apart. See attached image of a bulleted list. How does this get fixed? What is a work around? Thnak you, Shawn
-
Dbms_crypto_toolkit
The oracle database is dose have the package specification after installing all dbms packges but for this package it doesnot have a package body and so some stored procedures reffering to DBMS_CRYPTO_TOOLKIT packge cant compile or raise a reutime exc
-
How to Import Website File with Live Links?
I recently switched to a brand new MacBook Pro laptop and couldn't be happier. The last thing I need to migrate from Windows is my website, and I've run into a hitch. I originally did the website in MS Word, and saved as doc type HTML, and used FTP t
-
Hi All, I am good at OBIEE 10g paths means where can can deploy the RPD,Catalog path, config files paths and log file paths...now can any one explain me or guide me with 11g(11.1.1.5) version path info.. Thanks for your help.