ORA-06502 error with external table having long records
I'm getting a strange error with the oci driver that I don't get with the thin driver.
The basic situation is that we using external tables and both the oci and thin drivers have been working until we tested with a table that had longer records than the previous tables. The new table has 1800 byte records.
The thin driver still works fine with the new table. However, the oci driver generates the following error with the new table:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I suspect that with oci driver the oci DLLs are reading the external file and the DLLs can't handle the longer record length.
Particulars
- Oracle DB Server is 10.2.0.1 on SunOS 5.9
- OCI Instant Client instantclient_10_2 on Windows XP
- OCI client code from DB server installation running on DB server
- Works with thin driver from Windows XP and on DB server machine for all record lengths
- Works with both OCI drivers for records < 1800 bytes (don't know actual limit)
- Fails with both OCI drivers for records = 1800 bytes.
Does anyone out there have any thoughts.
Thanks in advance.
Your access parameters are in the wrong order. External tables are a bit fussy like that. Refer to the access_parameters section in the Utilities manual and follow the order there. From memory it will go something like this:
RECORDS DELIMITED...
LOG/BAD/DISCARDFILE...
FIELDS TERMINATED...LDRTRIM
MISSING FIELD VALUES...
fields...
)Regards...
Similar Messages
-
ORA-01461 Error when mapping table with multiple varchar2(4000) fields
(Note: I think this was an earlier problem, supposed fixed in 11.0, but we are experiencing in 11.7)
If I map an Oracle 9i table with multiple varchar2(4000) columns, targeting another Oracle 9i database, I get the ORA-01461 error (Can't bind a LONG value only for insert into a LONG).
I have tried changing the target columns to varchar2(1000), as suggested as a workaround in earlier versions, all to no avail.
I can have just one varchar2(4000) map correctly and execute flawlessly - the problem occurs when I add a second one.
I have tried making the target column a LONG, but that does not solve the problem.
Then, I made the target database SQL Server, and it had no problem at all, so the issue seems to be Oracle-related.Hi Jon,
Thanks for the feedback. I'm unable to reproduce the problem you describe at the moment - if I try to migrate a TEXT(5), OMWB creates a VARCHAR(5) and the data migrates correctly!! However, I note from you description that even though the problematic source column datatype is TEXT(5), you mention that there are actually 20 lines of text in this field (and not 5 variable length characters as the definition might suggest).
Having read through some of the MySQL reference guide I note that, in certain circumstances, MySQL actually changes the column datatype specified either at table creation time or when interfacing with other databases ( ref 14.2.5.1 Silent Column Specification Changes and 12.7 Using Column Types from Other Database Engines in the MySQL reference guide). Since your TEXT(5) actually contains 20 lines of text, MySQL (database or JDBC driver .... or both) may be trying to automatically map the specified datatype of the column to a datatype more appropriate to storing 20 lines of text.... that is, to a LONG value in this case. Then, when Oracle is presented with this LONG value to store in a VARCHAR(5) field, it throws the ORA-01461 error. I need to investigate this further, but this may be the case - its the first time I've see this problem encountered.
To workaround this, you could change the datatype of the column to a LONG from within the Oracle Model before migrating. Any application code that accesses this column and expects a TEXT(5) value may need to be adjusted to cope with a LONG value. Is this a viable workaround for you?
I will investigate further and notiofy you of any details I uncover. We will need to track this issue for possible inclusion in future development plans.
I hope this helps,
Regards,
Tom. -
I have just installed the latest version of SQL Developer (1.2.1.3213) and am running an Oracle 9i database (version 9.2.0.7).
When I click on the SQL tab when looking at a table I get an ORA-06502 error and the DDL generated has "-- Unable to Render DDL with DBMS_METADATA using internal generator." at the top.
I then get a whole host of other errors when using other parts of the program until I disconnect and reconnect.
This error also occurs when I run the following query:
select dbms_metadata.get_ddl('TABLE',table_name , user ) from user_tables;
Any ideas?
Incidentally prior to this release I had an early version 1 release of SQL Developer and the SQL tab here showed nothing at all.
Any comments would be most appreciated.I am currently using v2.1.1.64, Build MAIN-64.45 and have the same or a similar problem. SQL developer will not generate the SQL code, but fails with the following error:
ORA-06502: PL/SQL: numeric or value error
LPX-00210: expected '<' instead of 'n'
ORA-06512: at "SYS.UTL_XML", line 0
ORA-06512: at "SYS.DBMS_METADATA_INT", line 3688
ORA-06512: at "SYS.DBMS_METADATA_INT", line 4544
ORA-06512: at "SYS.DBMS_METADATA", line 466
ORA-06512: at "SYS.DBMS_METADATA", line 640
ORA-06512: at "SYS.DBMS_METADATA", line 1260
ORA-06512: at line 1
This installation doesn't have the same directory structure as in the previous reply, so I can't run the catmeta.sql script which doesn't exist in this release.
Mike -
ORA-06502 error when clicked on Lines tab in Oracle Service Contracts
When i query for some contracts and click on Lines Tab,i get ORA-06502 error.
This is not happenning with all contracts.My ICX: Numeric Characters profile is set to 10.000,00 but the user who created the contracts which were showing error message has ICX: Numeric Characters profile set to 10,000.00.
If i change my profile option to this users profile option,then i am not getting error in these contracts but getting error when trying to view the contracts which were created by other users who's ICX: Numeric Characters profile is different from mine.
Plz let me know how can i resolve this issue.
Looking for your suggessions.
Thanks,
RaviCRS Home is indicative of having Oracle clusterware installed. Is this a RAC cluster? Are you running on ASM? How many nodes? etc.
Please fill in the blanks. -
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... -
Problem with APEX 4.0 - "ORA-20001: Error with: GRANT CREATE CLUSTER "
I have a workspace which I've succesfully created with schema A.
However when i try to assign an additional schema to it, schema B, I get the following error message :-
"ORA-20001: Error with: GRANT CREATE CLUSTER TO "BI_SOURCES" ORA-01031: insufficient privileges"
i've tried granting "create cluster with admin option' to users A,B,anonymous AND APEX_040000. FLOWS_030000 already has these privileges.
Anybody any ideas ?
regs
johnnie
Edited by: johnnie d on 31-Aug-2011 10:58I have experience the similiar problem. The error message: Invalid exist/not exist condition: ORA 2001 Query must begin with Select or With.
I have home page and concept review report page below home page. And Concept review form under the report page. The error is display in all of the three pages. I checked carefully and still not able to find where the error come from. Can you please help? All the report region and form region have the select statement, is it from the LOVs? Home
Concept review report
Concept reveiw Form(for detail info)
Thank you! -
Communication error with external system ( VERTEX )
Hi Folks,
While creation the Credit memo request or Sales order /invoice system giving the error message " COmmunication error with external system ( VERTEX ) " and stopping to proceed further and even not able to post the accounting document.
Please help me out here.
Answers will be appreciated and rewared.
Regards,
Ram.Hi,
check this below thread
Communication error with the external tax system (VERTEX_MS0018)
OR
Remove V from the Extrernal System at the location IMG->financial Accounting->Financial Accounting Global Settings->Tax on Sales/Purchases->Basic Settings->External Tax Calculation->Activate External Tax Calculation
Reg,
JJ
Edited by: Jagsap on Mar 5, 2010 1:15 PM -
COMMUNICATION ERROR WITH EXTERNAL TAXATION SYSTEM - VERTEX_MS0018
When I copied US company code 3000 to my org using USD as currency code with a a view to simulate US scenarios it threw an error as under.
The error occurred when I was trying to fill in the address tab after copying the company code.
<b>
COMMUNICATION ERROR WITH EXTERNAL TAXATION SYSTEM - VERTEX_MS0018</b>.
Thank you and regards,
RamHi Ram Shiva,
Deactivate External tax
Path:SPRO>Financial Accounting>Financial Accounting Global Settings>Tax on Sales/Purchases>Basic Settings>External Tax Calculation>Activate External Tax Calculation
Hope this will solve
Best Regards
Ashish Jain -
ORA-06502: error when inserting into table via db link with long datatype
Folks,
I am getting the following error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
This occurs when an insert is done via a database link into a table that has a LONG data type for one of the columns, and the string contains some carriage returns and or line feeds.
I have checked by removing the db link, and inserting into a local table with identical column data types, where there is no error.
So this might be another db link bug?
So I need to remove the carriage returns and/or line feeds
in my pl/sql block in the page process. I have tried
l_text := REPLACE(l_text, CHR(10), ' ');
l_text := REPLACE(l_text, CHR(13), NULL);
but still getting the ORA-06502. Would really appreciate some advice here, please.
Cheers
KIMScott,
Time to 'fess up':
My fault sorry, the error was coming from another page process where I had allowed insufficient string length for one of the variables, and my error message did not identify the page process clearly.
This leads me to make a request for future releases, could the system error messages state which page process caused the problem?
One other thing I notice, and this might be a feature not a fault, the page processes are numbered: "Page Process: 3 of 5". However process 3 is not the 3rd one to be processed, and probably refers to the order in which they are created. Should the number reflect the process order?
Cheers
KIM -
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. -
Synonym problem with external table in materialized view
I have a materialized view that includes selects on two external tables.
However, no matter how I try to access the external tables, the creation fails with a "Synonym Translation Is No Longer Valid" (ORA-00980) error.
This happens even when I replace the tablename with the full table name, including the link.
I can create a view just fine, but if I then try something like CREATE MATERIALIZED VIEW mvw_my_view AS SELECT * FROM vw_my_view (where vw_my_view is the view in question), it still throws the Synonym Translation exception.00980, 00000, "synonym translation is no longer valid"
// *Cause: A synonym did not translate to a legal target object. This
// could happen for one of the following reasons:
// 1. The target schema does not exist.
// 2. The target object does not exist.
// 3. The synonym specifies an incorrect database link.
// 4. The synonym is not versioned but specifies a versioned
// target object.
// *Action: Change the synonym definition so that the synonym points at
// a legal target object.It is really, Really, REALLY difficult to fix a problem that can not be seen.
use COPY & PASTE so we can see what you do & how Oracle responds. -
ORA-06502 - Error when running "Ask The Expert 0.9"
Hi ,
I successfully installed "Ask the Expert" package with Apex 3.0 on Oracle 10g Database 10.2.0.1.0. No error ocurred during the import in my Apex environment.
Besides that, i'm having problems when i tried to run the "Aks the Expert". It always shows the following message errors:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Error Unable to write activity log.
I think it was a problem with APEX instalation, but i could run the Sample Application of Apex without any problem.
I opened an SR in Metalink, but to my surprise, the analist of support don't know what's wrong with the demo "Ask de Expert".
The debug function of the application show the following commands before the error ocurrs:
0.01:
0.01: S H O W: application="103" page="1" workspace="" request="" session="6648566035252817"
0.01: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
0.01: alter session set nls_language="AMERICAN"
0.01: alter session set nls_territory="AMERICA"
0.01: NLS: CSV charset=WE8MSWIN1252
0.01: ...NLS: Set Decimal separator="."
0.01: ...NLS: Set NLS Group separator=","
0.02: ...NLS: Set date format="DD-MON-RR"
0.02: ...Setting session time_zone to -03:00
0.02: NLS: Language=en-us
0.02: Application 103, Authentication: CUSTOM2, Page Template: 667896385843019243
0.02: ...Determine if user "N3COUTINHO" workspace "951808960237899" can develop application "103" in workspace "951808960237899"
0.02: ...ok to reuse builder session for user:nobody
0.03: ...Application session: 6648566035252817, user=nobody
0.03: ...Determine if user "N3COUTINHO" workspace "951808960237899" can develop application "103" in workspace "951808960237899"
0.03: Session: Fetch session header information
0.03: ...Metadata: Fetch page attributes for application 103, page 1
0.03: Fetch session state from database
0.03: Branch point: BEFORE_HEADER
0.03: Fetch application meta data
0.04: Computation point: BEFORE_HEADER
0.04: ...Perform computation of item: P1_CLEAN_CRITERIA, type=FUNCTION_BODY
0.04: ...Performing function body computation
0.06: ...Session State: Save "P1_CLEAN_CRITERIA" - saving same value: ""
0.06: Processing point: BEFORE_HEADER
0.06: ...Process "Read and Write Activity Cookie": PLSQL (BEFORE_HEADER) declare l_cookie_id number; begin owa_util.mime_header('text/html', FALSE); -- ate_api.read_activity_cookie; l_cookie_id := ate_api.fetch_activity_cookie_val( 'COOKIE_ID' ); -- if l_cookie_id is null then l_cookie_id :=
Content-type: text/html; charset=ISO-8859-1 Set-Cookie: activity_ask_expert=1|2400346189796; expires=Wed, 01-Jan-2020 08:00:00 GMT; path=/;
0.06: Encountered unhandled exception in process type PLSQL
0.06: Show ERROR page...
0.06: Performing rollback...
Please, could any one help me to solve this problem ? Metalink couldn't help me diagnosing what's wrong.
Thanks,
Sergio CoutinhoHi,
I don´t know if it help the analisis, but i collect some informations about my environment:
1) HTML DB version
3.0.1
2) Database version
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
3) Database server operating system (as well, if 32-bit or 64-bit)
Solaris 5.9 - 64 bits
4) Database Parameters:
PARAMETER VALUE
NLS_CALENDAR GREGORIAN
NLS_CHARACTERSET WE8ISO8859P1
NLS_COMP BINARY
NLS_CURRENCY $
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_DUAL_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_LANGUAGE AMERICAN
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_NCHAR_CONV_EXCP FALSE
NLS_NUMERIC_CHARACTERS .,
NLS_RDBMS_VERSION 10.2.0.1.0
NLS_SORT BINARY
NLS_TERRITORY AMERICA
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
Could it explain why ASK THE EXPERT is running on hosted apex site and it´s
generating error when running in my environment?
Thanks for the help !
Sergio -
Hi
I able to create external tables ,but unbale to query
I had followed the below steps
sql> conn system/manager;
Connected
SQL> select * from emp;
EMPNO ENAME DEPTNO
100 mmm 10
200 yyy 20
300 zz 30
SQL> spool emp.dat
SQL> select empno ||','||ename||','||deptno from emp;
EMPNO||','||ENAME||','||DEPTNO
100,mmm,10
200,yyy,20
300,zz,30
sql>create directory x as 'd:\oracle\y'
Directory is created
SQL> create table ext(empno char(4),ename char(10),deptno char(2))
2 organization external (type oracle_loader default directory x access
parameters(fields terminated by ','
3 (empno,ename,deptno))
4 location('emp.dat'));
Table created.
SQL> select * from ext;
select * from ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file emp.dat in x not found
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
Thanks inadvance
MohanYea - there's nothing here that shows that you are pointing at that dir when you do the spool command.
Also, the headers went into the file. There should only be data. Edit the file and clean it up.
Maybe start with a very simple hand-edited file with 1 field, and get that to work.
Tom Best -
ORA-00977 Error When Moving Table Between Tablespaces
I used the "Alter table <tablename> move tablespace <newtablespace>" command on tables that contain a LONG datatype, and get an ORA-00977 error. Was successful with other tables that did not contain a LONG. This was on a 8.1.7.0 database, running on Solaris 8. Any idea what the problem is?
Like most other useful Oracle features, it is not supported on tables with long columns. In order to change tablespaces with this table, you will have to export it, drop it, recreate it in the new tablespace then import the data into the new table.
Your other choice is to rebuild the table using clob instead of long. -
ORA-24816 error with oracle 10 driver
Friends,
I am getting the following error with Oracle 10 driver while trying to insert data > 4k into a LONG column. The table also contains another column of type varchar2(4000). The code works perfectly fine with Oracle 9i driver.
ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column
Kindly let me know if this is a programming error or a driver problem.
Thanks,
Vinaythis driver you mentioned, is it the jdbc driver?
ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column
Cause: A Bind value of length potentially > 4000 bytes follows binding for LOB or LONG.
Action: Re-order the binds so that the LONG bind or LOB binds are all at the end of the bind list.
using this forum may be more efficient -> http://forums.oracle.com/forums/forum.jspa?forumID=99&start=0
Maybe you are looking for
-
HT3662 how to cancel downloading Mavericks while in progress on macbook pro
I started downloading latest Mavericks OS and realized I had already downloaded the latest version. Cannot cancel the download. What do I do?
-
Pictures, logos etc are not viewable
Some web pages are not loading properly and all I see is a white screen and letters. I can't see pictures or logos and I cannot use 'buttons' like if I want to upload something. (windows 7, latest version of browser) I tried, unistalling-reinstalling
-
Hello, I m working on SRM-MDM scenario. I m sending CatalogUpdateNotification_Out using BBP_CCM_TRANSFER transaction from SRM But in the xml file which i receive in XI, Catalog Content data is missing. I dont know anything in SRM. Plz help. Thanks, M
-
How do I find past backups on my iPad after updating to ios8?
-
BSP table column not opening for input
I know very little about BSP but have a problem to fix. We have a BSP which works in 4.6 but not in ECC6. The problem is that when a table line is selected one of the columns is supposed to open for input but is not doing so. In the View the table is