I have a bunch of SQL which I need to execute, but Oracle is complaining with this error:
Error Message : ORA-00911: invalid character
Position : 27
Statement : (dump below)
I'm not sure what's causing this. I have tried removing the semicolon at the end as some answers suggested, but that's not doing the trick. I'm attempting to run this SQL dump on Laravel 5.2 with the DB::unprepared() method, like so:
DB::connection('oracle')->unprepared(File::get(base_path('/path/to/oracle_dump.sql')));
This is the SQL I'm trying to run:
DROP TABLE "MYUSERNAME"."POSTS";
DROP SEQUENCE "MYUSERNAME"."POST_SEQ";
CREATE TABLE POSTS
(
ID NUMBER(*, 0) NOT NULL, TITLE VARCHAR2(1000 BYTE), CONSTRAINT SYS_C004109 PRIMARY KEY(ID)
USING INDEX
(
CREATE UNIQUE INDEX SYS_C004109 ON POSTS (ID ASC)
LOGGING
TABLESPACE TEST_TABLSPACE
PCTFREE 10
INITRANS 2
STORAGE
(
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
NOPARALLEL
)
ENABLE
)
LOGGING
TABLESPACE TEST_TABLSPACE
PCTFREE 10
INITRANS 1
STORAGE
(
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
NOPARALLEL
CREATE SEQUENCE POST_SEQ INCREMENT BY 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 CACHE 20
CREATE TRIGGER POST_BIR
BEFORE INSERT ON posts
FOR EACH ROW
BEGIN
SELECT post_seq.NEXTVAL
INTO :new.id
FROM dual;
END;
I have used SQLDeveloper on Mac to get this dump.
You should use ";" after each statement in the file "oracle_dump.sql".
DROP TABLE "MYUSERNAME"."POSTS";
DROP SEQUENCE "MYUSERNAME"."POST_SEQ";
CREATE TABLE POSTS
(
ID NUMBER(*, 0) NOT NULL, TITLE VARCHAR2(1000 BYTE), CONSTRAINT SYS_C004109 PRIMARY KEY(ID)
USING INDEX
(
CREATE UNIQUE INDEX SYS_C004109 ON POSTS (ID ASC)
LOGGING
TABLESPACE TEST_TABLSPACE
PCTFREE 10
INITRANS 2
STORAGE
(
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
NOPARALLEL
)
ENABLE
)
LOGGING
TABLESPACE TEST_TABLSPACE
PCTFREE 10
INITRANS 1
STORAGE
(
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
NOPARALLEL;
CREATE SEQUENCE POST_SEQ INCREMENT BY 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 CACHE 20;
CREATE TRIGGER POST_BIR
BEFORE INSERT ON posts
FOR EACH ROW
BEGIN
SELECT post_seq.NEXTVAL
INTO :new.id
FROM dual;
END;
Try executing each statement in a separate file, and do not close the statement with ";" once you have each in its file
You have 5 statement in the file "oracle_dump.sql". Have a separate file for each if you want to run them using a command like:
DB::connection('oracle')->unprepared(File::get(base_path('/path/to/<<file>>')));
Related
We have a production environment with Oracle 12C. It has two instances and is using Oracle Data Guard to have a replica in another server.
Every time that we release a new version, we have to truncate some tables, which doesn’t have any index, and execute several scripts with inserts statements like this one:
ALTER TABLE T_I18N DISABLE ALL TRIGGERS;
TRUNCATE TABLE T_I18N;
INSERT INTO T_I18N VALUES ('sp', 'Table 1', '0', 'Tabla 1');
INSERT INTO T_I18N VALUES ('sp', 'Table 2', '0', 'Tabla 2');
INSERT INTO T_I18N VALUES ('sp', 'Table 3', '0', 'Tabla 3');
.
.
ALTER TABLE HIS_I18N ENABLE ALL TRIGGERS;
Previously, we also have disabled all the primary keys and foreign keys. To give more information, the table structure is the following one:
CREATE TABLE "T_I18N"
("T_CODE" VARCHAR2(5 BYTE),
"T_KEY" VARCHAR2(200 BYTE),
"T_C_ID" NUMBER(6,0),
"T_VALUE" VARCHAR2(500 BYTE),
CONSTRAINT "HIN_PK" PRIMARY KEY ("T_CODE", "T_KEY", "T_C_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "TB1" ENABLE,
CONSTRAINT "HIN_CEN_FK" FOREIGN KEY ("T_C_ID")
REFERENCES "TB1"."T_CEN" ("T_C_ID") ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "TB1";
The script with more Insert statements has about 20K and it takes about 12 minutes to be executed. In my opinion, it was taking too much time, so I took a different approach. I tried to drop the table, recreate it and then execute the script, and it took only 40 seconds.
I have been searching through Oracle website to understand why there are so much difference between drop/recreate and truncate, but unfortunately I couldn’t find any clue about it.
Thanks by advance. Any information or advice would be really appreciated.
Cheers!
I am testing a query with a table of 500 million records.
The field ID_COMPANY only has value 1 (500 millon records).
The SQL is defined as follows:
CREATE TABLE "BIDATA"."CSC_CUSTOMER_PREPAID_BALANCE"
( "ID_COMPANY" VARCHAR2(10 BYTE),
"SEQUENTIAL_MOV" NUMBER(10,0),
"ID_PAYMENT" NUMBER(10,0)
CONSTRAINT "PK_CSC_CUSTOMER_PREPAID_BAL" PRIMARY KEY ("ID_COMPANY", "SEQUENTIAL_MOV")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "BIDATA_DATOS" ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "BIDATA_DATOS" ;
CREATE INDEX clause for the ID_PAYMENT field for example
CREATE INDEX "BIDATA"."IDX_ID_PAYMENT" ON "BIDATA"."CSC_CUSTOMER_PREPAID_BALANCE" ("ID_PAYMENT")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "BIDATA_DATOS" ;
The problem that I have, that when launching a query as defined, it seems that it does not detect the index ID_COMPANY and it takes more than 15 minutes to show results, but if in the query in the WHERE clause I add ID_COMPANY = '1', it shows the results in less than 10 seconds.
Should I delete the index ID_COMPANY and define it as CREATE INDEX?
Why does that time difference occur?
SQL query takes> 10 minutes.
SELECT
COUNT(*)
FROM
CSC_CUSTOMER_ACCOUNT,
CSC_CUSTOMER_PREPAID_BALANCE
WHERE
AND ( CSC_CUSTOMER_ACCOUNT.ID_ACCOUNT(+)=CSC_CUSTOMER_PREPAID_BALANCE.ID_ACCOUNT AND CSC_CUSTOMER_ACCOUNT.ID_COMPANY(+)=CSC_CUSTOMER_PREPAID_BALANCE.ID_COMPANY )
AND ( CSC_CUSTOMER_PREPAID_BALANCE.ID_ACCOUNT (+)=CSC_RECHARGE_MOBILE.ID_ACCOUNT AND CSC_CUSTOMER_PREPAID_BALANCE.SEQUENTIAL_MOV(+)=CSC_RECHARGE_MOBILE.SEQUENTIAL_MOV )
SQL query takes < 10 seconds.
SELECT
COUNT(*)
FROM
CSC_CUSTOMER_ACCOUNT,
CSC_CUSTOMER_PREPAID_BALANCE
WHERE
AND ( CSC_CUSTOMER_ACCOUNT.ID_ACCOUNT(+)=CSC_CUSTOMER_PREPAID_BALANCE.ID_ACCOUNT AND CSC_CUSTOMER_ACCOUNT.ID_COMPANY(+)=CSC_CUSTOMER_PREPAID_BALANCE.ID_COMPANY )
AND ( CSC_CUSTOMER_PREPAID_BALANCE.ID_ACCOUNT (+)=CSC_RECHARGE_MOBILE.ID_ACCOUNT AND CSC_CUSTOMER_PREPAID_BALANCE.SEQUENTIAL_MOV(+)=CSC_RECHARGE_MOBILE.SEQUENTIAL_MOV )
AND CSC_CUSTOMER_PREPAID_BALANCE.ID_COMPANY = '1'
QUERY execution plan> 10 minutes
Execution plan Query > 10
Execution plan Query < 10 seconds
Thank you.
From what I can infer from your question, you seem to misinterpret the indexing rules for a table. Ideally you don't create an index for the primary key, rather it is the other way around. i.e. when you create a table with a primary key it(primary key) by default is considered as a clustered index by the sql agent and created/stored accordingly.
More on Indexing and Index types here
i have a daily job and this job is doing basically
LOAD Temp table
Exchange partition with source table
Rebuild local indexes
Rebuild global indexes
However, problem is that rebuilding indexes takes lots of time and this makes source table unavailable
during this period. source table is very critical table to support real time application.
Because of this case, web services which uses this table getting time out exceptions.
Do i have any alternative way rather than building this indexes on source table ?
Any help or discussion is very appreciated.
You can find the code snipped of the daily job, and the structure of source table (TABLEX) and temp table
(TABLEX_TEMP)
Daily Job:
` CREATE OR REPLACE PROCEDURE X.LOAD__TABLES_X IS
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE TABLEX_TEMP REUSE STORAGE';
INSERT /*+ APPEND */ INTO TABLEX_TEMP(CUST_NO ,IDNO,SEX,NAME,SURNAME)
SELECT CUST_NO ,IDNO,SEX,NAME,SURNAME,PHONE
FROM T_X WHERE MAINT !='D';
COMMIT;
EXECUTE IMMEDIATE 'ALTER TABLE TABLEX EXCHANGE PARTITION DUMMY WITH TABLE TABLEX_TEMP WITHOUT VALIDATION';
EXECUTE IMMEDIATE 'ALTER TABLE TABLEX MODIFY PARTITION DUMMY REBUILD UNUSABLE LOCAL INDEXES';
EXECUTE IMMEDIATE 'ALTER INDEX PK_CUST_NO REBUILD NOCOMPRESS NOPARALLEL TABLESPACE TS_X_INDEX';
EXECUTE IMMEDIATE 'ALTER INDEX PK_CUST_NO_TMP REBUILD NOCOMPRESS NOPARALLEL TABLESPACE TS_X_INDEX';
EXECUTE IMMEDIATE 'ALTER INDEX IDX_TABLEX REBUILD NOCOMPRESS NOPARALLEL TABLESPACE TS_X_INDEX';
EXECUTE IMMEDIATE 'ALTER INDEX IDX_TABLEX_TMP REBUILD NOCOMPRESS NOPARALLEL TABLESPACE TS_X_INDEX';
EXECUTE IMMEDIATE 'TRUNCATE TABLE TABLEX_TEMP REUSE STORAGE';
COMMIT;
END LOAD_TABLES_X;`
Structure of Tables and indexes :
`
CREATE TABLE X.TABLEX_TEMP
(
CUST_NO NUMBER(9),
NAME VARCHAR2(54 BYTE),
SURNAME VARCHAR2(100 BYTE),
SEX VARCHAR (1 BYTE)
IDNO NUMBER(11)
)
TABLESPACE TS_X_DATAA
RESULT_CACHE (MODE DEFAULT)
PCTUSED 0
PCTFREE 0
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 8M
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
LOGGING
COMPRESS FOR QUERY HIGH
NOCACHE
NOPARALLEL
MONITORING;
CREATE INDEX X.IDX_TABLEX_TMP ON X.TABLEX_TEMP
(IDNO)
NOLOGGING
TABLESPACE TS_X_INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
NOPARALLEL;
CREATE UNIQUE INDEX X.PK_CUST_NO_TMP ON X.TABLEX_TEMP
(CUST_NO)
NOLOGGING
TABLESPACE TS_X_INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
NOPARALLEL;
ALTER TABLE X.TABLEX_TEMP ADD (
CONSTRAINT PK_CUST_NO_TMP
PRIMARY KEY
(CUST_NO)
USING INDEX X.PK_CUST_NO_TMP
ENABLE NOVALIDATE);
----------------------------------------------------------
CREATE TABLE X.TABLEX
(
CUST_NO NUMBER(9),
NAME VARCHAR2(54 BYTE),
SURNAME VARCHAR2(100 BYTE),
SEX VARCHAR (1 BYTE)
IDNO NUMBER(11)
)
COMPRESS FOR QUERY HIGH
TABLESPACE TS_X_DATA
RESULT_CACHE (MODE DEFAULT)
PCTUSED 0
PCTFREE 0
INITRANS 1
MAXTRANS 255
STORAGE (
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
PARTITION BY RANGE (CUST_NO)
(
PARTITION DUMMY VALUES LESS THAN (999999999)
LOGGING
COMPRESS FOR QUERY HIGH
TABLESPACE TS_X_DATA
PCTFREE 0
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
)
NOCACHE
NOPARALLEL
MONITORING;
CREATE INDEX X.IDX_TABLEX ON X.TABLEX
(IDNO)
NOLOGGING
TABLESPACE TS_X_INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
NOPARALLEL;
CREATE UNIQUE INDEX X.PK_CUST_NO ON X.TABLEX
(CUST_NO)
NOLOGGING
TABLESPACE TS_X_INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
NOPARALLEL;
ALTER TABLE X.TABLEX ADD (
CONSTRAINT PK_CUST_NO
PRIMARY KEY
(CUST_NO)
USING INDEX X.PK_CUST_NO
ENABLE NOVALIDATE);
`
Well, since a partition exchange modifies a substantial part of the data the index has to become unusable. However, you can avoid the index to become unusable by updating the indexes during the partition exchange.
In my experience it is is best to use a two-step approach:
Prior to the partition exchange you should build the same local indexes on the temporary table. Then you must append INCLUDING INDEXES to the ALTER TABLE command.
If you do have to use global indexes you can update them during the partition exchange by appending UPDATE GLOBAL INDEXES to the ALTER TABLE command. This will ensure that the global indexes are not unusable during the whole operation.
So you whole statement will become something like this:
ALTER TABLE TABLEX EXCHANGE PARTITION DUMMY WITH TABLE TABLEX_TEMP INCLUDING INDEXES WITHOUT VALIDATION UPDATE GLOBAL INDEXES;
You may want to look at the official Oracle documentation for details:
Updating Indexes Automatically
ALTER TABLE
This question already has answers here:
How to get Oracle create table statement in SQL*Plus
(3 answers)
Closed 1 year ago.
How can I generate a DDL script on an existing table in oracle? I am working on a project where I have to re-create some tables that are present in Oracle table into Hive.
If your SQL client doesn't support this, then you can use the dbms_metadata package to get the source for nearly everything in your database:
For a table use something like this:
select dbms_metadata.get_ddl('TABLE', 'YOUR_TABLE_NAME')
from dual;
You can also do this for all tables at once:
select dbms_metadata.get_ddl('TABLE', table_name)
from user_tables;
and spool the output into a SQL script.
More details are in the manual: http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_metada.htm
Just expanding a bit on #a_horse_with_no_name's answer. Using DBMS_METADATA, you might have to take care of the format in SQL*Plus in order to get the output properly.
For example, I want to get the DDL for SCOTT.EMP table.
SQL> select dbms_metadata.get_ddl('TABLE', 'EMP')
2 from dual;
DBMS_METADATA.GET_DDL('TABLE','EMP')
--------------------------------------------------------------------------------
CREATE TABLE "SCOTT"."EMP"
( "EMPNO" NUMBER(4,0),
"ENAME" VARCHAR2(10),
SQL>
But, that is not what I expected.
So, setting up the format properly, would give me my desired output
SQL> set long 100000
SQL> set head off
SQL> set echo off
SQL> set pagesize 0
SQL> set verify off
SQL> set feedback off
SQL> select dbms_metadata.get_ddl('TABLE', 'EMP')
2 from dual;
CREATE TABLE "SCOTT"."EMP"
( "EMPNO" NUMBER(4,0),
"ENAME" VARCHAR2(10),
"JOB" VARCHAR2(9),
"MGR" NUMBER(4,0),
"HIREDATE" DATE,
"SAL" NUMBER(7,2),
"COMM" NUMBER(7,2),
"DEPTNO" NUMBER(2,0),
CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE,
CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS"
SQL>
SOLVED: The SELECT within the USING did indeed generate duplicate s_main_obj_id. I thought they must be unique (uuids, but generated with a stupid tweak), however when you've eliminated the impossible... ;-)
Using Oracle 11g (not R2), I want to merge some values from a source table s into a target table t. The PK of both s and t is a field obj_id.
I use:
MERGE
INTO target_table t
USING (SELECT ... AS s_main_obj_id, ... AS s_p1,
... AS s_p2, ... AS s_typ FROM source_table) s
ON (t.p1 = s.s_p1
AND t.p2 = s.s_p2
AND t.typ = s.s_typ)
WHEN NOT MATCHED
THEN
INSERT (obj_id,
p1,
p2,
typ)
VALUES (s_main_obj_id,
s_p1,
s_p2,
s_typ)
I get:
00000 - "unique constraint (%s.%s) violated"
*Cause: An UPDATE or INSERT statement attempted to insert a duplicate key.
The ID of the constraint points to the target table's obj_id.
The s_main_obj_id that is generated in the SELECT within USING is definitely unique; I have tried taking the SELECT and joining the result with the target table on the PK obj_id:
SELECT * FROM (
SELECT ... AS s_main_obj_id, ... AS s_p1,
... AS s_p2, ... AS s_typ FROM source_table) s
JOIN target_table t
ON (t.obj_id = s.s_main_obj_id)
This gives me 0 results.
How can the MERGE be trying to insert a duplicate key if this gives no results?
EDIT: On the target table, I have the following constraints:
(the error mentions the SYS_C00138978 constraint)
And the following index:
And here is the create table statement:
CREATE TABLE TARGET_TABLE_NAME
(
OBJ_ID VARCHAR2(40 CHAR) NOT NULL
, TYP VARCHAR2(1 CHAR)
, P1 VARCHAR2(40 CHAR)
, P2 VARCHAR2(40 CHAR)
, CONSTRAINT SYS_C00138978 PRIMARY KEY
(
OBJ_ID
)
ENABLE
)
LOGGING
TABLESPACE "USERS"
PCTFREE 10
INITRANS 1
STORAGE
(
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
);
CREATE UNIQUE INDEX TARGET_TABLE_NAME_OBJ_ID ON TARGET_TABLE_NAME (OBJ_ID ASC)
LOGGING
TABLESPACE "USERS"
PCTFREE 10
INITRANS 2
STORAGE
(
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
);