ORA-00911 w/create table
I'm trying to execute an SQL file with the following code:
create table "t_ap_xml"
"XML_ID" NUMBER,
"XML_NAME" VARCHAR2(128),
"XML_TYPE" VARCHAR(32),
"XML_CONTENT" "SYS"."XML_TYPE",
"XML_DESCRIPTION" VARCHAR2(4000)
..And i'm receiving the following error:
ERROR at line 8:
ORA-00911: invalid character
It is pointing to the semicolon as the problem. If i remove the semicolon, it seems to work. But if I place that code in a DDL with other create table commands, it gives me a ORA-00922 error at the line with the next create statement. Any ideas? Thanks.
I guess I should have been a bit more clear..
I am using SQL*Plus, and GET-ing a text .sql file made in a text editor.
It seems to work without the semicolon and only creating that single table. However, a problem occurs when trying to use multiple CREATE TABLE statements in the same sql file.
So for example.. here is an excerpt:
create table t_ap_xml
create table another_table
Generates the following error:
ORA-00922: missing or invalid option
..That error occurs on the line in which the second CREATE TABLE statement was issued.
Thanks for any help!
Similar Messages
-
ORA-00911 error creating a view with PL/SQL
Hello. Working with SQL Developer, I'm trying to write a procedure that creates a view.
After a successful compilation, each time I try to execute it I get an ORA-00911 error and I'm not able to find the reason.
Here's my code. Thanks in advance.
CREATE OR REPLACE PROCEDURE "DWH_STAR"."STORICO_DATA" (
DATA_INPUT IN VARCHAR2
)AS
BEGIN
EXECUTE IMMEDIATE '
CREATE OR REPLACE FORCE VIEW DWH_STAR.V_PORT_STOR_DATA (DATA_DESC, CLIENTE_KEY, PRODOTTO_KEY, AGENTE_KEY, TIPOLOGIA_KEY,
NUM_ORDINE, NUM_UNITA, RICAVO_LORDO, RICAVO_NETTO, COSTO_STD_TOTALE, GROSS_PROFIT) AS
SELECT
dt.DATA_DESC,
fv.CLIENTE_KEY,
fv.PRODOTTO_KEY,
fv.AGENTE_KEY,
fv.TIPOLOGIA_KEY,
fv.NUM_ORDINE,
SUM (NUM_UNITA) NUM_UNITA,
SUM (RICAVO_LORDO) RICAVO_LORDO,
SUM (RICAVO_NETTO) RICAVO_NETTO,
SUM (COSTO_STD_TOTALE) COSTO_STD_TOTALE,
SUM (GROSS_PROFIT) GROSS_PROFIT
FROM
F_VENDUTO fv, D_TEMPO dt
WHERE
fv.TEMPO_KEY = dt.TEMPO_KEY
AND TO_NUMBER(TO_CHAR(dt.DATA_DESC,''YYYYMMDD'')) <=' || DATA_INPUT ||'
GROUP BY
fv.CLIENTE_KEY,
fv.PRODOTTO_KEY,
fv.AGENTE_KEY,
fv.TIPOLOGIA_KEY,
fv.NUM_ORDINE,
dt.DATA_DESC
ORDER BY
dt.DATA_DESC,
fv.CLIENTE_KEY,
fv.PRODOTTO_KEY,
fv.AGENTE_KEY,
fv.TIPOLOGIA_KEY,
fv.NUM_ORDINE;
UNION
SELECT
dt.DATA_DESC,
fs.CLIENTE_KEY,
fs.PRODOTTO_KEY,
fs.AGENTE_KEY,
fs.TIPOLOGIA_KEY,
fs.NUM_ORDINE,
- SUM (NUM_UNITA) NUM_UNITA,
- SUM (RICAVO_LORDO) RICAVO_LORDO,
- SUM (RICAVO_NETTO) RICAVO_NETTO,
- SUM (COSTO_STD_TOTALE) COSTO_STD_TOTALE,
- SUM (GROSSO_PROFIT) GROSS_PROFIT
FROM
F_SPEDITO fs, D_TEMPO dt
WHERE
(fs.CAUSA_RESO_KEY = 0
AND fs.TEMPO_KEY = dt.TEMPO_KEY
AND TO_NUMBER(TO_CHAR(dt.DATA_DESC,''YYYYMMDD'')) <=' || DATA_INPUT ||'
GROUP BY
fs.CLIENTE_KEY,
fs.PRODOTTO_KEY,
fs.AGENTE_KEY,
fs.TIPOLOGIA_KEY,
fs.NUM_ORDINE,
dt.DATA_DESC
ORDER BY
dt.DATA_DESC,
fs.CLIENTE_KEY,
fs.PRODOTTO_KEY,
fs.AGENTE_KEY,
fs.TIPOLOGIA_KEY,
fs.NUM_ORDINE
END;remove the order by and semi-colon (;) from the first select. I hope you know that union operator needs the same set of columns to be selected.
But try avoid creating objects on the fly unless and until it's absolutely necessary and unavoidable.
Regards
Raj
Edited by: R.Subramanian on Jun 21, 2010 7:52 AM
Edited by: R.Subramanian on Jun 21, 2010 7:53 AM -
ORA-00904 on CREATE TABLE with virtual column based on XMLTYPE content
Hello,
this is another one for the syntax gurus...
Trying the following, fails with ORA-00904: "MESSAGE"."GETROOTELEMENT": invalid identifier
CREATE TABLE XML_TEST_VIRT
MSG_TYPE GENERATED ALWAYS AS (MESSAGE.GETROOTELEMENT()) VIRTUAL,
MESSAGE XMLTYPE NOT NULL,
IE906 XMLTYPE DEFAULT NULL
XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
XMLTYPE COLUMN IE906 STORE AS SECUREFILE BINARY XML
/while this one succeeds
CREATE TABLE XML_TEST_VIRT
MSG_TYPE GENERATED ALWAYS AS (EXTRACT(MESSAGE, '/*').GETROOTELEMENT()) VIRTUAL,
MESSAGE XMLTYPE NOT NULL,
IE906 XMLTYPE DEFAULT NULL
XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
XMLTYPE COLUMN IE906 STORE AS SECUREFILE BINARY XML
/The GETROOTELEMENT member function of SYS.XMLTYPE is declared as "DETERMINISTIC PARALLEL_ENABLE" so the method getting called is not the problem as the 2nd case proves.
Using the column MESSAGE which is of type XMLTYPE directly seems to be the problem. But the question is "why". The EXTRACT function result is of type XMLTYPE and calling its member works, the column is also of type XMLTYPE yet calling its member fails...
Thanks in advance for any insights on this.
Best Regards
PhilipHmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
I am inclined to believe that I do not fall into any category in the end...
The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
This is where my confession ends (and my working on the XML validator starts...)
Καληνύχτα Marco
Philip (Φίλιππος in Greek)
PS: I did not follow the last solution anyway. I just wanted to verify its operability ;) -
Ora-907 during create table statement
Customer is receiving an ora-907 error running this sql statement and I cannot determine where the problem is, if there is extra spaces or if it's truly missing the right parenthesis.
SQL> set timing on
SQL> set echo on
SQL> set autotrace on
SQL> @sr.sql
SQL> create table tables_for_change_set (
2 change_set_name varchar2(30),
3 table_owner varchar2(30),
4 table_name varchar2(30),
5 column_names_0nf varchar2(4000),
6 constraint tfcs_pk primary key (change_set_name, table_owner, table_name)
7 )
8 ;
Table created.
Elapsed: 00:00:00.13
SQL>
SQL>
SQL> create table columns_for_change_set (
2 change_set_name varchar2(30),
3 table_owner varchar2(30),
4 table_name varchar2(30),
5 column_name varchar2(30),
6 data_type varchar2(30),
7 constraint cfcs_pk primary key (change_set_name, table_owner, table_name, column_name),
8 constraint cfcs_tfcs_fk foreign key (change_set_name, table_owner, table_name) references tables_for_change_set (ch
ange_set_name, table_owner, table_name)
9 using index (create index cfcs_tfcs_fk on columns_for_change_set (change_set_name, table_owner, table_name))
10 );
using index (create index cfcs_tfcs_fk on columns_for_change_set (change_set_name, table_owner, table_name))
ERROR at line 9:
ORA-00907: missing right parenthesis
Thanks,
LisaWelcome to the forum!
So why did you use your second post to the forum to resurrect a thread that is over a year old?
Hemant already provided the correct answer to the question and your reply to him that 'This contradicts the constraint documentation' doesn't specify what you mean by "this" but is wrong on any account.
You certainly can't be referring to Hemant's statement
>
The syntax "constraint cfcs_tfcs_fk foreign key ...", using the key words "foreign key" is for an out-of-line constraint definition.
>
Since the diagram clearly shows his statement is correct.
And you can't be referring to his statement
>
Furthermore, the "using index" clause is for Primary Key constraint , not for a Foreign Key. You should manually create the index separately.
>
Since the documentation states exactly what Hemant said.
See 'Using Indexes to Enforce Constraints' in the SQL Language doc
http://docs.oracle.com/cd/B28359_01/server.111/b28286/clauses002.htm
>
Restrictions on the using_index_clause The following restrictions apply to the using_index_clause:
You cannot specify this clause for a view constraint.
You cannot specify this clause for a NOT NULL, foreign key, or check constraint.
>
Please check the dates in the threads before posting. -
ORA-00904 on create table with xmltype column
Hi,
I am trying to create a table with syntax
CREATE TABLE ss_test(docid integer primary key, content varchar2(4000),acl XMLType)
XMLType column acl store as object relational
XMLSchema "acl.xsd" element "acl"
varray xmldata."ace" store as table ace_tab;
and getting ORA-00904.
acl.xsd is registered as
begin
dbms_xmlschema.registerschema('acl.xsd',
' <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb">
<xs:element name="acl" xdb:SQLType="ACL_TYPE">
<xs:complexType>
<xs:sequence>
<xs:element name="ace" maxOccurs="100">
<xs:complexType>
<xs:attribute name="id" type="xs:integer"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>',true,true,false,false);
end;
Couldnt figure out whats wrong with the syntax. Any pointers ?
Thanks,
RakeshHmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
I am inclined to believe that I do not fall into any category in the end...
The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
This is where my confession ends (and my working on the XML validator starts...)
Καληνύχτα Marco
Philip (Φίλιππος in Greek)
PS: I did not follow the last solution anyway. I just wanted to verify its operability ;) -
ORA-03237 when creating table with BLOB columns on Oracle 9i
I am playing with my new Oracle 9i database. I am trying to copy
tables from my 8.1.6 db. Three tables won't create due to this
new message. The 9i documentation says it's soemthing to do with
freelist groups but my DBA says he hasn't set up any.
The tablespace is one of these newfangled locally managed
tablespaces (predetermined size 8k).
I can create these tables if I change the BLOB column to datatype
VARCHAR2(4000).
I have raised this through the usual channels, but I thought I'd
try this site as well.
Cheers, APCvictor_shostak wrote:
Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML. -
Creating Oracle table is giving ORA-00911 error
Hi,
I got a small code which I am trying to implement in order to create a table in Oracle 8i database. The code compiles fine. However, when I run, it is giving ORA-00911 error(invalid character). Any help is highly appreciated in advance. Thanks.
CODE:
import java.sql.*;
import java.io.*;
import sun.jdbc.odbc.*;
public class createor {
public static void main (String args[]) {
try{
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@myserv:1521:cooler", "scott", "tiger");
Statement stmt = conn.createStatement ();
stmt.execute( "create table JoltData ("+
"programmer varchar (32),"+
"day char (3),"+
"cups integer);"
stmt.close();
}catch (Exception e) {e.printStackTrace();}Try this code, it works for me.
import java.sql.*;
import java.util.*;
import java.text.*;
class dbtestcreatetable {
public static void main (String args []) throws SQLException {
try {
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@myserver:1521:mysid",
"password",
"userid");
String sql = "CREATE TABLE MYTABLE3 (COL1 VARCHAR(3))";
Statement statement = conn.createStatement();
int cnt = statement.executeUpdate(sql);
statement.close();
conn.close();
catch (Exception e) {
System.out.println("Java Exception caught, error message="+e.getMessage());
} -
ORA - 00922 Missing or Invalid option error while creating table
I am tryin to create a table with the following syntax
1 CREATE TABLE TEST_FOR_SCRIPT (
2 TEST_A NUMBER NOT NULL
3 ,TEST_B VARCHAR2(30) DEFAULT 'UNDEFINED' NOT NULL
4 )
5* @storage_parms_table_cmn
6 /
@storage_parms_table_cmn
ERROR at line 5:
ORA-00922: missing or invalid option
Here, storage_parms_table_cmn.sql reads like this
tablespace DBK_CMN_DATA
Can anyone please guide me how to overcome this error.What is your Oracle Version?
i can do it exactly what you did without error
sql> CREATE TABLE vd.TEST_FOR_SCRIPT (
2 TEST_A NUMBER NOT NULL
3 ,TEST_B VARCHAR2(30) DEFAULT 'UNDEFINED' NOT NULL
4 )
5 @test1.sql
6 /
Table created.
Cheers
http://fiedizheng.blogspot.com/ -
Hello,
I have some problems with dbms_xmlschema.registerschema
My database is: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
My XSD schema is (SEPA pain.002.001.03.xsd) also available on this url: http://code.google.com/p/leontestbed/source/browse/trunk/bc2/sample/Schema/pain.002.001.03.xsd?r=241
After
begin
DOK_XML_UTIL.p_vnesi_xsd_blob(401941242); -- store a XSD on file system from blob field
dbms_xmlschema.registerschema(
schemaurl => 'http://localhost/TEST1.XSD',
schemadoc => bfilename('ETAX_LOAD','TEST1.XSD'),
csid => nls_charset_id('AL32UTF8'));
commit;
end;I get:
ORA-31084: error while creating table "INIS_PROD"."Document2781_TAB" for element "Document"
ORA-02320: failure in creating storage table for nested table column "XMLDATA"."CstmrPmtStsRpt"."OrgnlPmtInfAndSts"
ORA-01792: maximum number of columns in a table or view is 1000
ORA-02310: exceeded maximum number of allowable columns in table
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 65
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 136
ORA-06512: at line 4
What I'am doing wrong or what is the reason for this error..Arrgghhh.....
begin
DOK_XML_UTIL.p_vnesi_xsd_blob(401941242);
dbms_xmlschema.registerschema(
schemaurl => 'http://localhost/TEST1.XSD',
schemadoc => bfilename('ETAX_LOAD','TEST1.XSD'),
csid => nls_charset_id('AL32UTF8')
, local => true
, genTypes => false
, genTables => false);
commit;
end;sorry... -
ORA-22913 while creating a QUEUE TABLE of a "Typed type"
Hi guys:
I'm trying to recreate an [AskTom's post|http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:8760267539329], but with a single difference. My Oracle Type contains a field that is another Oracle Type and when I try to create a QUEUE_TABLE, I got the ORA-22913.
Here are my steps:
create or replace TYPE PODTL_TYPE AS OBJECT
item varchar2(25),
ref_item varchar2(25),
physical_location_type varchar2(1),
physical_location number(10),
physical_qty_ordered number(12,4),
unit_cost number(20,4),
origin_country_id varchar2(3),
supp_pack_size number(12,4),
earliest_ship_date date,
latest_ship_date date,
pickup_loc varchar2(250),
pickup_no varchar2(25),
packing_method varchar2(6),
round_lvl varchar2(6),
door_ind varchar2(1),
priority_level number(1),
new_item varchar2(1),
quarantine varchar2(1),
rcvd_unit_qty number(12,4),
tsf_po_link_id number(10),
cost_source varchar2(4),
est_in_stock_date date
create or replace TYPE PODtl_coll as table of PODTL_TYPE;
create or replace TYPE PODesc AS OBJECT
doc_type varchar2(1),
order_no varchar2(10),
order_type varchar2(9),
order_type_desc varchar2(250),
dept number(4),
dept_name varchar2(120),
buyer number(4),
buyer_name varchar2(120),
supplier varchar2(10),
promotion number(10),
prom_desc varchar2(160),
qc_ind varchar2(1),
not_before_date date,
not_after_date date,
otb_eow_date date,
earliest_ship_date date,
latest_ship_date date,
close_date date,
terms varchar2(15),
terms_code varchar2(50),
freight_terms varchar2(30),
cust_order varchar2(1),
payment_method varchar2(6),
payment_method_desc varchar2(40),
backhaul_type varchar2(6),
backhaul_type_desc varchar2(40),
backhaul_allowance number(20,4),
ship_method varchar2(6),
ship_method_desc varchar2(40),
purchase_type varchar2(6),
purchase_type_desc varchar2(40),
status varchar2(1),
ship_pay_method varchar2(2),
ship_pay_method_desc varchar2(40),
fob_trans_res varchar2(2),
fob_trans_res_code_desc varchar2(40),
fob_trans_res_desc varchar2(250),
fob_title_pass varchar2(2),
fob_title_pass_code_desc varchar2(40),
fob_title_pass_desc varchar2(250),
vendor_order_no varchar2(15),
exchange_rate number(20,10),
factory varchar2(10),
factory_desc varchar2(240),
agent varchar2(10),
agent_desc varchar2(240),
discharge_port varchar2(5),
discharge_port_desc varchar2(150),
lading_port varchar2(5),
lading_port_desc varchar2(150),
bill_to_id varchar2(5),
freight_contract_no varchar2(10),
po_type varchar2(4),
po_type_desc varchar2(120),
pre_mark_ind varchar2(1),
currency_code varchar2(3),
contract_no number(6),
pickup_loc varchar2(250),
pickup_no varchar2(25),
pickup_date date,
app_datetime date,
comment_desc varchar2(2000),
PODtl PODtl_coll
These are my 3 Oracle types. When I try to create the QUEUE TABLE:
DBMS_AQADM.CREATE_QUEUE_TABLE(
Queue_table => 'PODESC_QUEUE_TABLE',
Queue_payload_type => 'PODesc',
Multiple_consumers => TRUE);
END;
I got the following error:
22913. 00000 - "must specify table name for nested table column or attribute"
*Cause: The storage clause is not specified for a nested table column
or attribute.
*Action: Specify the nested table storage clause for the nested table
column or attribute.
How can I solve this?Here is the syntax used by Oracle in one of their internal tables.
orabase> select dbms_metadata.get_ddl('TABLE', 'ORDERS_QUEUETABLE', 'IX') from dual;
DBMS_METADATA.GET_DDL('TABLE','ORDERS_QUEUETABLE','IX')
CREATE TABLE "IX"."ORDERS_QUEUETABLE"
( "Q_NAME" VARCHAR2(30),
"MSGID" RAW(16),
"CORRID" VARCHAR2(128),
"PRIORITY" NUMBER,
"STATE" NUMBER,
"DELAY" TIMESTAMP (6),
"EXPIRATION" NUMBER,
"TIME_MANAGER_INFO" TIMESTAMP (6),
"LOCAL_ORDER_NO" NUMBER,
"CHAIN_NO" NUMBER,
"CSCN" NUMBER,
"DSCN" NUMBER,
"ENQ_TIME" TIMESTAMP (6),
"ENQ_UID" VARCHAR2(30),
"ENQ_TID" VARCHAR2(30),
"DEQ_TIME" TIMESTAMP (6),
"DEQ_UID" VARCHAR2(30),
"DEQ_TID" VARCHAR2(30),
"RETRY_COUNT" NUMBER,
"EXCEPTION_QSCHEMA" VARCHAR2(30),
"EXCEPTION_QUEUE" VARCHAR2(30),
"STEP_NO" NUMBER,
"RECIPIENT_KEY" NUMBER,
"DEQUEUE_MSGID" RAW(16),
"SENDER_NAME" VARCHAR2(30),
"SENDER_ADDRESS" VARCHAR2(1024),
"SENDER_PROTOCOL" NUMBER,
"USER_DATA" "IX"."ORDER_EVENT_TYP" , <---------------------- seems analogous to what you are trying to do
"USER_PROP" "SYS"."ANYDATA" ,
PRIMARY KEY ("MSGID")
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 "EXAMPLE" ENABLE
) USAGE QUEUE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS 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 "EXAMPLE"
OPAQUE TYPE "USER_PROP" STORE AS BASICFILE LOB (
ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
CACHE
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))Spend some time looking in directories under $ORACLE_HOME and you may well find the DDL that built it. -
ORA-00942 when creating external table under 10g with AQ
I have an application that runs with AQ. The front-end queues up batch-type
tasks in a queue. When one particular kind of message is dequeued, it
initiates a data load. That load requires the creation of an external
table.
The schema in question is owned by user BL (bulkload). The queue
is owned by BLB (bulkload batch), primarily to simplify some of the
rules needed by the resource manager in order to limit the total CPU
a batch process can consume. The BLB user has full access to the
BL schema, along with the following rights:
CREATE TYPE
CREATE TABLE
CREATE SEQUENCE
CREATE PROCEDURE
CREATE VIEW
CREATE SYNONYM
CREATE SEQUENCE
ALTER SESSION
CREATE SESSION
QUERY REWRITE
CREATE ANY CONTEXT
EXECUTE_CATALOG_ROLE
CREATE MATERIALIZED VIEW
CREATE ANY DIRECTORY
DROP ANY DIRECTORY
The table creation works fine under 9.2.0.8 (our current required
version). However the application generates an ORA-00942 table or view does
not exist when run under 10g (10.2.0.1 and 10.2.0.3).
The following statement is the problem:
CREATE TABLE bulkload33 (
field1 VARCHAR2(2000),field2 VARCHAR2(2000),field3 VARCHAR2(2000))
ORGANIZATION EXTERNAL (
TYPE oracle_loader DEFAULT DIRECTORY EXT_100
ACCESS PARAMETERS ( RECORDS DELIMITED BY "\r\n"
CHARACTERSET 'WE8ISO8859P1'
BADFILE EXT_100:'bulkload_bad.csv'
LOGFILE EXT_100:'bulkload_log.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS (
field1 CHAR(2000),field2 CHAR(2000),field3 CHAR(2000),field4 CHAR(2000)))
LOCATION ('bulkload.csv')
) REJECT LIMIT UNLIMITED PARALLEL;
To clarify, the preceding statement, when handled by the process
for a queue message, failes with an ORA-00942.
Note that I can issue the command directly, as BLB or SYS, against
the BL schema with no problems. Further, as user BLB or SYS, I can do
the following:
CREATE OR REPLACE PROCEDURE dotest
IS
l_sql varchar2(2000);
BEGIN
l_sql := 'CREATE TABLE bulkload33 (
field1 VARCHAR2(2000),field2 VARCHAR2(2000),field3 VARCHAR2(2000))
ORGANIZATION EXTERNAL (
TYPE oracle_loader DEFAULT DIRECTORY EXT_100
ACCESS PARAMETERS ( RECORDS DELIMITED BY "\r\n"
CHARACTERSET ''WE8ISO8859P1''
BADFILE EXT_100:''bulkload_bad.csv''
LOGFILE EXT_100:''bulkload_log.csv''
FIELDS TERMINATED BY '',''
OPTIONALLY ENCLOSED BY ''"'' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS (
field1 CHAR(2000),field2 CHAR(2000),field3 CHAR(2000),field4 CHAR(2000)))
LOCATION (''bulkload.csv'')
) REJECT LIMIT UNLIMITED PARALLEL';
EXECUTE IMMEDIATE l_sql;
END;
show errors
EXEC dotest
Does anyone have any ideas of why this doesn't work under 10g? Metalink
has yielded no clues so far.
Thanks.Define "has full access to the BL schema" given that it is impossible to grant access rights, in Oracle, by schema. What was done and how was it done?
My guess is that the privs were granted in a role, rather than explicitly, as is required for PL/SQL. -
Create Table with Compress for OLTP and error ORA-14464
Hello,
i have a Oracle-DB 11.2 and want to use Advanced Compression.
I want to create a table:
CREATE TABLE TD_GE_1990
( "name_id" NUMBER(1,0),
"name_txt" VARCHAR2(100 BYTE)
) COMPRESS FOR OLTP;
But i get:
SQL-Fehler: ORA-14464: Kompressionstyp nicht angegeben
The "compatible"-Parameter is set to 11.1:
SELECT value
FROM gv$parameter
WHERE name LIKE '%compatible%';
11.1.0.0.0
Do i have to change something in the database?
Best regards
Heidi14464, 00000, "Compression Type not specified"
// *Cause: Compression Type was not specified in the Compression Clause.
// *Action: specify Compression Type in the Compression Clause. -
ORA-00939 when creating XML table with Virtual Columns
Getting error on creating table with VIRTUAL COLUMNS:
Error at Command Line:4 Column:31
Error report:
SQL Error: ORA-00939: too many arguments for function
00939. 00000 - "too many arguments for function"
Without VIRTUAL COLUMNS works fine.
Where to start?
Is it possible to add Virtual Columns after a table is created?
CREATE TABLE TDS_XML OF XMLType
XMLSCHEMA "http://xmlns.abc.com/tds/TDSSchemaGen2.xsd"
ELEMENT "TDSTestData"
VIRTUAL COLUMNS
TESTID AS (
XMLCast(
XMLQuery('declare default element namespace "http://xmlns.abc.com/tds/TDSSchemaGen2.xsd"; /TDSTestData/TestID' PASSING OBJECT_VALUE RETURNING CONTENT) AS VARCHAR2(32)
)SQL*Plus: Release 11.2.0.2.0 Production on Mon Apr 30 20:17:29 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
SQL>victor_shostak wrote:
Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML. -
ORA-47401: Realm violation for create table on SYS.REGISTRY$HISTORY
Hi i have 10.2.0.4 db with db vault on RHEL4. I am applying jan2010 patch on it. After applying patch when i am trying to recompile views i am facing the below error.(I am executing this after starting up database in upgrade mode)
SQL> @$ORACLE_HOME/cpu/view_recompile/view_recompile_jan2008cpu.sql
BEGIN
ERROR at line 1:
ORA-47401: Realm violation for create table on SYS.REGISTRY$HISTORY
ORA-06512: at line 16
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
[oracle@rac1 view_recompile]$
Plese help me on this.
Regards,
snpPerhaps you are tripping over Bug 6928496. I suspect best bet is to open a SR with Oracle rather than hope for similar occurance within the user community.
-
Error when executing statement for table/stored proc. : ORA-00911
Hi All,
I am posting IDOC->XI->JDBC, approx 5000 Idocs.
But few messages are giving following error in XI-_SXMB_MONI
Can any one guide me what is the cause of error? I check whole Idoc data I am not able to see bad character? can any once guide me what are the bad character in XML to post data in oracle? so that i can search in XML and how to avoide this error.
"com.sap.aii.af.ra.ms.api.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'HRP1001' (structure 'INSERT_PAD34'): java.sql.SQLException: ORA-00911: invalid character"> I am talking about following IDOC.<ZRMD_A06> ->
> <E1PLOGI SEGMENT="1">-> <E1PITYP SEGMENT="1"> ->
> <E1PAD34 SEGMENT="1"> -><PROZT>0.00 #</PROZT>.
> Can we remove this # during message mapping in XI??
sure you can remove it using Replace function or by writing UDF.
as I am seing # is last character..<b>so remove # with " " (single space) and then use the TRIM fucntion.</b>
Thanks
Farooq.
*<b>Rewards points if you find it useful*</b>
Maybe you are looking for
-
How do I stop iWeb turning my .jpgs into PNG's ??
Hi No one on a PC can print out my iWeb pages because when I drag a pic into iWeb it auto makes it a PNG. (unreadable from some PC's) How can I stop this from happening so that people can print ok from my site? Thank you Jim Rhodes http://web.mac.com
-
My IPod no longer shuffles songs within playlists that are clearly set to shuffle. It is about 3/4 full so I thought of maybe compressing the files to get more space. Do you think that is the problem and if that might help?
-
Embedding Fonts in Oracle Reports with PDF output
I've read in the data sheet for Oracle reports that you can embed font in the PDF output, but I cannot seem to find any documentation on how this is done. Current we have PDF reports being generated using reports server on Compaq (Alpha based) server
-
I'm trying to purchase Safeware insurance for my macbook. I called them up and they said all I needed is proof of product registration for my macbook. This macbook was a gift so I do not have the original receipt. I asked if I could simply print out
-
Select from local (tmp) Table in Function - Table not found
Hi, I want to create a cursor which selects from a Table which does not exist in database. I create this table as local table (how is it called? nested table?). Not shown in the code but I want to fill this local table later. After filled my cursor i