Create Partition table using CTAS
Hi there,
Is it possible to create a duplicate partition table from a existing partition table using CTAS method? If yes, could you explain how ?If No , how to make a duplicate partition table?
Thanks in advance?
Rajesh Marath
Easily:
conn / as sysdba
CREATE TABLESPACE part1
DATAFILE 'c:\temp\part01.dbf' SIZE 50M
BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
CREATE TABLESPACE part2
DATAFILE 'c:\temp\part02.dbf' SIZE 50M
BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
CREATE TABLESPACE part3
DATAFILE 'c:\temp\part03.dbf' SIZE 50M
BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
ALTER USER uwclass QUOTA UNLIMITED ON part1;
ALTER USER uwclass QUOTA UNLIMITED ON part2;
ALTER USER uwclass QUOTA UNLIMITED ON part3;
conn uwclass/uwclass
CREATE TABLE hash_part (
prof_history_id NUMBER(10),
person_id NUMBER(10) NOT NULL,
organization_id NUMBER(10) NOT NULL,
record_date DATE NOT NULL,
prof_hist_comments VARCHAR2(2000))
PARTITION BY HASH (prof_history_id)
PARTITIONS 3
STORE IN (part1, part2, part3);
CREATE TABLE duplicate_hash_part
PARTITION BY HASH (prof_history_id)
PARTITIONS 3
STORE IN (part1, part2, part3) AS
SELECT * FROM hash_part;Follow the same logic for list and range partitions
Similar Messages
-
Error in creating partition table in oracle spatial by ankur
Hi,
Am working on Oracle 10.2.0.3
Am not able to create partition table in Oracle
i have all the required columns in node and edge table ......the moment i try to create partition table using exec sdo_router_partition.partion_router i get the following error:
ERROR at line 1:
ORA-00947: not enough values
ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 1510
ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 661
ORA-06512: at line 1
Can someone help ??hey i have found the solution myself :)
-
Create partition table upto level 3
Hi All,
I want to create partition table using 3 columns. could you please tell me is that possible to do in oracle 11G. if can please tell me the way to create
PARTITION BY LIST (Acct_type)
SUBPARTITION BY LIST (PERIOD)
and needs to partition this using another column.( account_source)
please help me.
Regards,
krishHello,
3 levels of partition are not possible.
But perhaps you can combine 2 levels as follows:
With Oracle 11g you can use a virtual column:
CREATE TABLE F_ACCOUNT_PART
acc_type varchar2(100),
acc_source varchar2(100),
period date,
acc_type_source varchar2(201) as (acc_type||'_'||acc_source) )
PARTITION BY LIST (acc_type_source)
PARTITION FA_AA_ACC1 VALUES ('AA-ACC1') TABLESPACE USERS,
PARTITION FA_BB_ACC1 VALUES ('BB-ACC1') TABLESPACE USERS,
PARTITION FA_CC_ACC1 VALUES ('CC-ACC1') TABLESPACE USERS,
PARTITION FA_DD_ACC1 VALUES ('DD-ACC1') TABLESPACE USERS,
PARTITION FA_AA_ACC2 VALUES ('AA-ACC2') TABLESPACE USERS,
PARTITION FA_BB_ACC2 VALUES ('BB-ACC2') TABLESPACE USERS,
PARTITION FA_CC_ACC2 VALUES ('CC-ACC2') TABLESPACE USERS,
PARTITION FA_DD_ACC2 VALUES ('DD-ACC2') TABLESPACE USERS,
PARTITION all_other VALUES (DEFAULT) TABLESPACE USERS
)For versions prior to 11g you have to build a new column acc_type_source and fill the values cancatenated.
Maik -
Unable to Create Partitioned Table
Hi All,
I was trying to create a partitioned table using following
Create table customers (custcode number(5),
Name varchar2(20),
Addr varchar2(10),
City varchar2(20),
Bal number(10,2))
Partition by list (city),
Partition north_India values (‘DELHI’,’CHANDIGARH’),
Partition east_India values (‘KOLKOTA’,’PATNA’),
Partition south_India values (‘HYDERABAD’,’BANGALORE’,’CHENNAI’),
Partition west India values (‘BOMBAY’,’GOA’);
It is throwing me an error
ORA-00922: missing or invalid option
Will you please tell me what is wrong with this query? Is it possible to create partitioned table using select statement (create table as select... Partition by...)?
Regards
~PravinPravin
Will you please tell me what is wrong with this query?I see 4 errors in the syntax. Therefore, I strongly suggest you to have a lock to this:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2146309
In addition, have a look to the error message. If I run your script in SQL*Plus it clearly shows where the problem is. E.g.:
SQL> Create table customers (custcode number(5),
2 Name varchar2(20),
3 Addr varchar2(10),
4 City varchar2(20),
5 Bal number(10,2))
6 Partition by list (city),
7 Partition north_India values (‘DELHI’,’CHANDIGARH’),
8 Partition east_India values (‘KOLKOTA’,’PATNA’),
9 Partition south_India values (‘HYDERABAD’,’BANGALORE’,’CHENNAI’),
10 Partition west India values (‘BOMBAY’,’GOA’);
Partition by list (city),
ERROR at line 6:
ORA-00922: missing or invalid option
Is it possible to create partitioned table using select statement?Yes. With the usual syntax.
HTH
Chris Antognini
Author of Troubleshooting Oracle Performance, Apress 2008 (http://top.antognini.ch) -
Error while creating partition table
Hi frnds i am getting error while i am trying to create a partition table using range
getting error ORA-00906: missing left parenthesis.I used the following statement to create partition table
CREATE TABLE SAMPLE_ORDERS
(ORDER_NUMBER NUMBER,
ORDER_DATE DATE,
CUST_NUM NUMBER,
TOTAL_PRICE NUMBER,
TOTAL_TAX NUMBER,
TOTAL_SHIPPING NUMBER)
PARTITION BY RANGE(ORDER_DATE)
PARTITION SO99Q1 VALUES LESS THAN TO_DATE(‘01-APR-1999’, ‘DD-MON-YYYY’),
PARTITION SO99Q2 VALUES LESS THAN TO_DATE(‘01-JUL-1999’, ‘DD-MON-YYYY’),
PARTITION SO99Q3 VALUES LESS THAN TO_DATE(‘01-OCT-1999’, ‘DD-MON-YYYY’),
PARTITION SO99Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2000’, ‘DD-MON-YYYY’),
PARTITION SO00Q1 VALUES LESS THAN TO_DATE(‘01-APR-2000’, ‘DD-MON-YYYY’),
PARTITION SO00Q2 VALUES LESS THAN TO_DATE(‘01-JUL-2000’, ‘DD-MON-YYYY’),
PARTITION SO00Q3 VALUES LESS THAN TO_DATE(‘01-OCT-2000’, ‘DD-MON-YYYY’),
PARTITION SO00Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2001’, ‘DD-MON-YYYY’)
;More than one of them. Try this instead:
CREATE TABLE SAMPLE_ORDERS
(ORDER_NUMBER NUMBER,
ORDER_DATE DATE,
CUST_NUM NUMBER,
TOTAL_PRICE NUMBER,
TOTAL_TAX NUMBER,
TOTAL_SHIPPING NUMBER)
PARTITION BY RANGE(ORDER_DATE) (
PARTITION SO99Q1 VALUES LESS THAN (TO_DATE('01-APR-1999', 'DD-MON-YYYY')),
PARTITION SO99Q2 VALUES LESS THAN (TO_DATE('01-JUL-1999', 'DD-MON-YYYY')),
PARTITION SO99Q3 VALUES LESS THAN (TO_DATE('01-OCT-1999', 'DD-MON-YYYY')),
PARTITION SO99Q4 VALUES LESS THAN (TO_DATE('01-JAN-2000', 'DD-MON-YYYY')),
PARTITION SO00Q1 VALUES LESS THAN (TO_DATE('01-APR-2000', 'DD-MON-YYYY')),
PARTITION SO00Q2 VALUES LESS THAN (TO_DATE('01-JUL-2000', 'DD-MON-YYYY')),
PARTITION SO00Q3 VALUES LESS THAN (TO_DATE('01-OCT-2000', 'DD-MON-YYYY')),
PARTITION SO00Q4 VALUES LESS THAN (TO_DATE('01-JAN-2001', 'DD-MON-YYYY')))In the future, if you are having problems, go to Morgan's Library at www.psoug.org.
Find a working demo, copy it, then modify it for your purposes. -
How to find out the Non Partitioned Tables used 2Gb on oracle
Hi team
how to find out the Non Partitioned Tables used > 2Gb on oracle where not is sys & system
regardsheres 1 I made earlier
set pagesize 999
set linesize 132
col owner format a25
col segment_name format a60
select owner,segment_name,segment_type,(bytes/1024/1024)"MB size"
from dba_segments
where owner not in ('SYS','SYSTEM','XDB','MDSYS','SYSMAN') -- edit for taste
and segment_type = 'TABLE'
having (bytes/1024/1024) > 2000
group by bytes, segment_Type, segment_name, owner
order by 4 asc -
How to create a table using subform if lifecycle designer 7.1 not availabl
hi,
plis tell me how to create a table because i am using adobe lifecycle 6.1 and in the library
there is no object for table..
also tell me that if i have adobe lifecycle designer then which is better option and why?
use table from library directly or create a table using subform...Hi Sweta,
Create the interface attributes of type string and xtring type.
Create node in the context of type graphics. bind the interface fields to the graphic node context element properties -
Graphic content, field of xzstring type and mimetype to be string/any char data type of suitable length.
In layout drag and drop the image field and bind it to the graphic element.
In yoour report programme-
do the code as berlow to pass the graphic data -
<i>CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = '<mime type graphic name>'
p_id = 'BMAP'
p_btype = 'BCOL' "BMON if monochrome
RECEIVING
p_bmp = w_binary
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.</i>
in the call <form function module>
pass the inerface values for
xstring (graphic field) to be w_binary (import parameter of the previous method)
and mime type to be 'image/bmp'.
This would work.
Hope fully you may be able to see a tutorial on this soon ;).
- anto. -
How to create a table using Text Layout Framework?
How to create a table using Text Layout Framework? I meen real tables - like in HTML.
Cell as indipendant TLF should work, I have created my table using same approach and works fine for me ... this is where it is
http://apps.live-documents.com/docs/openWebDoc.do?docId=1480607
Regards
Raf -
How to create a table using polish
I am able to show all the database records in table form but i want to edit a particular cell of the table, how to do that. thanks in advance.
Cell as indipendant TLF should work, I have created my table using same approach and works fine for me ... this is where it is
http://apps.live-documents.com/docs/openWebDoc.do?docId=1480607
Regards
Raf -
I created a table using the ranking field and now I need to delete the "dots/buttons" and turn them into text fields, is this possible?
It sounds like what you are trying to do is edit the choices in a likert field to something other than the default radio button. This is not something that you can do in Formscentral at this time.
Andrew -
Create temporary Tables using SQL
Hello,
I'm wondering if SAP allows the creation of new Tables without SDK objects,
I want to create temporary tables using SQL scripts an compile them when an specific addon is connected and erase them when the addon disconnects,
Do you think this is allowed?.
thanks,
GabrielaYou could always have a second DB to create your temp tables in. This is the way I've done this, as well as created my own views and stored procedures in it. No updating of the primary table necessary. The way I named things was:
Company_DB - Company Database
Company_DB-Extern - My own stuff
Then, in sap, you can just do [Company_DB-Extern]..Object to call it, or you do the same from withing your project. -
Create a partitioned table using Round Robin
Hi,
I want to create a partitioned table.
My concern is that if I use round robin now, whether I can create a primary key for this table in the future?
Thanks!You cannot use Round Robin, if your table has primary keys.
But as you must know , now we can create a HASH Partitioning on the tables with out primary key too, i thought ii would rather test once again and comment:
Please find the screen shot below which confirms that Round Robin cannot be done on table with Primary keys.
Where as the table without primary keys am able to use Round robin. Till here it was fine for me.
Now in the second case where i created a table with Round robin and then later i added the primary key using Alter statement, then am able to have Round Robin on the table with primary keys. ( don't know what does that means )
Column screenshot:
Regards,
Krishna Tangudu -
How to create new table using pertioned table
hi,
i am using a partitioned table , now i want to craet a new table with same structure of my existing partitioned table.
so can i use this syntax
create table abc_new as
select * from my_partitioned_table
where 1=2;
if i use this syntax would it make same structure of my existing partitioned table ?
and
when
we use syntax like
create table abc_new as
select * from my_partitioned_table
where 1=2;
so would it make also indexing on new table to if old table exists ? if not so how can we create that indexing too at time of running this syntax ?
reagrdsNo.
Although the command would create a new table with the same column names and datatypes, it would NOT be a partitioned table. You must explicitly specify the PARTITION BY clause and Partition definitions when creating the table.
Similarly, index definitions are not copied automatically. You must explicitly run the CREATE INDEX statements (which you can generate from the source using DBMS_METADATA.GET_DDL or using any other tools/utilities).
(However, if you use Export-Import -- e.g. importing to another schema or to another database, it would create a partitoned table with the same name and with the same index definitions).
Hemant K Chitale -
I need to create a partition table on target. I am currently using the below code, but it fails when the primary key on the source table has a primary key having more than one column. How can I get the first column name from the source table which can be used as the partitioning key?
create table texdatawarehouse.<%=odiRef.getInfo("TARG_NAME")%>
<%=odiRef.getColList("", "[COL_NAME]\t[DEST_WRI_DT] ", ",\n\t", "", "")%>
partition by range (<%=odiRef.getColList("","[COL_NAME]","","","PK")%>)
(partition a values less than (9999999999))
Thanks,
Dinesh.Hi Dinesh,
I am little bit confused with your reply...
Please correct me if I am on the wrong way..
The New Key you need to add to the target datastore.
then in interface select the target datastore (diagram tab)
in properties select the new key for update column.
I mean the partion will be created based upon the target column key.
Regards,
Rathish -
Error in Creating DWH Tables using DAC
Hi friends,
While trying to create DWH tables from Tools>>ETL Mgmt>>Configure.
At the end of creating DWH tables resulted in failure. When i checked with the log file "createwtables.log" it showed like below
=====================================
STD OUTPUT
=====================================
CREATING SIEBEL DATABASE OBJECTS
C:\orahome\10gR3_1\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u DAC /p ******* /c OBIDB /G "SSE_ROLE" /f C:\orahome\10gR3_1\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b OBIEE_TOOLS /K OBIEE_TOOLS /X OBIEE_INDEX /W N
Error while importing Siebel database schema.
=====================================
ERROR OUTPUT
=====================================
Siebel Enterprise Applications ODBC DDL Import Utility, Version 7.7 [18030] ENU
Copyright (c) 2001 Siebel Systems, Inc. All rights reserved.
This software is the property of Siebel Systems, Inc., 2207 Bridgepointe Parkway,
San Mateo, CA 94404.
User agrees that any use of this software is governed by: (1) the applicable
user limitations and other terms and conditions of the license agreement which
has been entered into with Siebel Systems or its authorized distributors; and
(2) the proprietary and restricted rights notices included in this software.
WARNING: THIS COMPUTER PROGRAM IS PROTECTED BY U.S. AND INTERNATIONAL LAW.
UNAUTHORIZED REPRODUCTION, DISTRIBUTION OR USE OF THIS PROGRAM, OR ANY PORTION
OF IT, MAY RESULT IN SEVERE CIVIL AND CRIMINAL PENALTIES, AND WILL BE
PROSECUTED TO THE MAXIMUM EXTENT POSSIBLE UNDER THE LAW.
If you have received this software in error, please notify Siebel Systems
immediately at (650) 295-5000.
C:\orahome\10gR3_1\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u DAC /p ***** /c OBIDB /G SSE_ROLE /f C:\orahome\10gR3_1\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b OBIEE_TOOLS /K OBIEE_TOOLS /X OBIEE_INDEX /W N
Connecting to the database...
Unable to connect to the database...Im sure that database connectivity to the user in Up. These are the below details that i gave
TableOwner: BIAPPS
Pwd: BIAPPS
ODBC Datasource: OBIDB
Tablespace: OBIEE_TOOLS
Indexspace: OBIEE_INDEXAll the above details, are seemed to be correct, but it is resulting in failure. What might be the problem.
REgards,
SaroHi Andy,
Like Svee, adviced in the below link
https://forums.oracle.com/forums/thread.jspa?messageID=10520360
I tried to search for my DSN entry in the odbc driver which is in system32 and systemWOW64. Hence i can find the entry in system32, but not in systemWOW64. So i tried to create my same DSN entry in the driver in systemWOW64 and after that i started to created DWH tables and now it is created successfully.
Thanks
Regards,
Saro
Maybe you are looking for
-
When i try to sign in to itunes on my computer it says i am not connected to the internet and displays unknown error occurred 0x80092013
-
TIMEZONE question on 10.2.0.1.0
Hi Experts, Env: Sun Solaris 8 DB 10.2.0.1.0 -- Single instance a) I did set env variable as TZ=UTC b) When I check SQLPLUS from server, it is fine. i.e. It shows time in GMT SQL> select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS') from dual ; TO_CHAR(S
-
What are the ways to check multi org is enabled?
Hi, Can anyone tell me what are the methods to check whether multi org is enabled? -Senthil
-
Check if new computer account is running XP
I need to check if a new computer account created in AD is running XP -- we do not put SCOM agents on clients. I have created a SCOM 2012 R2 monitor that raises an alert when Security Log Event ID 4741 is detected on a DC. I want Orchestrator to pick
-
SL Mail IMAP account locks server mailbox
I have just installed Snow Leopard and updated Mail. I have a main IMAP account here at work which I set to access new mail only manually so that I could access the mailbox from home on a different machine or indeed on walkabout at work from my touch