(ORA-997, ORA-1704) LONG TYPE 제약 사항 및 관련 에러 메시지

제품 : SQL*PLUS
작성날짜 : 2003-03-14
(ORA-997, ORA-1704) LONG TYPE 제약 사항 및 관련 에러 메시지
=========================================================
PURPOSE
이 자료는 LONG type을 처리하는 과정에서 발생하는 문제와 이에 대한
해결방안에 대하여 소개한 자료이다.
Problem Description
LONG data type의 컬럼을 참조하는 SQL 문장을 실행하는 동안
ORA-997 에러가 발생하는 경우가 있다.
ORA-0997 - illegal use of LONG datatype.
ORA-997 에러는 SQL 문장에서 LONG 컬럼을 사용할 때 나타날 수 있는 제약
사항 중의 하나이다. 다음은 LONG 컬럼에 사용될 수 없는 몇 가지 CASE이다.
1> WHERE, GROUP BY, ORDER BY, or CONNECT BY clause
or
with the DISTINCT operator in SELECT statements.
2> UNIQUE clause of a SELECT statement.
3> The column datatype clause of a CREATE CLUSTER statement.
4> SUBSTR, INSTR, NVL과 같은 SQL functions.
5> Expressions or Conditions.(SQL Reference 3장 참조)
6> Like Operator.(이것은 character operator이므로)
7> Select lists of queries containing GROUP BY clauses.
8> Select lists of Subqueries or Queries combined by Set operators.
9> Select lists in subqueries in INSERT statements.
SQL> INSERT INTO ... SELECT ... FROM ...
위와 같은 constructs는 허용이 되지 않음.
10> Select lists of CREATE TABLE AS SELECT statements.
SQL> CREATE TABLE ... AS SELECT ...
위와 같은 TABLE의 COPY는 가능하지 않으므로,
LONG COLUMN을 가진 테이블을 COPY하고자 할 때,
32KBytes 이하의 size라면 다음의 PL/SQL을 사용하면 가능하다.
또한, Long column의 제약 사항이 더 있는데, Long column은 2G까지 지원을
하지만, SQL*Plus에서 insert into 문장을 이용하여 long column에 넣을 문자
열을 single quote(') 안에 기술 시, 2000 characters가 넘으면 ora-1704
에러가 발생한다.
Workaround
none
Solution Description
이 경우에도 다음과 같이 PL/SQL을 이용해야 하며,
경우에 따라 Pro*C, SQL*Loader 등을 이용하여 insert해야만 한다.
< TABLE >
SQL> create table longtab(no number(2), text long);
< PL/SQL script >
DECLARE
string varchar2(32000);
no number(2);
BEGIN
SELECT no, longcolumn INTO no, string FROM longtable;
INSERT INTO longtab VALUES(no, string);
END;
Reference Documents
<Note:1068616.6>

Similar Messages

  • How can I fix a xquery resulting error ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence  - got multi-item sequence

    Hello,
    How can I improve the XQuery below in order to obtain a minimised return to escape from both errors ORA-19279 and ORA-01706?
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(text(), "(near((The,power,Love),10, TRUE))") > 0] return $book
    ERROR:
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence
    - got multi-item sequence
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(., "(near((The,power,Love),10, TRUE))") > 0] return $book//bdy
    /*ERROR:
    ORA-01706: user function result value was too large
    Regards,
    Daiane

    below query works for 1 iteration . but for multiple sets i am getting following error .
    When you want to present repeating groups in relational format, you have to extract the sequence of items in the main XQuery expression.
    Each item is then passed to the COLUMNS clause to be further shredded into columns.
    This should work as expected :
    select x.*
    from abc t
       , xmltable(
           xmlnamespaces(
             default 'urn:swift:xsd:fin.970.2011'
           , 'urn:swift:xsd:mtmsg.2011' as "ns0"
         , '/ns0:FinMessage/ns0:Block4/Document/MT970/F61a/F61'
           passing t.col1
           columns F61ValueDate                Varchar(40) Path 'ValueDate'
                 , DebitCreditMark             Varchar(40) Path 'DebitCreditMark'
                 , Amount                      Varchar(40) Path 'Amount'
                 , TransactionType             Varchar(40) Path 'TransactionType'
                 , IdentificationCode          Varchar(40) Path 'IdentificationCode'                 
                 , ReferenceForTheAccountOwner Varchar(40) Path 'ReferenceForTheAccountOwner'
                 , SupplementaryDetails        Varchar(40) Path 'SupplementaryDetails'       
         ) x ;

  • ORA-08103: object no longer exists during APEX 2.2 to 3.0 upgrade

    I am trying to upgrade an APEX 2.2 installation on 10.2.0.2 Enterprise Edition on SLES-10 with 400MB shared_pool and 1 GB sga_target. During the upgrade, the session crashes due to ORA-00600: internal error code, arguments: [ktspgfb-1]. I cannot drop the FLOWS_030000 user and 523 corrupt blocks in sys7.dbf including objects source$, argument$ and obj$. So far, I have restored the database and corrupted it 3 times. Each time, I redownloaded apex.zip from technet.oracle.com.
    Here are the errors:
    ...PAGE 1300: Application Comparison
    ...PAGE 1301: Application Comparison Counts
    ...PAGE 1400: Report Layouts
    ...PAGE 1401: Create Report Layout
    ...PAGE 1402: Create Report Layout
    ...PAGE 1405: Edit Report Layout
    ...PAGE 1406: Create Report Query
    ...PAGE 1500: Application Builder
    ...PAGE 1550: User Interface Defaults
    ...PAGE 1552: UI Defaults - Column Defaults LOV
    ...PAGE 1553: UI Defaults - Column Defaults
    ...PAGE 1555: UI Defaults - Table Defaults
    begin
    ERROR at line 1:
    ORA-08103: object no longer exists
    ORA-06512: at "FLOWS_030000.WWV_FLOW_API", line 7733
    ORA-06512: at line 18
    ERROR:
    ORA-00603: ORACLE server session terminated by fatal error
    ERROR:
    ORA-03114: not connected to ORACLE
    SP2-0359: memory exhausted
    Mon Apr 30 11:31:46 2007
    Incremental checkpoint up to RBA [0x175.153ac.0], current log tail at RBA [0x175.2e77b.0]
    Mon Apr 30 11:32:05 2007
    Beginning log switch checkpoint up to RBA [0x176.2.10], SCN: 8173962186001
    Thread 1 advanced to log sequence 374
    Current log# 1 seq# 374 mem# 0: /lv01/oracle/dev10data/log01.dbf
    Mon Apr 30 11:34:24 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/udump/dev10_ora_11590.trc:
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:34:49 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/udump/dev10_ora_11590.trc:
    ORA-00603: ORACLE server session terminated by fatal error
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:35:02 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/bdump/dev10_pmon_7541.trc:
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:35:15 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/bdump/dev10_pmon_7541.trc:
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:37:18 2007
    Completed checkpoint up to RBA [0x176.2.10], SCN: 8173962186001
    Mon Apr 30 11:37:43 2007
    Errors in file /lv01/oracle/dev10db/10.2.0/admin/dev10_plato/bdump/dev10_p000_12471.trc:
    ORA-00600: internal error code, arguments: [ktspgfb-1], [], [], [], [], [], [], []
    Mon Apr 30 11:37:54 2007
    SMON: Parallel transaction recovery slave got internal error
    SMON: Downgrading transaction recovery to serial
    I now have 523 corrupt blocks in sys7.dbf:
    DBVERIFY: Release 10.2.0.2.0 - Production on Mon Apr 30 11:50:21 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    DBVERIFY - Verification starting : FILE = /lv01/oracle/dev10data/sys7.dbf
    Page 188161 is marked corrupt
    Corrupt block relative dba: 0x01c2df01 (file 7, block 188161)
    Completely zero block found during dbv:
    Page 188162 is marked corrupt
    Corrupt block relative dba: 0x01c2df02 (file 7, block 188162)
    Completely zero block found during dbv:
    Page 188163 is marked corrupt
    Corrupt block relative dba: 0x01c2df03 (file 7, block 188163)
    Completely zero block found during dbv:
    Page 188164 is marked corrupt
    Corrupt block relative dba: 0x01c2df04 (file 7, block 188164)
    Completely zero block found during dbv:
    Any ideas why this is happening? I see a number of current bugs for ORA-00600: ktspgfb-1, but most knowledge base articles refer to 9.0.1 or 9.2.

    After upgrading to 10.2.0.3 and doubling the shared_pool_size and sga_target, I was able to upgrade to APEX 3.0 without errors.

  • ORA-08103: object no longer exists

    Dear Experts,
    I have a very tricky situation here.
    A background job runs daily on our Production, which kinds of populates a lot of tables in another database (warehouse).
    This morning, the job failed with an error: ORA-08103: object no longer exists
    This error came while populating a table through a procedure.
    I checked that the procedure and table both are in valid state and there are proper grants in place.
    Also, we had faced the same problem few days back for the same table. We did not change anything. Simply re-ran the job and it went fine. Now also, we are re-running teh job and waiting to check if it goes fine.
    Any ideaas why this error would come?
    Thanks.

    Leo, Thanks very much for your inputs. The proceudre does not use any views.
    Here is the code:
    PROCEDURE GS_SKILLS_SP
    IS
    err_num NUMBER:=0;
    err_msg VARCHAR2(100):=null;
    status  VARCHAR2(1):='Y';
    proc_name VARCHAR2(60):='GS_SKILLS_SP';
    table_name VARCHAR2(100):='GS_SKILLS_DIM';
    BEGIN
    RPT_GS.Z_PRO_TRUNCATE_TABLE('GS_SKILLS_DIM');
    INSERT INTO GS.GS_SKILLS_DIM
           (SKILL_ID,
        SKILL_CODE,
        SKILL_NAME,
        DESCRIPTION,
        PARENT_SKILL_ID,
        SKILL_PATH,
        IS_ACTIVE,
        PARENT_SKILL_PATH,
        PC_ID,
        PC_NAME,
        DIS_ID,
        DIS_NAME,
        LEVEL_ID,
        LEVEL_NAME)
    SELECT  SK.SKILL_ID,
        SK.SKILL_CODE,
        SK.SKILL_NAME,
        SK.DESCRIPTION,
        SK.PARENT_SKILL_ID,
        SK.SKILL_PATH,
        SK.IS_ACTIVE,
        SK.PARENT_SKILL_PATH,
        null,
        null,
        null,
        null,
        null,
        null
    FROM    SKILLS_DIM    SK
    WHERE UPPER(SK.SKILL_CODE) LIKE 'GS%'
    AND SK.IS_ACTIVE = 'Y'
    UNION
    SELECT  SK.SKILL_ID,
        SK.SKILL_CODE,
        SK.SKILL_NAME,
        SK.DESCRIPTION,
        SK.PARENT_SKILL_ID,
        SK.SKILL_PATH,
        SK.IS_ACTIVE,
        SK.PARENT_SKILL_PATH,
        SK_ASSOC.PC_ID,
        SK_ASSOC.PC_NAME,
        SK_ASSOC.DIS_ID,
        SK_ASSOC.DIS_NAME,
        SK_ASSOC.LEVEL_ID,
            SK_ASSOC.LEVEL_NAME
    FROM    SKILLS_DIM        SK,
        SKILLS_OBS_ASSOC_DIM SK_ASSOC
    WHERE SK.SKILL_ID=SK_ASSOC.SKILL_ID
    AND UPPER(SK.SKILL_CODE) LIKE 'GS%'
    and sk.is_active='Y'
    AND SK_ASSOC.LOB_NAME = 'Global Services' ;
    COMMIT;
    INSERT INTO GS.GS_SKILLS_DIM
           (SKILL_ID,
        SKILL_CODE,
        SKILL_NAME,
        DESCRIPTION,
        PARENT_SKILL_ID,
        SKILL_PATH,
        IS_ACTIVE,
        PARENT_SKILL_PATH,
        PC_ID,
        PC_NAME,
        DIS_ID,
        DIS_NAME,
        LEVEL_ID,
        LEVEL_NAME)
    SELECT  SK.SKILL_ID,
        SK.SKILL_CODE,
        SK.SKILL_NAME,
        SK.DESCRIPTION,
        SK.PARENT_SKILL_ID,
        SK.SKILL_PATH,
        SK.IS_ACTIVE,
        SK.PARENT_SKILL_PATH,
        null,
        null,
        null,
        null,
        null,
        null
    FROM    SKILLS_DIM    SK
    /*WHERE UPPER(SK.SKILL_CODE) LIKE 'GS%'
    AND SK.IS_ACTIVE = 'Y'*/
    /*changed on 16/04/2008 for RQ34634(PRIME168) */
    where sk.is_active='Y'
    and exists(select 1 from GS.GS_RES_PROFICIENCY_DIM gs_sk where gs_sk.skill_code=sk.skill_code)
    and not exists(select 1 from gs.gs_skills_dim rpt_sk where rpt_sk.skill_code=sk.skill_code)
    UNION
    SELECT  SK.SKILL_ID,
        SK.SKILL_CODE,
        SK.SKILL_NAME,
        SK.DESCRIPTION,
        SK.PARENT_SKILL_ID,
        SK.SKILL_PATH,
        SK.IS_ACTIVE,
        SK.PARENT_SKILL_PATH,
        SK_ASSOC.PC_ID,
        SK_ASSOC.PC_NAME,
        SK_ASSOC.DIS_ID,
        SK_ASSOC.DIS_NAME,
        SK_ASSOC.LEVEL_ID,
            SK_ASSOC.LEVEL_NAME
    FROM    SKILLS_DIM        SK,
        SKILLS_OBS_ASSOC_DIM SK_ASSOC
    WHERE SK.SKILL_ID=SK_ASSOC.SKILL_ID
    /*changed on 16/04/2008 for RQ34634(PRIME168) */
    and sk.is_active='Y'
    and exists(select 1 from GS.GS_RES_PROFICIENCY_DIM gs_sk where gs_sk.skill_code=sk.skill_code)
    and not exists(select 1 from gs.gs_skills_dim rpt_sk where rpt_sk.skill_code=sk.skill_code)
    AND SK_ASSOC.LOB_NAME = 'Global' ;
    COMMIT;
    IF (err_num = 0) then
       INSERT INTO GS_ERROR
                 (PROC_NAME,
              TABLE_NAME,
                  ERR_CODE,
                  ERR_MSG,
                  CREATED_DATE,
                  STATUS)
                  VALUES(proc_name,table_name,err_num,err_msg,SYSDATE,status);
        COMMIT;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
          err_num:=SQLCODE;
          err_msg:=SUBSTR(SQLERRM,1,100);
          status:='N';
          ROLLBACK;
          INSERT INTO GS_ERROR
                 (PROC_NAME,
              TABLE_NAME,
                  ERR_CODE,
                  ERR_MSG,
                  CREATED_DATE,
                  STATUS)
                  VALUES(proc_name,table_name,err_num,err_msg,SYSDATE,status);
          COMMIT;
    END GS_SKILLS_SP;

  • ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence

    Hi ,
    I executed the below query in database version 11.2.0.3.0, it throws the error like "ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence"
    with PAYMENT_XML as (
          select XMLTYPE(
            '<Document>
            <pain.002.001.02>
                <GrpHdr>
                      <MsgId>CITIBANK/20091204-PSR/4274</MsgId>
                      <CreDtTm>2009-12-04T09:36:00</CreDtTm>
               </GrpHdr>
                <OrgnlGrpInfAndSts>
                <OrgnlMsgId>10002</OrgnlMsgId>
                <OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
                <OrgnlNbOfTxs>20</OrgnlNbOfTxs>
                <OrgnlCtrlSum>7000</OrgnlCtrlSum>
                <GrpSts>PART</GrpSts>
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                </StsRsnInf>
              </OrgnlGrpInfAndSts>
              <OrgnlGrpInfAndSts>
                <OrgnlMsgId>10001</OrgnlMsgId>
                <OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
                <OrgnlNbOfTxs>202</OrgnlNbOfTxs>
                <OrgnlCtrlSum>9000</OrgnlCtrlSum>
                <GrpSts>PART</GrpSts>
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                  <AddtlStsRsnInf>Formated</AddtlStsRsnInf>
                </StsRsnInf>
              </OrgnlGrpInfAndSts>
          </pain.002.001.02>
      </Document>') as OBJECT_VALUE1
       from dual
      select R.*
      from PAYMENT_XML,
           XMLTABLE(
           'for $COMP in $COMPANY/Document/pain.002.001.02
              for $DEPT at $DEPTIDX in $COMP/OrgnlGrpInfAndSts
               return <RESULT>
                        <NAME>{fn:data($COMP/GrpHdr/MsgId)}</NAME>
                          $DEPT/OrgnlMsgId,
                          $DEPT/OrgnlNbOfTxs,
                          $DEPT/OrgnlCtrlSum,
                          $DEPT/GrpSts,
                          $DEPT/StsRsnInf/AddtlStsRsnInf
                      </RESULT>'
           passing OBJECT_VALUE1 as "COMPANY"
           columns
             NAME            VARCHAR(10)  path 'NAME',
             OrgnlMsgId      VARCHAR2(24) path 'OrgnlMsgId',
             ORGNLNBOFTXS    VARCHAR2(24) path 'OrgnlNbOfTxs',
             ORGNLCTRLSUM    NUMBER       path 'OrgnlCtrlSum',
             GRPSTS          VARCHAR2(24) path 'GrpSts',
             ADDTLSTSRSNINF  VARCHAR2(40) path 'AddtlStsRsnInf'
         ) r
    Errors comes this part :
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                  <AddtlStsRsnInf>Formated</AddtlStsRsnInf>
                </StsRsnInf>
    if i put the single statement for this xml element <AddtlStsRsnInf> it works fine if more than one element comes it raised the error.
    i want the output like the below format : want to merge the element value with (, comma)  delimiter with single coloumn value
    NAME
    ORGNLMSGID
    ORGNLNBOFTXS
    ORGNLCTRLSUM
    GRPSTS
    ADDTLSTSRSNINF
    CITIBANK/2
    10002
    20
    7,000
    PART
    ACK - FILE PARTIALLY SUCCESSFUL
    CITIBANK/2
    10001
    202
    9,000
    PART
    ACK - FILE PARTIALLY SUCCESSFUL, Formated
    Thanks is advance for reply
    Thanks,
    Chidam

    Try with XQuery string-join() function :
    ADDTLSTSRSNINF  VARCHAR2(40) path 'string-join(AddtlStsRsnInf, ", ")'

  • Java.sql.SQLException: ORA-08103: object no longer exists

    hi, Everyone:
    i want to insert one colume to a temp table,
    so i did the following
    1: drop the table
    2: recreate the table with the new colume in it.
    we i run my application, there is a
    "java sql exception ORA-08103: object no
    longer exists ". looks like the table
    doesn't exist in database any more. but
    it is really still there.
    thanks
    hongjie
    null

    I was able to resolve this error by using on commit preserve rows, instead of on commit delete.

  • ORA-00972:identifier too long

    hi
    oracle up limitation ?
    create table aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(a char);
    Error
    ORA-00972:identifier too long
    or
    create table a (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa char);
    Error
    ORA-00972:identifier too long
    Oracle can not support upto 32 characters table name and field name ?
    It is true?
    null

    If you do a search on the particular Oracle error, you get the following:
    ORA-00972 identifier is too long
    Cause: The name of a schema object exceeds 30 characters. Schema objects are tables, clusters, views, indexes, synonyms, tablespaces, and usernames.
    Action: Shorten the name to 30 characters or less.
    It would appear that there's a 30 character limit.
    Justin
    null

  • Issue with Materialized View ORA-08103: object no longer exists

    I have a materialized view which gets refreshed(COMPLETE Refresh) every 2 minutes. However there are few scheduled programs which queries this materialized view, some of the queries in the scheduled program take longer to run. When the materialized view refresh time overlaps with this query executing from the program i get this error: ORA-08103: object no longer exists.
    I know that COMPLETE refresh doing TRUNCATE + INSERT is causing the issue, could someone suggest a workaround for this. But i need to do a COMPLETE refresh.

    Why would a TRUNCATE cause an "object no longer exists" ?
    Which job encounters this error ? The MV Refresh job or the programs that are querying the MV ? How does it resolve ? Automatically -- meaning that the next refresh/query does not raise the error ?

  • Olite10g - CONS-10049 / ORA-00972: identifier too long

    While trying to publish an application I get a "CONS-10049 / ORA-00972: identifier too long" error message for tables that have names of 26 or 27 characters long. It looks like it includes the owner/schema name to the length calculation and thinks the table name is exceeding 30 characters. If I remove the tables with these long names the app is built without an error. fyi - The table already exists in an O9iR2 database, I am simply trying to import it for this application.
    Any ideas?
    TIA,
    Scott

    Here's the answer:
    The max table name length limit is 30 characters. However, OLite prepends 4 characters to the name for an internally used publication item name (i.e. you might see something like clg$<table_name>). Therefore, the actual length limit is 26 characters, not 30. The solution would be to change the table name to be 26 characters or less, or if that is not possible, to create a view on the table and use that for your publication item.

  • Expdp gives error ORA-39125 ,ORA-31642 DBMS_RULE_EXP_RULES

    DB version=10.2.0.4 64bit
    os =linux OEL 64bit
    When i execute expdp it gives the following errors and exit :
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    ORA-39125: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS while calling DBMS_METADATA.FETCH_XML_CLOB []
    ORA-31642: the following SQL statement fails:
    BEGIN "SYS"."DBMS_RULE_EXP_RULES".SCHEMA_CALLOUT(:1,0,1,'10.02.00.04.00'); END;
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA", line 907
    ORA-08103: object no longer exists
    what is the problem?! i searched in metalink and could not find any solution.

    Pl post the complete expdp command used. Can you reproduce this issue consistently ?
    OERR: ORA-8103 "object no longer exists" / Troubleshooting, Diagnostic and Solution [ID 8103.1]
    HTH
    Srini

  • LONG type

    Is it possible to search through LONG type? If yes how?
    For example dba_source has column TEXT defined as VARCHAR2(4000) so we can use in WHERE clause:
    TEXT LIKE 'some_string'dba_views on another side has also column TEXT but is defined as LONG so previous code will produce a error:
    ORA-00932: inconsistent datatypes: expected NUMBER got LONGAny suggestion is welcome.

    You have to do searching like this in plsql for long data types.
    It would look something like this:
    declare
    cursor x is
    select * from dba_views;
    begin
    for rec in x loop
    if upper(rec.text) like '%SOME TEXT%' then
    dbms_output.put_line('view' ||rec.view_name);
    end if;
    end loop;
    end;
    /

  • Long type data

    I want to truncate a long type data into 100 characters during the retrieving. how can I do that in select statement?

    This is the test procedure I created, but when I execute it, I got error.
    create or replace procedure test as
    cursor c1 is select cust_prob_descr from request;
    c1_rec c1%rowtype;
    temp varchar2(200);
    i number :=1;
    begin
    --open c1;
    for c1_rec in c1 loop
    fetch c1 into temp;
    DBMS_OUTPUT.PUT_LINE(i&#0124; &#0124;','&#0124; &#0124;temp);
    i:=i+1;
    end loop;
    close c1;
    end;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "GETRONICS.TEST", line 10
    ORA-06512: at line 1
    how can I make it work.
    Thanks a lot
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Suresh Sikharam ([email protected]):
    Declare a variable of varchar2(100) and use a for loop to fetch the long data into this variable. Need help more I can send you the script to do that.
    Good Luck
    Suresh
    <HR></BLOCKQUOTE>
    null

  • ACL connect privileges ORA-01422 ORA-06512

    Application Express Installation Guide
    3.3.6.1 Granting Connect Privileges
    The following example demonstrates how to grant connect privileges to any host for the APEX_030200 database user.
    DECLARE
    ACL_PATH VARCHAR2(4000);
    ACL_ID RAW(16);
    BEGIN
    -- Look for the ACL currently assigned to '*' and give APEX_030200
    -- the "connect" privilege if APEX_030200 does not have the privilege yet.
    SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
    WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
    -- Before checking the privilege, ensure that the ACL is valid
    -- (for example, does not contain stale references to dropped users).
    -- If it does, the following exception will be raised:
    EXCEPTION
    -- When no ACL has been assigned to '*'.
    WHEN NO_DATA_FOUND THEN
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
    'ACL that lets power users to connect to everywhere',
    'APEX_030200', TRUE, 'connect');
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
    END;
    COMMIT;return:
    ORA-01422:
    ORA-06512: line 8
    SELECT * FROM sys.DBA_NETWORK_ACLS
    WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
    "HOST"     "LOWER_PORT"     "UPPER_PORT"     "ACL"     "ACLID"
    "*"     ""     ""     "/sys/acls/users.xml"     "(RAW)"
    "*"     ""     ""     "/sys/acls/power_users.xml"     "(RAW)"My Apex says login XDB Password
    Sqlplus.exe "SYS/oracle@orcl AS SYSDBA" @epgstat.sql
    All OK
    Help
    APEX 3.2
    11g Rel1

    Um , i have implemented the following pl/sql. It seem to kick the person out BUT (now this is a big BUT) within the grid control it mentions :
    Details          Failed to connect to database instance: ORA-00604: error occurred at recursive SQL level 1.
    create or replace trigger session_access
    DECLARE
    v_username sys.v_$session.username%type;
    v_osuser sys.v_$session.osuser%type;
    BEGIN
    select s.username ,s.osuser into v_username,v_osuser
    from v$session s where s.username='SUSANJO' and s.osuser='oracle';
    IF (v_username ='SUSANJO' AND V_OSUSER='oracle' )
    THEN
    RAISE_APPLICATION_ERROR(-20001, 'You are not allowed to login using the program');
    END IF;
    END session_access;
    Output :
    SQL*Plus: Release 10.2.0.3.0 - Production on Mon Mar 23 12:36:43 2009
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning and Data Mining options
    SQL> connect susanjo
    Enter password:
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: You are not allowed to login using the program
    ORA-06512: at line 10
    Warning: You are no longer connected to ORACLE.
    SQL>
    I did conduct a research which was not all that helpful too. So i am back to square one again.
    regards
    Susan John

  • ORA-12801 ORA-08103 while running gather schema stats in R12

    Hi All,
    We have recently upgraded from 11.5.9 to R12.1.1 on RHEL 4.8
    Database version is 10.2.0.5
    We are running Gather schema stats on R12.1.1 but its Errored out with below messages.
    ORA-12801: error signaled in parallel query server P006
    GL.GL_JE_LINES
    ORA-08103 : object no longer exists
    Please advice if anybdy face this issue.
    Thanks
    RB

    Please see (GATHER SCHEMA STATISTICS COMPLETED WITH ERROR WHEN RUNNING FOR GL SCHEMA. [ID 1068541.1]).
    Thanks,
    Hussein

  • Errors ORA-01034, ORA-27101 and ORA-01033

    Hi!
    I have Oracle 9i DB and DevSuite 10g installed on my laptop. There are three databases on my machine.
    Recently, I tried to install Oracle Discoverer 10g and that's where the problem started. I could no longer connect to the databse using either SQL*Plus, TOAD or even from the front end application.
    I realised that some of the regisrty entries were no longer in place after the Discoverer installation. After doing these entries, I am still getting the following errors while connecting:
    ORA-01034 : Oracle not available
    ORA-27101 : Shared memory realm does not exist
    After doing the following entries in the registry, for the default database, I'm getting the 'ORA-01033 : Oracle Initialization or shutdown in progress' error while connecting for that particular db:
    ORACLE_SID=DTA
    ORA_DTA_AUTOSTART=TRUE
    ORA_DTA_SHUTDOWN=TRUE
    ORA_DTA_SHUTDOWN_TIMEOUT=30
    ORA_DTA_SHUTDOWNTYPE=i
    And for the other two DBs, the errors ORA-01034, ORA-27101 remain the same.
    Can anyone please help?
    Best regards,
    Aparna

    Have you checked your Windows services for the Oracle instances? Started and set to auto-start on boot.
    Also check your $path variable to make sure the Oracle home(s) appear in the path
    HTH -- Mark D Powell --

Maybe you are looking for

  • Dvd doesn't work after mountain lion upload?

    makes some repetitve sounds then spits it back out?  fix?

  • Database hangs in shutdown immediate for cold backup

    Dear experts , we have scheduled cold backup for our database. is there any solution to resolve below mentioned errors other than RMAN hot backup or shutdown abort ? Sat Jan 26 00:20:55 2013 Active call for process 3939 user 'oracle' program '[email 

  • G4 won't connect to internet no matter which way I try.

    I recently obtained a 867Mhz PowerMac G4 running 10.4.6 and I can't get it connected to the internet. I'm a savvy mac guy(at least i think I am) and I am running another G4 and an Imac G5 off the same network router which is a linksys. I've tried con

  • IMac (Late 2009) internal microphone not working

    Hi! My internal microphone is no longer working in any applications. Under System preferences and Sound I have selected Internal microphone and the input volume is set to max but I get no readings from the input level, it's dead. I have no external m

  • Consignment stock in the planning book

    Hi Experts I would like to display Consignent stock category CD in Planning Book. I am using PHYSICAL_STOCK( u2018productu2019 ; u2018locationu2019 ; version ; u2018categoryu2019 ; u2018categoryu2019 ; u2026) returns the stock of a location product o