ORA-02292 errors in friends messages

Database 11g R2

The scenario is there is a proc stored doing an insert into a table with several FKs.

The insertion fails, and an ORA-02292 is triggered.

The requirement is to intercept the ORA-02292 and record a message of 'friendly', IE. 'Employee record does not exist', or 'Dept registration does not exist.

So my question is, my understanding is ORA-02292 will be triggered on the first FK violation that happens. In the exception block, I'm looking for a way to identify which FK failed and the journal the right message. I have text analyze the SQLERRM to find the name FK, or is there a more clean/built-in way?

Thanks in advance.

There is no other way I know, other than having your code to check each FK table to know what lack us. Maybe this isn't even a bad idea - you can determine any missing data instead of just the first.

Tags: Database

Similar Questions

  • APEX tutorial: how to use checkboxes - ORA-02292

    Hello!
    At the end of the APEX Advanced Tutorial: "how to work with check boxes", I get the following message is displayed:
    ORA-02292: integrity constraint violation (OEHR_PD_PRODUCT_ID_FK) - book of the foundling

    I see that this table has dependencies on SQL Developer.

    I wanted to just confirm that it is the cause of the error and that the tutorial is missing instructions on how to approach the foreign constraint? Or maybe I'm doing something wrong?

    Thank you very much!
    -Igor

    It seems that you are right that the article does not address the problem of FK constraint. If you draw the FK constraint and delete the records linked to the foreign table then the delete operation should work just fine.

    Earl

  • connection mysql and oracle ORA-28545: error diagnosed by Net8 when connecting to an agent

    Hi all

    I have Oracle 10.2.0.5 server and MySQL 5.3 on windows environment. all are 64-bit.

    I want to connect to MySQL. I do the following

    Configure Listner.ora

    SID_LIST_LISTENER =

    (SID_LIST =

    (SID_DESC =

    (SID_NAME = PLSExtProc)

    (ORACLE_HOME = C:\oracle\product\10.2.0\db_2)

    (= Extproc PROGRAM)

    )

    (SID_DESC =

    (GLOBAL_DBNAME = ORCL)

    (ORACLE_HOME = C:\oracle\product\10.2.0\db_2)

    (SID_NAME = ORCL)

    )

    (SID_DESC =

    (SID_NAME = mysql)

    (ORACLE_HOME = C:\oracle\product\10.2.0\db_2)

    (PROGRAM = HSODBC)

    (ENVS = LD_LIBRARY_PATH = C:\oracle\product\10.2.0\db_2\LIB)

    )

    )

    LISTENER =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = oradev.hct.org) (PORT = 1521))

    )

    Tnsnames.ora configuration

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oradev.hct.org) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )
    MySQL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST= 10.153.103.5) (PORT = 1521))
    (CONNECT_DATA =
    (SID = mysql)
    )
    (HS = OK)
    )

    create file initodbc.ora in the folder hs

    HS_FDS_CONNECT_INFO = mysql

    HS_FDS_TRACE_LEVEL = OFF

    Restart the listner

    tnsping

    C:\users\administrator > tnsping mysql

    AMT Ping Utility for 64-bit Windows: Version 10.2.0.5.0 - Production 08-NOV-2
    015 13:02:52

    Copyright (c) 1997, 2010, Oracle.  All rights reserved.

    Use settings files:
    C:\oracle\product\10.2.0\db_2\network\admin\sqlnet.ora


    TNSNAMES adapter used to resolve the alias
    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.153.103.5)
    (PORT = 1521)) (CONNECT_DATA = (SID = mysql)) (HS=OK))
    OK (0 msec)

    Create the connection odbc for Unicode

    the test is successful

    now, I create the dblink

    create public mysql database link to connect to cssDBTeam identified by oracle using "mysql";

    then try to select from a table inside the MySQL database

    SQL > select * from appeal@mysql;

    Select * from appeal@mysql

    *

    ERROR on line 1:

    ORA-28545: error diagnosed by Net8 when connecting to an agent

    Cannot retrieve the text of the message NETWORK/NCR 65535

    ORA-02063: preceding 2 lines of MYSQL

    How could I solve this problem?

    Thank you.

    Hello

    I realize that your problem is that 10.2 HSODBC was never focused on the Windows 64-bit platform and was only available on 32-bit Windows.  You can not install the 32-bit on WIndows 64-bit HSODBC.

    Your only option is to install 11.2 DG4ODBC on your platform Windows 64 - bit, or if you have a RDBMS 10.2 installed on another platform, then you could use HSODBC as part of this installation and connect from the RDBMS on Windows 64 - bit using the links in the database.  HSODBC 10.2 software could not be installed as a stand-alone product and was only available as part of an RDBMS install.

    Kind regards

    Mike

  • ORA-19625: error identification of file

    Hi all;

    SYS > select name, database_role, protection_mode from v$ database;

    NAME DATABASE_ROLE PROTECTION_MODE

    --------- ---------------- --------------------

    PERFORMANCE MAXIMUM STANDBY PHYSICS CRMS

    SYS > select max(sequence#) from v$ log_history;

    MAX(SEQUENCE#)

    --------------

    14424

    SYS > list of archive logs;

    Database log mode Archive Mode

    Active AutoArchive

    Destination of archive USE_DB_RECOVERY_FILE_DEST

    Sequence of journal online oldest 14427

    Log sequence to archive 0

    Current log sequence 14428

    > > I got some error at the time of replication messages.  (errros are from alert.log to waiting for database)

    Physical Standby Database mounted.

    Lost write protect mode the "typical" value

    Errors in the /u02/app/oracle/diag/rdbms/stbycrms/stbycrms/trace/stbycrms_lgwr_5064.trc file:

    ORA-00313: open failed for members of the Journal 4 of the thread group 0

    ORA-00312: threads of journal online 4 0: ' / u03/app/oracle/oradata/REDOLOG/stbycrms/stby_redo4.log'

    ORA-27037: unable to get file status

    Linux error: 2: no such file or directory

    Additional information: 3

    Errors in the /u02/app/oracle/diag/rdbms/stbycrms/stbycrms/trace/stbycrms_lgwr_5064.trc file:

    ORA-00313: open failed for members of the Journal 4 of the thread group 0

    ORA-00312: threads of journal online 4 0: ' / u03/app/oracle/oradata/REDOLOG/stbycrms/stby_redo4.log'

    ORA-27037: unable to get file status

    Linux error: 2: no such file or directory

    Additional information: 3

    Errors in the /u02/app/oracle/diag/rdbms/stbycrms/stbycrms/trace/stbycrms_lgwr_5064.trc file:

    ORA-00313: open failed for the members of the newspaper group 5 of the thread 0

    ORA-00312: threads of journal online 5 0: ' / u03/app/oracle/oradata/REDOLOG/stbycrms/stby_redo5.log'

    ORA-27037: unable to get file status

    Linux error: 2: no such file or directory

    ..

    ...

    Completed: alter database mount standby

    Fri 30 Oct 23:08:35 2015

    RMAN DUPLICATE: Errors in krbm_getDupCopy

    Errors in the /u02/app/oracle/diag/rdbms/stbycrms/stbycrms/trace/stbycrms_ora_5140.trc file:

    ORA-19625: error identification of file /u02/app/oracle/oradata/stbycrms/system01.dbf

    ORA-27037: unable to get file status

    Linux error: 2: no such file or directory

    Additional information: 3

    RMAN DUPLICATE: Errors in krbm_getDupCopy

    Errors in the /u02/app/oracle/diag/rdbms/stbycrms/stbycrms/trace/stbycrms_ora_5140.trc file:

    ORA-19625: error identification of file /u02/app/oracle/oradata/stbycrms/sysaux01.dbf

    ORA-27037: unable to get file status

    Linux error: 2: no such file or directory

    Additional information: 3

    RMAN DUPLICATE: Errors in krbm_getDupCopy

    Errors in the /u02/app/oracle/diag/rdbms/stbycrms/stbycrms/trace/stbycrms_ora_5140.trc file:

    ORA-19625: error identification of file /u02/app/oracle/oradata/stbycrms/users01.dbf

    ORA-27037: unable to get file status

    Linux error: 2: no such file or directory

    11.2.0.1 on redhat

    It seems that two copies has been tried or done more than once and on the second time, he threw the "Krbm_getDupCopy" (which made me think see the stop).

    So if you ever have to re-create the day before do not delete files on the standby is the lesson.

    OR

    You have the error because RMAN checks the files on the two copies of 11.2 on.  (This is probably what happened)

    Thank you! I learned something new!

    See

    RMAN DUPLICATE: Errors in Krbm_getDupCopy found in the alert.log (Doc ID 1476641.1)

    Best regards

    mseberg

  • DB not starting not due ORA-00205: error in the identification of 11GRAC control file

    Hello

    I have it configured in the OEL5 11 g RAC (11.2.0.1.0). When I tried to start the database using the command srvctl or by manually I get the below error. \

    RPRC-1079: failed to start of ora.rac.db resources

    ORA-00205: error in the identification of control files, see log alerts for more information

    CRS-2674: beginning of 'ora.rac.db', 'ractwo' failed

    CRS-2632: there is no more servers to try to place the "ora.rac.db" resource on which will achieve its investment policy

    ORA-00205: error in the identification of control files, see log alerts for more information

    CRS-2674: beginning of 'ora.rac.db', 'racone' failed

    The content of the alert below log.

    ORA-00210: could not open the specified control file

    ORA-00202: control file: "+ RACDG/rac/controlfiles/control02.ctl".

    ORA-17503: ksfdopn:2 could not open the file +RACDG/rac/controlfiles/control02.ctl

    ORA-15001: diskgroup 'RACDG' does not exist or is not mounted

    ORA-15055: unable to connect to the ASM instance

    ORA-27140: attach to post/wait installation failed

    ORA-27300: OS dependent operating system: invalid_egid failed with status: 1

    ORA-27301: OS Error Message: operation not permitted

    ORA-27302: an error occurred at: skgpwinit6

    ORA-27303: additional information: current startup egid = 500 (oinstall), egid = 503 (asmadmin)

    ORA-00210: could not open the specified control file

    ORA-00202: control file: "+ RACDG/rac/controlfiles/control01.ctl".

    ORA-17503: ksfdopn:2 could not open the file +RACDG/rac/controlfiles/control01.ctl

    ORA-15001: diskgroup 'RACDG' does not exist or is not mounted

    ORA-15055: unable to connect to the ASM instance

    ORA-27140: attach to post/wait installation failed

    ORA-27300: OS dependent operating system: invalid_egid failed with status: 1

    ORA-27301: OS Error Message: operation not permitted

    ORA-27302: an error occurred at: skgpwinit6

    ORA-27303: additional information: current startup egid = 500 (oinstall), egid = 503 (asmadmin)

    But my ASM instance is running and I am able to see the controlfiles.

    State Type sector Rebal to Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files name of the block

    EXTERN MOUNTED N 512 4096 1048576 20472 13772 0 13772 0 N RACDG.

    I don't know is there any problem of perission. Oracle cluster and DB is running as user 'oracle '.

    Nobody does face this problem before? Let me know where to check this error.

    Kind regards

    007

    Hello

    Check "the correct permission must be" - rwsr - s - x '.»»»

    Stop the CRS.
    Change the permissions of the file to GI_HOME/bin/oracle for "- rwsr - s - x":

    $su - grid
    $cd GI_HOME/bin
    $chmod 6751 oracle
    Oracle-l $ls

    Start the /CRS.

    Start your database.

    Thank you

    Sundar

  • ORA-17628: error Oracle 19505 returned by remote Oracle - Dup Active Server

    Hi all

    I'm doing a duplicate RMAN of a 11.2.0.4 database to another host on a different IP address.

    Goal

    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    

    Auxiliary (nomount)

    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    
    

    I've added an entry static listener to the file on the server to THE listener and start the instance in nomount.

    (SID_LIST =
       (SID_DESC =
          (GLOBAL_DBNAME = IST_11G)
          (ORACLE_HOME = /devdb3/u01b/app/oracle/product/11.2.0.4)
          (SID_NAME = IST_11G)
        )
    

    TNSNAMES on the server to THE:

    points to the TARGET server:

    IST_11G_192 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.48)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = IST_11G)(UR=A)))
    

    the server pointing to THE

    IST_11G = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.21.64.72)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = IST_11G)(UR=A)))
    

    TNSNAMES on the TARGET server:

    IST_11G_NEW = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.21.64.72)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = IST_11G)(UR=A)))
    

    instance pFile to THE:

    Using parameters in Server pfile /devdb3/u01b/app/oracle/product/11.2.0.4/dbs/initIST_11G.ora-side

    Parameters of the system with default values:

    db_name = "IST_11G".

    I have sftp file password above and named correctly.

    Check the connections

    --from target
    $ sqlplus sys/xxx@IST_11G_NEW as sysdba
    
    SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 30 08:32:10 2015
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL>
    

    Since in THE

    $ sqlplus sys/xxx@IST_11G_192 as sysdba

    SQL * more: Release 11.2.0.4.0 Production on Mar 30 08:32:32 June 2015

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    SQL >

    So I checked that I have two means of connection, my at THE start and I can connect.

    Here's my RMAN command (Note: the TARGET servers and have the same host name, don't ask...) "This is why we use the IP address in the TNSNAMES):

    connection:

    rman target sys/xxx@IST_11G_192 auxiliary sys/xxx@IST_11G | tee /home/oracle/IST_11G_duplicate.log
    

    run
    {
      duplicate target database to IST_11G from active database
      NOFILENAMECHECK
      spfile
      set DB_FILE_NAME_CONVERT = '/devdb3/u01/oradata/IST_11G','/devdb3/u02d/oradata/IST_11G','/devdb3/u02/oradata/IST_11G','/devdb3/u02d/oradata/IST_11G'
      set LOG_FILE_NAME_CONVERT = '/devdb3/u01/oradata/IST_11G/','/devdb3/u03r/IST_11G_DEVDB3/'
      set control_files = '/devdb3/u03r/IST_11G_DEVDB3/controlfile/IST_11G_ctl1.ctl', '/devdb3/u04r/IST_11G_DEVDB3/controlfile/IST_11G_ctl2.ctl'
      set audit_file_dest = '/devdb3/u01b/app/oracle/product/11.2.0.4/rdbms/audit/'
      set diagnostic_dest = '/devdb3/u01b/app/oracle/'
      set log_archive_dest =  '/devdb3/u05f/fast_recovery/IST_11G/archivelogs/'
      set MEMORY_MAX_TARGET='1G'
      set MEMORY_TARGET='1G';
    }
    

    $ rman target sys/xxx@IST_11G_192 auxiliary sys/xxx@IST_11G | tee /home/oracle/IST_11G_duplicate.log
    
    Recovery Manager: Release 11.2.0.4.0 - Production on Tue Jun 30 08:37:02 2015
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: IST_11G (DBID=525645852)
    connected to auxiliary database: IST_11G (not mounted)
    
    RMAN> run
    2> {
    3>   duplicate target database to IST_11G from active database
      NOFILENAMECHECK
      spfile
    4> 5> 6>   set DB_FILE_NAME_CONVERT = '/devdb3/u01/oradata/IST_11G','/devdb3/u02d/oradata/IST_11G','/devdb3/u02/oradata/IST_11G','/devdb3/u02d/oradata/IST_11G'
      set LOG_FILE_NAME_CONVERT = '/devdb3/u01/oradata/IST_11G/','/devdb3/u03r/IST_11G_DEVDB3/'
      set control_files = '/devdb3/u03r/IST_11G_DEVDB3/controlfile/IST_11G_ctl1.ctl', '/devdb3/u04r/IST_11G_DEVDB3/controlfile/IST_11G_ctl2.ctl'
    7>   set audit_file_dest = '/devdb3/u01b/app/oracle/product/11.2.0.4/rdbms/audit/'
    8>   set diagnostic_dest = '/devdb3/u01b/app/oracle/'
      set log_archive_dest =  '/devdb3/u05f/fast_recovery/IST_11G/archivelogs/'
    9>   set MEMORY_MAX_TARGET='1G'
      set MEMORY_TARGET='1G';
    10> }
    11>
    12>
    
    Starting Duplicate Db at Jun 30 2015 08:37:10
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=216 device type=DISK
    
    contents of Memory Script:
    {
       backup as copy reuse
       targetfile  '/devdb3/oracle/app/oracle/product/11.2.0.4/dbs/spfileIST_11G.ora' auxiliary format
    '/devdb3/u01b/app/oracle/product/11.2.0.4/dbs/spfileIST_11G.ora'   ;
       sql clone "alter system set spfile= ''/devdb3/u01b/app/oracle/product/11.2.0.4/dbs/spfileIST_11G.ora''";
    }
    executing Memory Script
    
    Starting backup at Jun 30 2015 08:37:11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=365 device type=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 06/30/2015 08:37:12
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 06/30/2015 08:37:12
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    
    RMAN>
    
    
    
    
    
    
    
    
    
    

    I can't understand why I'm getting ORA-17628: error Oracle 19505 returned by remote Oracle server.

    So, I try one of the commands connecting memory se scripts to check if was not a problem with my execution block.

    backup copy reuse targetfile ' / devdb3/oracle/app/oracle/product/11.2.0.4/dbs/spfileIST_11G.ora' auxiliary format ' / devdb3/u01b/app/oracle/product/11.2.0.4/dbs/spfileIST_11G.ora';

    $ rman target sys/sys_IST_11G@IST_11G_192 auxiliary sys/sys_IST_11G@IST_11G | tee /home/oracle/IST_11G_duplicate.log
    
    Recovery Manager: Release 11.2.0.4.0 - Production on Tue Jun 30 08:41:00 2015
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: IST_11G (DBID=525645852)
    connected to auxiliary database: IST_11G (not mounted)
    
    RMAN> backup as copy reuse targetfile  '/devdb3/oracle/app/oracle/product/11.2.0.4/dbs/spfileIST_11G.ora' auxiliary format '/devdb3/u01b/app/oracle/product/11.2.0.4/dbs/spfileIST_11G.ora';
    
    Starting backup at Jun 30 2015 08:41:15
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=365 device type=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 06/30/2015 08:41:17
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    
    RMAN>
    
    
    
    
    
    
    
    

    Same mistake.  Nothing is written for the journal of alerts.  IM starting to pull the hair is left on my head out and people start screaming for this database.  I could go back to datapump but I want to understand this.  Any help would be very much appreciated.

    Thank you.

    Yes, although this:

    connected to target database: IST_11G (DBID = 525645852)

    connected to the auxiliary database: IST_11G (unassembled)

    can say you that RMAN you connected the two separate databases, the process, instances should do research each other using tnsnames file entries.  Thus, incorrect tnsnames entries can have one instance pointing to itself.

    Hemant K Collette

  • ORA-29285: error writing file

    Hi, I'm trying to clear a table in a flat file, & provided the stored procedure using my Tom Kyte @ https://asktom.oracle.com/pls/asktom/f?p=100:11:0:NO:P11_QUESTION_ID:88212348059.

    It worked well at first, but now I always get the following error message:

    ERROR on line 1:

    ORA-29285: error writing file

    ORA-06512: at "OFSA_ATOMIC. DUMP_TAB_TO_CSV", line 45

    ORA-06512: at line 1

    The search for this error ORA out Virgin on MOS.

    Any ideas how to solve this problem?

    I already checked for space on the file system and there is lots of space available.

    Also, the file is created with a size of 0 bytes before the procedure was abandoned.

    Thank you

    -CV

    Hello

    trying to figure out what has changed since it worked. Length of the line would be greater than 1024 default that uses Tom proc?

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e40758/u_file.htm#ARPLS70900

    The FOPEN max_linesize parameter must be a number in the range 1 to 32 767. If not specified, Oracle provides a default value of 1024.

  • ORA-28545: error diagnosed by Net8 when connecting to an agent

    Hi all

    This question was asked several times in this forum and I went to many discussions in this forum, but unfortunately I failed.

    I want to connect to MySQL database to oracle. I have the following configurations.

    1. Oracle database edition company 12 c (12.1.0.2.0) 64 bits on 64-bit Windows server 2012
    2. I have 5.6.11 MySQL on windows 7 64 bit
    3. I downloaded the driver site for delivery of oracle ODBC (MySQL Connector/ODBC 5.3.4 MSI for Windows x 86 (64 bit))
    4. I have install ODBC on my oracle server, a full install which installs the Unicode and Ansi versions.
    5. I create the connection ODBC for Unicode by going to control panel-> administrator tools-> (64-bit) ODBC Data Sources-> system DSN. I test and the test succeeded.
    6. I have set up my files Listner.ora, Tnsname.ora and initmysql.ora as below;

    Listner.ora

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = c:\app\Administrator\product\12.1.0\dbhome_1)
    (= Extproc PROGRAM)
    (ENVS = "EXTPROC_DLLS=ONLY:c:\app\Administrator\product\12.1.0\dbhome_1\bin\oraclr12.dll")
    )
    (SID_DESC =
    (SID_NAME = mysql)
    (ORACLE_HOME = C:\app\Administrator\product\12.1.0\dbhome_1)
    (PROGRAM = dg4odbc)
    (ENVS = LD_LIBRARY_PATH = C:\app\Administrator\product\12.1.0\dbhome_1\LIB)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))
    )

    Tnsnames.ora

    PDBORCL =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))

    )

    (CONNECT_DATA =

    (SERVICE_NAME = pdborcl.hct.org)

    )

    )

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl.hct.org)
    )
    )

    MySQL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = N410FS02)(PORT = 1521))
    (CONNECT_DATA =
    (SID = mysql)
    )
    (HS = OK)
    )

    initmysql.ora (C:\app\Administrator\product\12.1.0\dbhome_1\hs\admin\)

    HS_FDS_CONNECT_INFO = mysql

    HS_FDS_TRACE_LEVEL = OFF

    then I stop and start the listener, the listener status is less than

    LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on April 23, 2015 09:16
    : 52

    Copyright (c) 1991, 2014, Oracle.  All rights reserved.

    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=ORADEV.hct.org) (PORT = 152
    (1)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    TNSLSNR for Windows 64-bit version: Version 12.1.0.2.0 - Prod
    ction
    Start date April 23, 2015 09:13:56
    Uptime 0 days 0 h 2 min 59 sec
    Draw level off
    Security ON: OS Local Authentication
    SNMP OFF
    C:\app\Administrator\product\12.1.0\dbhome_1\network\a Listener parameter file
    dmin\listener.ora


    C:\app\Administrator\diag\tnslsnr\ORADEV\listener\aler log listener
    t\log. XML
    Summary of endpoints listening...
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=ORADEV.hct.org) (PORT = 1521)))
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=127.0.0.1) (PORT = 1521)))
    Summary of services...
    Service 'CLRExtProc' has 1 instance (s).
    Instance of 'CLRExtProc', status UNKNOWN, has 1 operation for this service...
    "Mysql" service has 1 instance (s).
    "Mysql", status UNKNOWN instance, has 1 operation for this service...
    Service 'orcl.hct.org' has 1 instance (s).
    Instance "orcl", State LOAN, has 1 operation for this service...
    Service 'orclXDB.hct.org' has 1 instance (s).
    Instance "orcl", State LOAN, has 1 operation for this service...
    Service 'pdborcl.hct.org' has 1 instance (s).
    Instance "orcl", State LOAN, has 1 operation for this service...
    The command completed successfully

    tnsping MySQL

    AMT Ping Utility for 64-bit Windows: Version 12.1.0.2.0 - Production on 23-APR-2
    015 09:17:54

    Copyright (c) 1997, 2014, Oracle.  All rights reserved.

    Use settings files:
    c:\app\Administrator\product\12.1.0\dbhome_1\network\admin\sqlnet.ora


    TNSNAMES adapter used to resolve the alias
    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = N410FS02)
    () (PORT = 1521)) (CONNECT_DATA = (SID = mysql)) (HS = OK))
    OK (40 msec)

    then I open sqlplus and connect to my plug-in database as user sys and create a link from public database for the test scheme that I have created in the MySQL database.

    create public database link mysql connect to test identified by test using 'mysql';
    

    then I try the table1 which lies in the scheme of test of MySQL to sqlplus as below

    SQL> select * from table1@mysql;
    select * from table1@mysql
                         *
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from MYSQL
    
    

    I have tried versions of Ansi and Unicode ODBC, but the same question.

    where is the problem in my setup?

    Thank you.

    You use the wrong host name in the tnsnames.ora.

    Take a look at the Oracle listener - it is configured with the address: (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))

    In your tnsnames.ora you specified in the mysql alias: (ADDRESS = (PROTOCOL = TCP) (HOST = N410FS02)(PORT = 1521))

    It does not work. Alias configured in the tnsnames.ora AMT must reference an Oracle listener who begins the process of bridge, so in your case at ORADEV.hct.org.

    So please correct your tnsnames.ora entry:

    MySQL =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = ORADEV.hct.org)(PORT = 1521))

    (CONNECT_DATA =

    (SID = mysql)

    )

    (HS = OK)

    )

  • ORA-12012: error on auto work "ORACLE_OCM". "MGMT_CONFIG_JOB

    I administer a 11.2.0.3 database running on the AIX 6.1 operating system and IBM pSeries 750 material.

    We receive the following alert each night in the alerts log: ORA-12012: error on auto work "ORACLE_OCM". "" MGMT_CONFIG_JOB_2_2 ". Research about this error on Google, most messages recommend to disable the work every night of the CMO. We do not currently use COM, and the Oracle_OCM of user account is locked.

    What would be the consequences of disabling this work every night?

    Thanks in advance for any advice!

    Mark

    If you do not use the COM, there should be no harm to this job is disabled - see MOS Doc 755838.1

    There are all the entries in the log of alerts to the performance of that work?

    HTH
    Srini

  • Once again - ORA-28545: error diagnosed by Net8 when connecting to an agent

    I am trying to connect to a SQL server server 2012

    I make the connections ODBC (called MOFIBO2, MOFIBO3, MOFIBO4) and I have a successful connection to then SQL server.

    The Oracle database is:

    Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production

    I made 3 versions of the initdg4odbc.ora and they all look the same:

    # This is an example of initialization file of the agent that contains the HS settings

    # necessary for the database to ODBC gateway

    #

    # HS init parameters

    #

    HS_FDS_CONNECT_INFO = MOFIBOx (MOFIBO2, MOFIBO3 and MOFIBO4)

    HS_FDS_TRACE_LEVEL = off

    #

    # Required for the non-Oracle system environment variables

    #

    #set < varenv > = < value >

    My lisener.ora look like this:

    listener.ora # Network Configuration file: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora

    # Generated by Oracle configuration tools.

    LISTENER =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = RESP-ora01)(PORT = 1521))

    )

    SID_LIST_LISTENER =

    (SID_LIST =

    (SID_DESC =

    (SID_NAME = PLSExtProc)

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (= Extproc PROGRAM)

    )

    (SID_DESC =

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (SID_NAME = RESPTEST)

    )

    (SID_DESC =

    (SID_NAME = MOFIBO2)

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (PROGRAM = dg4odbc)

    )

    (SID_DESC =

    (SID_NAME = MOFIBO3)

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (PROGRAM = dg4odbc)

    )

    (SID_DESC =

    (SID_NAME = MOFIBO4)

    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)

    (PROGRAM = dg4odbc)

    )

    )

    ADR_BASE_LISTENER = C:\app\Administrator\product\11.2.0\dbhome_1\log

    And my share of tnsnames.ora mofibo then look like this (I did three variants as different "manual" using different methods):

    MOFIBO2 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521))

    (CONNECT_DATA =

    (SID = MOFIBO2)

    )

    (HS = OK)

    )

    MOFIBO3 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SID_NAME = MOFIBO3)

    )

    (HS = OK)

    )

    MOFIBO4 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = MOFIBO4)

    )

    (HS = OK)

    )

    When tnsping to all three versions I get this:

    C:\users\administrator > tnsping mofibo2

    AMT Ping Utility for 64-bit Windows: Version 11.2.0.3.0 - Production on April 24, 2014 12:48:17

    Copyright (c) 1997, 2011, Oracle.  All rights reserved.

    Use settings files:

    C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

    TNSNAMES adapter used to resolve the alias

    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521)) (CONNECT_DATA = (SID = MOFIBO2)))

    HS = OK))

    OK (10 ms)

    C:\users\administrator > tnsping mofibo3

    AMT Ping Utility for 64-bit Windows: Version 11.2.0.3.0 - Production on April 24, 2014 12:48:23

    Copyright (c) 1997, 2011, Oracle.  All rights reserved.

    Use settings files:

    C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

    TNSNAMES adapter used to resolve the alias

    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521)) (CONNECT_DATA = (SERVER = DELTOMBE

    (RELATED) (SID_NAME = MOFIBO3)) (HS = OK))

    OK (10 ms)

    C:\users\administrator > tnsping mofibo4

    AMT Ping Utility for 64-bit Windows: Version 11.2.0.3.0 - Production on April 24, 2014 12:48:27

    Copyright (c) 1997, 2011, Oracle.  All rights reserved.

    Use settings files:

    C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

    TNSNAMES adapter used to resolve the alias

    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = resp-ora02)(PORT=1521)) (CONNECT_DATA = (SERVER = DELTOMBE

    (RELATED) (SERVICE_NAME = MOFIBO4)) (HS = OK))

    OK (0 msec)


    I created three database link with then in following (user name and password was in the wright case):

    create database MOFIBODB2 link to connect to the "username <>' identified by"password <>"with"MOFIBO2 ";

    create database MOFIBODB3 link to connect to the "username <>' identified by"password <>"with"MOFIBO3 ";

    create database MOFIBODB4 link to connect to the "username <>' identified by"password <>"with"MOFIBO4 ";


    When I tried to select from a table (select * from clients @ < DATABASELINKHERE >) I get errors (replace MOFIBO2 with MOFIBO3/4 and the same error occurs):

    SQL > select * from customers@MOFIBODB2;

    Select * from customers@MOFIBODB2

    *

    ERROR on line 1:

    ORA-28545: error diagnosed by Net8 when connecting to an agent

    Cannot retrieve the text of the message NETWORK/NCR 65535

    ORA-02063: preceding 2 lines of MOFIBODB2


    What was my mistake?


    Hello

    In the listener.ora, you have the host as -

    (HOST = RESP-ora01)

    but in tnsnames.ora entries you have.

    (HOST = RESP-ouA02)

    The tnsnames.ora host must be the same as the host of the listener.

    Unless you have a listener running on the RESP-ouA02 it is not clear why the tnsping returns a result.

    Change the host in the tnsnames.ora and let us know what happens.

    Kind regards

    Mike

  • ORA-00221: error on write in the control file

    Experts,

    Recently, I have been unable to connect to the console em12c and after reviewing the State of who, I got to know that my instance of database crashed.

    Status of the WHO

    . / emctl status SGD

    Oracle Enterprise Manager Cloud control 12 c Release 2

    Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.

    WebTier is in place

    Oracle Management Server does not work for the following reason:

    Unable to connect to the repository database. SGD will be automatically restarted once he identifies database and the listener are on the rise.

    I connected and checked the alert log which was below error e/s on the controlfile. I'm afraid to say that my control files are multiplexed not and I don't have a valid backup of controlfile.

    alert_log

    Errors in the /u01/app/oracle/diag/rdbms/trcoem/TRCOEM/trace/TRCOEM_lgwr_25655.trc file:

    ORA-00345: redo log write error block 39818 County 15

    ORA-00312: thread 1 1 online journal: ' / u01/app/oracle/oradata/TRCOEM/redo01.log'

    ORA-27072: IO file error

    Linux-x86_64 error: 5: input/output error

    Additional information: 4

    Additional information: 39818

    Additional information:-1

    Kill Jan 28 11:34:57 2014

    Errors in the /u01/app/oracle/diag/rdbms/trcoem/TRCOEM/trace/TRCOEM_ckpt_25659.trc file:

    ORA-00206: error in writing (block 3, block # 1) of the control file

    ORA-00202: control file: ' / u01/app/oracle/oradata/TRCOEM/control01.ctl'

    ORA-27072: IO file error

    Linux-x86_64 error: 5: input/output error

    Additional information: 4

    Additional information: 3

    Additional information:-1

    Errors in the /u01/app/oracle/diag/rdbms/trcoem/TRCOEM/trace/TRCOEM_ckpt_25659.trc file:

    ORA-00221: error about writing about a control file

    ORA-00206: error in writing (block 3, block # 1) of the control file

    ORA-00202: control file: ' / u01/app/oracle/oradata/TRCOEM/control01.ctl'

    ORA-27072: IO file error

    Linux-x86_64 error: 5: input/output error

    Additional information: 4

    Additional information: 3

    Additional information:-1

    Kill Jan 28 11:34:57 2014

    CKPT (ospid: 25659): put an end to litigation because of the error 221

    Please help me what should be the solution to fix this error. Is this just a mistake of e/s on the controlfile, or do I have a disk failure?

    var http://www.filedropper.com/messages

    Version of the OS: RHEL 5 (64-bit)

    Database Version: 11.2.0.3 (64-bit)

    Thank you

    Fran,

    Syslog does not display the IO error.

    I followed the steps below to solve the problem.

    1] stop the database

    [2] restore control01.dbf to the backup location.

    [3] mount the database
    [4] recover database until cancel

    [5] Alter database open resetlogs.

    Also, takes a full cold of RMAN backup of the database, the multiplex control files and recovery logs.

  • ORA-29913: error in executing ODCIEXTTABLEFETCH legend

    Hello

    I get an error when you run queries against a view.
    SQL > select count (*) in the TOOL_ADMIN. DATABASE_STATS;.

    ERROR on line 1:
    ORA-29913: error in executing ODCIEXTTABLEFETCH legend
    ORA-30653: reject limit reached
    ORA-06512: at "SYS." ORACLE_LOADER', line 52

    SQL > select MASTER, object_name, object_type, status, CREATED from object where object_name like UPPER ('Database_Stats');

    OWNER OBJECT_NAME OBJECT_TYPE STATUS CREATED
    ------------------------------ ------------------------------ ------------------- ------- ---------
    TOOL_ADMIN DATABASE_STATS VIEW VALID MARCH 9, 10


    Could you please share your experiences on this subject?

    Kind regards
    VN

    Based on the view of the error messages. TOOL_ADMIN done DATABASE_STATS refers to an external table. This means that whenever you select in the view that oracle bed associated with external table file is loading based on the external table definition. And this time the number of records in the file not following the external table definition exceeds the limit of rejection of external table. Check the definition of the view. Determinte log, bad and throw the files and examine them to see records or reasons were rejected.

    SY.

  • ORA-20100: error: failure FND_FILE. Cannot create the file

    Hi all
    Simultaneous application of Bellow error

    We using ORACLE 10 g. R12
    OS: RHEL 4.4 (LINUX)





    ---------------------------------------------------------------------------
    Execution of the expedition: Version: 12.0.0

    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.

    Module WSHINTERFACES: Interface travel Stop - SRS
    ---------------------------------------------------------------------------

    Current system time is January 27, 2013 09:58:58

    ---------------------------------------------------------------------------

    * Starts * January 27, 2013 09:58:58
    Error ORACLE 20100 in FDPSTP

    Cause: FDPSTP failed due to the ORA-20100: error: failure FND_FILE. Cannot create the file, l0633393.tmp in the directory/usr/tmp.
    You can find more information in the applications log.
    ORA-06512: at the 'APPS '. FND_FILE', line 554
    ORA-06
    ---------------------------------------------------------------------------
    Beginning of the FND_FILE log messages
    ---------------------------------------------------------------------------
    ---------------------------------------------------------------------------
    End of the FND_FILE log messages
    ---------------------------------------------------------------------------


    ---------------------------------------------------------------------------
    Options, AutoComplete, the request for enforcement.


    End of query options AutoComplete.

    ---------------------------------------------------------------------------
    Simultaneous request ended
    Current system time is January 27, 2013 09:58:58

    ---------------------------------------------------------------------------

    This issue is related to the Oracle EBS, mark it as here the answer and open it

    Oracle Discussion forums' E-Business Suite

  • InPlace schema evolution error: ORA-31166: error code internal etc...

    Hello

    I have a table in which I will be storing an XMLTYPE column based on an XML schema. I use the following version of the database:
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 23 18:20:12 2012
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Now, when I run my test InPlace Schema Evolution, I get the following error message:

    < font color = "red" >
    ORA-31166: internal error code to handle ignorable attributes
    < / make >

    I built a re-producable case of test for the purpose of this post on the forum. For starters, I have a database scheme grants the following privileges:
    DIRECTLY GRANTED SYSTEM PRIVS
    =============================
    CREATE TRIGGER
    ALTER SESSION
    CREATE TABLE
    
    EXECUTE PRIVS (SYS-OWNED PACKAGES)
    =============
    EXECUTE ON DBMS_XMLSCHEMA
    
    ROLES GRANTED
    =============
    CONNECT
    DATA_ROLE
    
    DATA_ROLE DDL
    =============
    create role DATA_ROLE not identified;
    grant create database link to DATA_ROLE;
    GRANT CREATE MATERIALIZED VIEW TO DATA_ROLE;
    grant create procedure to DATA_ROLE;
    grant create sequence to DATA_ROLE;
    GRANT CREATE SYNONYM TO DATA_ROLE;
    grant create table to DATA_ROLE with admin option;
    grant create trigger to DATA_ROLE;
    grant create view to DATA_ROLE;
    grant select any dictionary to DATA_ROLE;
    All other scripts are run as the database schema. For the purposes of clarity, let's call the {*} TEST_DB_SCHEMA {*}. I follow the steps below in this scheme:

    H3. 1. run this PL/SQL script to record the Version 1 of my XML schema:
    PROMPT -------------------------------;
    PROMPT INITIAL XML SCHEMA REGISTRATION;
    PROMPT -------------------------------;
    
    SET SERVEROUTPUT ON
    SET FEEDBACK OFF
    
    DECLARE
       l_xsd_url_con CONSTANT VARCHAR2(60) := 'http://home/xsd/test_binXML_v1.xsd';
       
       l_xml_schema VARCHAR2(32767);
       
       E_XSD_ALREADY_REGISTERED EXCEPTION;
       PRAGMA EXCEPTION_INIT(E_XSD_ALREADY_REGISTERED, -31085);
    BEGIN
       l_xml_schema :=
          '<xs:schema'||CHR(10)||
          'xmlns:xs="http://www.w3.org/2001/XMLSchema"'||CHR(10)||
          'xmlns:xdb="http://xmlns.oracle.com/xdb"'||CHR(10)||
          'version="1.0"'||CHR(10)||
          'xdb:storeVarrayAsTable = "true">'||CHR(10)||
          ' <xs:element name="TransactionBatch" type="TransactionBatchType" xdb:defaultTable="XSD_TEST_BATCH_BINXML1"/>'||CHR(10)||
          ' <xs:complexType name="TransactionBatchType">'||CHR(10)||
          '  <xs:sequence>'||CHR(10)||
          '   <xs:element name="Transaction" type="TransactionType" minOccurs="1" maxOccurs="unbounded" xdb:defaultTable="XSD_TEST_TRANSACTION_BINXML1"/>'||CHR(10)||
          '  </xs:sequence>'||CHR(10)||
          ' </xs:complexType>'||CHR(10)||
          ' <xs:complexType name="TransactionType">'||CHR(10)||
          '  <xs:sequence>'||CHR(10)||
          '   <xs:element name="Portal" type="PortalType" minOccurs="1" maxOccurs="1" />'||CHR(10)||
          '   <xs:element name="CustomerId" type="CustomerIdType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '   <xs:element name="TransactionQuantity" type="TransactionQuantityType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '   <xs:element name="AppTransactionId" type="AppTransactionIdType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '   <xs:element name="TransactionDetails" type="TransactionDetailType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '   <xs:element name="Username" type="UsernameType" minOccurs="1" maxOccurs="1" />'||CHR(10)||
          '  </xs:sequence>'||CHR(10)||
          ' </xs:complexType>'||CHR(10)||
          ' <xs:simpleType name="PortalType">'||CHR(10)||
          '  <xs:restriction base="xs:string">'||CHR(10)||
          '   <xs:minLength value="1"/>'||CHR(10)||
          '   <xs:maxLength value="30"/>'||CHR(10)||
          '   <xs:enumeration value="TEST1"/>'||CHR(10)||
          '   <xs:enumeration value="TEST2"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="CustomerIdType">'||CHR(10)||
          '  <xs:restriction base="xs:string"/>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="TransactionQuantityType">'||CHR(10)||
          '  <xs:restriction base="xs:integer">'||CHR(10)||
          '   <xs:minExclusive value="0"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="AppTransactionIdType">'||CHR(10)||
          '  <xs:restriction base="xs:string">'||CHR(10)||
          '   <xs:minLength value="1"/>'||CHR(10)||
          '   <xs:maxLength value="20"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="TransactionDetailType">'||CHR(10)||
          '  <xs:restriction base="xs:string">'||CHR(10)||
          '   <xs:minLength value="1"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="UsernameType">'||CHR(10)||
          '  <xs:restriction base="xs:string">'||CHR(10)||
          '   <xs:minLength value="1"/>'||CHR(10)||
          '   <xs:maxLength value="30"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          '</xs:schema>';
       
       DBMS_XMLSCHEMA.REGISTERSCHEMA(
          schemaurl       => l_xsd_url_con,
          schemadoc       => l_xml_schema,
          local           => TRUE,                             -- XSD must only be visible to the Owner DB Schema in which this script is run.
          genTypes        => FALSE,                            -- Don't want to generate object types, as we're using Binary XML.
          force           => FALSE,                            -- Raise all errors on creation
          owner           => USER,                             -- XML Schema will belong to the currently executing user.
          options         => DBMS_XMLSCHEMA.REGISTER_BINARYXML -- We wish to register the XSD as Binary XML.
       );
       
    EXCEPTION
       WHEN E_XSD_ALREADY_REGISTERED
       THEN
          DBMS_OUTPUT.PUT_LINE('XML Schema '||l_xsd_url_con||' is already registered.');
          
    END;
    /
    
    SET FEEDBACK ON
    H3. 2. create a bunch of Table with an XMLTYPE column based on version 1 of my XML schema:
    PROMPT ----------------------;
    PROMPT ONE-OFF DDL STATEMENTS;
    PROMPT ----------------------;
    
    DROP TABLE test_batch;
    DROP SEQUENCE seq_test_batch_id;
    
    CREATE TABLE test_batch
    (
       batch_id        NUMBER(20),
       batch_timestamp TIMESTAMP   DEFAULT SYSTIMESTAMP,
       batch_xml       XMLTYPE,
       CONSTRAINT tbh_batch_id_nn        CHECK(batch_id IS NOT NULL),
       CONSTRAINT tbh_batch_timestamp_nn CHECK(batch_timestamp IS NOT NULL),
       CONSTRAINT tbh_batch_xml_nn       CHECK(batch_xml IS NOT NULL)
    )
    XMLTYPE COLUMN batch_xml STORE AS SECUREFILE BINARY XML
    XMLSCHEMA "http://home/xsd/test_binXML_v1.xsd"
    ELEMENT "TransactionBatch"
    PARTITION BY RANGE(batch_timestamp)
    INTERVAL (NUMTOYMINTERVAL(1, 'MONTH'))
    (
       PARTITION P_TEST_BATCH_201208 VALUES LESS THAN (TO_DATE('01-SEP-2012', 'DD-MON-YYYY')) TABLESPACE &&TABLSPACE_OF_YOUR_CHOICE
    );
    
    CREATE UNIQUE INDEX idx_tbh_batch_id ON test_batch(batch_id)
    TABLESPACE TXTREME_IDX_XLG;
    
    ALTER TABLE test_batch
       ADD CONSTRAINT tbh_batch_id_pk PRIMARY KEY (batch_id) USING INDEX idx_tbh_batch_id;
    
    CREATE SEQUENCE seq_test_batch_id
    START WITH 1
    INCREMENT BY 1
    MAXVALUE 99999999999999999999
    CYCLE
    NOCACHE
    NOORDER;
    H3. 3. fill this table with the test data.
    PROMPT --------------------------;
    PROMPT CREATING INITIAL TEST DATA;
    PROMPT --------------------------;
    
    TRUNCATE TABLE TEST_BATCH;
    
    SET TIMING ON
    DECLARE
       l_batch_count_con CONSTANT NUMBER(4) := 200;
       
       l_transaction_count   PLS_INTEGER;
       l_total_transactions  PLS_INTEGER DEFAULT 0;
       l_transaction_xmlclob CLOB;
       l_transaction_xmldoc  XMLTYPE;
    BEGIN
       FOR idx IN 1..l_batch_count_con
       LOOP
          l_transaction_count := TRUNC(DBMS_RANDOM.VALUE(1,100));
          
          -- Initialise XML CLOB String. 
          l_transaction_xmlclob := '<?xml version="1.0"?>'||CHR(10)||'<TransactionBatch>';
          
          -- Insert the contents of the XML CLOB String.
          FOR idx IN 1 .. l_transaction_count
          LOOP
             l_transaction_xmlclob := l_transaction_xmlclob||CHR(10)||
                                      '  <Transaction>'||CHR(10)||
                                      '    <Portal>TEST1</Portal>'||CHR(10)||
                                      '    <CustomerId>1234567891</CustomerId>'||CHR(10)||
                                      '    <TransactionQuantity>4</TransactionQuantity>'||CHR(10)||
                                      '    <AppTransactionId>1232K89C</AppTransactionId>'||CHR(10)||
                                      '    <TransactionDetails>This is another long free text field</TransactionDetails>'||
                                      '    <Username>Jimbo2</Username>'||CHR(10)||
                                      '  </Transaction>';
          END LOOP;
          
          --Terminate XML CLOB String.
          l_transaction_xmlclob := l_transaction_xmlclob||CHR(10)||'</TransactionBatch>';
          
          -- Create XMLTYPE XML Document.
          l_transaction_xmldoc := XMLTYPE.createXML(l_transaction_xmlclob);
          
          -- Populate the TEST_BATCH Table.
          INSERT INTO test_batch
            ( batch_id,
              batch_timestamp,
              batch_xml
            )
          VALUES
            ( SEQ_TEST_BATCH_ID.NEXTVAL,
              SYSTIMESTAMP,
              l_transaction_xmldoc
            );
            
          l_total_transactions := l_total_transactions + l_transaction_count;
       END LOOP;
       
       DBMS_OUTPUT.PUT_LINE('Inserted a total of '||l_total_transactions||' transaction XML pieces across '||l_batch_count_con||' Test Batches.');
       COMMIT;
       DBMS_OUTPUT.PUT_LINE('Commit complete.');
    END;
    /
    
    SET TIMING OFF
    H3. 4. save the Version 2 of my XML schema
    PROMPT -----------------------------------------------------------------------------------;
    PROMPT NEW XML SCHEMA REGISTRATION - IDENTICAL TO OLD SCHEMA EXCEPT FOR NEW <Test> ELEMENT;
    PROMPT -----------------------------------------------------------------------------------;
    
    SET FEEDBACK OFF
    
    DECLARE
       l_xsd_url_con CONSTANT VARCHAR2(60) := 'http://home/xsd/test_binXML_v2.xsd';
       
       l_xml_schema VARCHAR2(32767);
       
       E_XSD_ALREADY_REGISTERED EXCEPTION;
       PRAGMA EXCEPTION_INIT(E_XSD_ALREADY_REGISTERED, -31085);
    BEGIN
       l_xml_schema :=
          '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="true">'||CHR(10)||
          '<xs:element name="TransactionBatch" type="TransactionBatchType" xdb:defaultTable="XSD_TEST_BATCH_BINXML2"/>'||CHR(10)||
          '<xs:complexType name="TransactionBatchType">'||CHR(10)||
          ' <xs:sequence>'||CHR(10)||
          '  <xs:element name="Transaction" type="TransactionType" minOccurs="1" maxOccurs="unbounded" xdb:defaultTable="XSD_TEST_TRANSACTION_BINXML2"/>'||CHR(10)||
          ' </xs:sequence>'||CHR(10)||
          '</xs:complexType>'||CHR(10)||
          '<xs:complexType name="TransactionType">'||CHR(10)||
          ' <xs:sequence>'||CHR(10)||
          '  <xs:element name="Portal" type="PortalType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="CustomerId" type="CustomerIdType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="TransactionQuantity" type="TransactionQuantityType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="AppTransactionId" type="AppTransactionIdType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="TransactionDetails" type="TransactionDetailType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="Username" type="UsernameType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="Test" type="TestType" minOccurs="0" maxOccurs="1"/>'||CHR(10)||
          ' </xs:sequence>'||CHR(10)||
          '</xs:complexType>'||CHR(10)||
          '<xs:simpleType name="PortalType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          '  <xs:maxLength value="30"/>'||CHR(10)||
          '  <xs:enumeration value="TEST1"/>'||CHR(10)||
          '  <xs:enumeration value="TEST2"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="CustomerIdType">'||CHR(10)||
          ' <xs:restriction base="xs:string"/>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="TransactionQuantityType">'||CHR(10)||
          ' <xs:restriction base="xs:integer">'||CHR(10)||
          '  <xs:minExclusive value="0"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="AppTransactionIdType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          '  <xs:maxLength value="20"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="TransactionDetailType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="UsernameType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          '  <xs:maxLength value="30"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="TestType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          '  <xs:maxLength value="30"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '</xs:schema>';
       
       DBMS_XMLSCHEMA.REGISTERSCHEMA(
          schemaurl       => l_xsd_url_con,
          schemadoc       => l_xml_schema,
          local           => TRUE,                             -- XSD must only be visible to the Owner DB Schema in which this script is run.
          genTypes        => FALSE,                            -- Don't want to generate object types, as we're using Binary XML.
          force           => FALSE,                            -- Raise all errors on creation
          owner           => USER,                             -- XML Schema will belong to the currently executing user.
          options         => DBMS_XMLSCHEMA.REGISTER_BINARYXML -- We wish to register the XSD as Binary XML.
       );
       
    EXCEPTION
       WHEN E_XSD_ALREADY_REGISTERED
       THEN
          DBMS_OUTPUT.PUT_LINE('XML Schema '||l_xsd_url_con||' is already registered.');
          
    END;
    /
    
    SET FEEDBACK ON
    H3. 5 test to insert a new XML document in line with the second XML schema. This test fails as expected.
    PROMPT ---------------------------------------------------------------;
    PROMPT ATTEMPT TO INSERT V2 XSD-COMPLIANT XMLDOC INTO TEST_BATCH TABLE;
    PROMPT ---------------------------------------------------------------;
    
    DECLARE
       l_transaction_xmldoc XMLTYPE;
       
       E_XSD_VALIDATION_FAILURE EXCEPTION;
       PRAGMA EXCEPTION_INIT(E_XSD_VALIDATION_FAILURE, -31061);
    BEGIN
       l_transaction_xmldoc := XMLTYPE.createXML(
                                  '<?xml version="1.0" encoding="UTF-8"?>'||CHR(10)||
                                  '<TransactionBatch>'||CHR(10)||
                                  '  <Transaction>'||CHR(10)||
                                  '    <Portal>CARMAN</Portal>'||CHR(10)||
                                  '    <CustomerId>1234567891</CustomerId>'||CHR(10)||
                                  '    <TransactionQuantity>4</TransactionQuantity>'||CHR(10)||
                                  '    <AppTransactionId>1232K89C</AppTransactionId>'||CHR(10)||
                                  '    <TransactionDetails>This is a long free text field</TransactionDetails>'||CHR(10)||
                                  '    <Username>Jimbo2</Username>'||CHR(10)||
                                  '    <Test>This is an In-Place Schema Evolution Test</Test>'||CHR(10)||
                                  '  </Transaction>'||CHR(10)||
                                  '</TransactionBatch>'
                               );
       
       -- Attempt to populate the SUBMISSION_BATCH Table.
       INSERT INTO submission_batch
         ( batch_id,
           batch_timestamp,
           batch_xml
         )
       VALUES
         ( SEQ_SUB_BATCH_ID.NEXTVAL,
           SYSTIMESTAMP,
           l_transaction_xmldoc
         );
       
       DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT||' row inserted.');
       COMMIT;
       DBMS_OUTPUT.PUT_LINE('Commit complete.');
    
    EXCEPTION
       WHEN E_XSD_VALIDATION_FAILURE
       THEN
          DBMS_OUTPUT.PUT_LINE('Insert failed as expected.'||CHR(10));
          DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    /
    H3. 6. try Inplace development of Version 1 of the XML schema in Version 2.
    PROMPT --------------------------------------------------------------------------------------;
    PROMPT PERFORM IN-PLACE EVOLUTION AND DE-REGISTER/PURGE OLD SCHEMA IF EVOLUTION IS SUCCESSFUL;
    PROMPT --------------------------------------------------------------------------------------;
    
    SET TIMING ON
    
    DECLARE
       l_current_schema   XMLTYPE;
       l_new_schema       XMLTYPE;
       l_xsd_differences  XMLTYPE;
       
       l_resource         BOOLEAN;
    BEGIN
       SELECT schema
         INTO l_current_schema
         FROM user_xml_schemas
        WHERE schema_url = 'http://home/xsd/test_binXML_v1.xsd';
       
       SELECT schema
         INTO l_new_schema
         FROM user_xml_schemas
        WHERE schema_url = 'http://home/xsd/test_binXML_v2.xsd';
       
       SELECT XMLDIFF(l_current_schema, l_new_schema)
         INTO l_xsd_differences
         FROM dual;
       
       DBMS_OUTPUT.PUT_LINE('Successfully extrapolated XDIFF XML Document.');
       
       DBMS_XMLSCHEMA.inPlaceEvolve( 'http://home/xsd/test_binXML_v1.xsd',
                                     l_xsd_differences,
                                     DBMS_XMLSCHEMA.INPLACE_TRACE
                                   );
       
       DBMS_OUTPUT.PUT_LINE('Successfully evolved original XML Schema.');
       
    EXCEPTION
       WHEN OTHERS
       THEN
          ROLLBACK;
          DBMS_OUTPUT.PUT_LINE('Error issued during InPlace XML Schema Evolution:');
          DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    /
    H3. The scripts above provide the following Test output:
    Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 
    Connected as TEST_DB_SCHEMA@dbs02local
     
    SQL> 
    -------------------------------
    INITIAL XML SCHEMA REGISTRATION
    -------------------------------
     
    XML Schema http://home/xsd/test_binXML_v1.xsd is already registered.
     
    Executed in 0 seconds
    
    ----------------------
    ONE-OFF DDL STATEMENTS
    ----------------------
      
    Table created
     
    Executed in 0.016 seconds
     
    Index created
     
    Executed in 0.016 seconds
     
    Table altered
     
    Executed in 0 seconds
     
    Sequence created
     
    Executed in 0 seconds
    
    --------------------------
    CREATING INITIAL TEST DATA
    --------------------------
     
    Table truncated
     
    Executed in 0.032 seconds
    
    Inserted a total of 10259 transaction XML pieces across 200 Test Batches.
    Commit complete.
     
    PL/SQL procedure successfully completed
     
    Executed in 8.487 seconds
    
    -----------------------------------------------------------------------------------
    NEW XML SCHEMA REGISTRATION - IDENTICAL TO OLD SCHEMA EXCEPT FOR NEW <Test> ELEMENT
    -----------------------------------------------------------------------------------
     
    XML Schema http://home/xsd/test_binXML_v2.xsd is already registered.
    
    ---------------------------------------------------------------
    ATTEMPT TO INSERT V2 XSD-COMPLIANT XMLDOC INTO TEST_BATCH TABLE
    ---------------------------------------------------------------
     
    Insert failed as expected.
    
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00213: only 0 occurrences of particle "Transaction", minimum is 1
     
    PL/SQL procedure successfully completed
     
    --------------------------------------------------------------------------------------
    PERFORM IN-PLACE EVOLUTION AND DE-REGISTER/PURGE OLD SCHEMA IF EVOLUTION IS SUCCESSFUL
    --------------------------------------------------------------------------------------
     
    Successfully extrapolated XDIFF XML Document.
    Error issued during InPlace XML Schema Evolution:
    ORA-31166: internal error code to handle ignorable attributes
     
    PL/SQL procedure successfully completed
     
    Executed in 0.046 seconds
    SQL> 
    NOTE: When I ran the above tests, I had already created the test of XML schemas. That's why the output messages, say...

    H4. Now, as it is the first time I've ever tried evolution of XML schema in Oracle XMLDB, is there someone who could potentially open the door please, re. solve the < font color = "red" >ORA-31166< / police > error?

    Hello

    First of all, thank you for your efforts on the provision of a decent test case.

    However, there are a few inconsistencies:

    -Step 5 attempts to insert into SUBMISSION_BATCH, but the table created above is TEST_BATCH
    -Same for the sequence name

    Now back to the real question...

    I think the problem comes because you run XMLDiff against two versions saved of your drawings.
    When Oracle stores a schema, it adds a large number of attributes for internal use (you can see them by querying USER_XML_SCHEMAS. DIAGRAM) but we as end users don't have to worry about them.
    However, by building the Xdiff document based on these two 'internal' versions, we explicitly say Oracle whose internal attributes must be changed during the evolution of the scheme, leading to potential conflicts.

    A few other comments:
    -Given that you're using the binary XML schema, you must also set "genTables-online false" and more "genTypes-online false."
    -Also delete all annotations from xdb:defaultTable and xdb:storeVarrayAsTable on the diagrams, they are of no use in this situation.
    -Do not save the schema of the v2, it is not necessary. Just use a transient instance when calling XMLDiff

    So, to summarize:

    -XMLDiff run against both original patterns (do not save a new in any case, the process of evolution will take care of replacing the old).
    -of course, don't forget to change the INPLACE_TRACE to INPLACE_EVOLVE when ready :)

    Hope that helps.

    Published by: odie_63 on August 23, 2012 16:31 - fixed some typos

  • FDPSTP failed due to the ORA-20100: error: failure FND_FILE. Cannot create the f

    Hi all

    It seems that I added a thread after another today. I have problems using FND_FILE in the simultaneous program (R12 on W2K2). I tried to google for a solution, but nothing has worked for me. Here is the error message:

    Error ORACLE 20100 in FDPSTP

    Cause: FDPSTP failed due to the ORA-20100: error: failure FND_FILE. Failed to create the file, o2053488.tmp in the c:\temp directory.
    You can find more information in the applications log.
    ORA-06512: at the 'APPS '. FND_FILE', line 417
    ORA-065

    $APPLTMP is set to j:\oracle\VIS\inst\apps\VIS_eviasl\appltmp
    $APPLPTMP is set to j:\temp
    UTL_FILE_DIR is defined as:

    VALUE OF TYPE NAME
    ------------------------------------ ----------- ------------------------------
    UTL_FILE_DIR string j:\temp, j:\oracle\VIS\db\tech
    _st\11.1.0\plsql\temp, j:\orac
    le\VIS\db\tech_st\11.1.0\appsu
    til\outbound\VIS_eviasl

    but I still get the message that he seeks in c:\temp.

    Concerning
    Piotr

    Cause: FDPSTP failed due to the ORA-20100: error: failure FND_FILE. Failed to create the file, o2053488.tmp in the c:\temp directory.
    You can find more information in the applications log.
    ORA-06512: at the 'APPS '. FND_FILE', line 417

    Please see old threads that deal with the same subject - http://forums.oracle.com/forums/search.jspa?threadID=&q=ORA-20100&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001

    Thank you
    Hussein

Maybe you are looking for

  • The two operating systems fails on the Satellite A200 - 220 (PSAE3E)

    I have a very irritating problem on my laptop... I installed Windows 7 Professional x 86 on my laptop and the latest Ubuntu 9.10, and the computer crashes all the time.The original operating system was Windows Vista Home edition.The computer is 1 and

  • HP Officejet Pro e-all-in-8610: determination of applicability of the critical Security Bulletins

    How can I determine if a "support alert" applies to the HP Officejet Pro 8610 e-all-in-one printer I own?  Since the purchase and registration it two months ago (March 2015), I received two "Support alerts.  How will I know if they apply in fact to m

  • simulate the track access control with labview

    Hello I want to simulate a track with labview access control. This is the procedure: vehicle is located in front of a door, antenna check access control, if that's ok the traffic light turns green and the gate of the student. I thank very you much fo

  • using c309g with Windows7

    I recently updated my old Toshiba laptop for a HP Pavilion DV7.  I can't the printer I had (C309g) to allow me to scan from it.  After spending nearly 3 hours with Best Buy, their conclusion is that the C309g has been programmed to work with Windows

  • Star wars Knights of the old Republic crashing on windows xp

    When I open Star wars Knights of the old Republic of his fine, but after I create a character and press play it freezes when I'm just able to see the droid.im using a toshiba driver and I don't think it's the latter. Help me please.