NCHAR in Oracle 9i

Hi,
I'm using Oracle 9i and implementing internationalization for my application. On the oracle site, it says that Oracle 9i supports NCHAR which is an unicode datatype exclusively. But i found that VARCHAR2 also stores unicode characters perfectly.
Q: So why do we use NCHAR datatypes?
It also says that we do not need to change the Database Character Set. We just need to make the National Character Set equal to UTF8 or AL16UTF16 and add the column NCHAR datatype to store unicode in a non-unicode database.
But i tried this :
Database Character Set: WE8MSWIN1252
National Character Set: AL16UTF16 (default)
and i still cant store my unicode.
Please advise. Thanks

Perhaps this information is going to clear in better
way your question:
NCHAR
You use the NCHAR datatype to store fixed-length (blank-padded if necessary) national character data. How the data is represented internally depends on the national character set specified when the database was created, which might use a variable-width encoding (UTF8) or a fixed-width encoding (AL16UTF16). Because this type can always accommodate multibyte characters, you can use it to hold any Unicode character data.
The NCHAR datatype takes an optional parameter that lets you specify a maximum size in characters. The syntax follows:
NCHAR[(maximum_size)]
Because the physical limit is 32767 bytes, the maximum value you can specify for the length is 32767/2 in the AL16UTF16 encoding, and 32767/3 in the UTF8 encoding.
You cannot use a symbolic constant or variable to specify the maximum size; you must use an integer literal.
If you do not specify a maximum size, it defaults to 1. The value always represents the number of characters, unlike CHAR which can be specified in either characters or bytes.
my_string NCHAR(100); -- maximum size is 100 characters
The maximum width of an NCHAR database column is 2000 bytes. So, you cannot insert NCHAR values longer than 2000 bytes into an NCHAR column.
If the NCHAR value is shorter than the defined width of the NCHAR column, Oracle blank-pads the value to the defined width.
You can interchange CHAR and NCHAR values in statements and expressions. It is always safe to turn a CHAR value into an NCHAR value, but turning an NCHAR value into a CHAR value might cause data loss if the character set for the CHAR value cannot represent all the characters in the NCHAR value. Such data loss can result in characters that usually look like question marks (?).
NVARCHAR2
You use the NVARCHAR2 datatype to store variable-length Unicode character data. How the data is represented internally depends on the national character set specified when the database was created, which might use a variable-width encoding (UTF8) or a fixed-width encoding (AL16UTF16). Because this type can always accommodate multibyte characters, you can use it to hold any Unicode character data.
The NVARCHAR2 datatype takes a required parameter that specifies a maximum size in characters. The syntax follows:
NVARCHAR2(maximum_size)
Because the physical limit is 32767 bytes, the maximum value you can specify for the length is 32767/2 in the AL16UTF16 encoding, and 32767/3 in the UTF8 encoding.
You cannot use a symbolic constant or variable to specify the maximum size; you must use an integer literal.
The maximum size always represents the number of characters, unlike VARCHAR2 which can be specified in either characters or bytes.
my_string NVARCHAR2(200); -- maximum size is 200 characters
The maximum width of a NVARCHAR2 database column is 4000 bytes. Therefore, you cannot insert NVARCHAR2 values longer than 4000 bytes into a NVARCHAR2 column.
You can interchange VARCHAR2 and NVARCHAR2 values in statements and expressions. It is always safe to turn a VARCHAR2 value into an NVARCHAR2 value, but turning an NVARCHAR2 value into a VARCHAR2 value might cause data loss if the character set for the VARCHAR2 value cannot represent all the characters in the NVARCHAR2 value. Such data loss can result in characters that usually look like question marks (?).
Joel P�rez

Similar Messages

  • Unicode data in non-utf8 oracle 8.1.7

    Hi,
    I have to migrate unicode data from a UTF-8 Oracle 9.0.2 database to non-utf8 oracle 8.1.7. The tables are small and I am reading and writing into the database using java code.The column which contained the unicode data have been made nchar in oracle 8.1.7.
    When I try to insert the data,I get the error:
    java.sql.SQLException: ORA-12704: character set mismatch
    Can I have unicode data stored in nchar columns in a non-utf8 database?
    Is there any documentation available on the same?
    Thanks,
    Shipra

    Check out the Oracle Unicode Database Support paper on OTN - http://technet.oracle.com/tech/globalization/content.html
    Basically NCHAR prior to Oracle9i can not be Unicode. If you need to store Unicode data in 8.1.7, you need to use UTF8 as the database character set.
    Nat

  • International storage

    Hello,
    I had store the chinese character using
    nvarchar2 in Oracle9i using UTF-16 encoding
    (NLS_NCHAR_CHARACTERSET = AL16UTF16 )
    The problem is how i can i read the
    chinese character using SQLPlus or iSQLPlus ?
    When i select the field, it display "???"
    I had try to set nls_language = "Chinese Traditional"
    and using convert(zh,"AL16UTF16","UTF8") in SQL
    but no use ...
    Thx
    Kenny Mak

    Mak,
    You need to use the setFormofUSe in order for your data to get loaded correctly. I am cutting this out of the globalization guide (which you should read):
    Binding and Defining Java Strings to SQL NCHAR Datatypes
    For binding or defining Java string variables to SQL NCHAR datatypes, Oracle
    provides an extended PreparedStatement which has the setFormOfUse()
    method through which you can explicitly specify the target column of a bind
    variable to be a SQL NCHAR datatype. The following code illustrates how to bind a
    Java string to an NCHAR column.
    int employee_id = 12345;
    String last_name = "Joe"
    oracle.jdbc.OraclePreparedStatement pstmt =
    (oracle.jdbc.OraclePreparedStatement)
    conn.prepareStatement("INSERT INTO employees (last_name, employee_id)
    VALUES (?, ?)");
    pstmt.setFormOfUse(1, oracle.jdbc.OraclePreparedStatement.FORM_NCHAR);
    pstmt.setString(1, last_name);
    pstmt.setInt(2, employee_id);
    pstmt.execute(); /* execute to insert into first row */
    employee_id += 1; /* next employee number */
    last_name = "\uFF2A\uFF4F\uFF45"; /* Unicode characters in name */
    pstmt.setString(1, last_name);
    pstmt.setInt(2, employee_id);
    pstmt.execute(); /* execute to insert into second row */
    You can define the target SQL NCHAR columns by specifying their datatypes, forms
    of use, and lengths. JDBC uses this information to optimize the performance of
    fetching SQL NCHAR data from these columns. The following is an example of
    defining a SQL NCHAR column.
    OraclePreparedStatement pstmt = (OraclePreparedStatement)
    conn.prepareStatement("SELECT ename, empno from emp");
    pstmt.defineColumnType(1,Types.VARCHAR, 3,
    OraclePreparedStatement.FORM_NCHAR);
    pstmt.defineColumnType(2,Types.INTEGER);
    ResultSet rest = pstmt.executeQuery();
    String name = rset.getString(1);
    int id = reset.getInt(2);
    To define a SQL NCHAR column, you need to specify the datatype that is equivalent
    to a SQL CHAR column in the first argument, the length in number of characters in
    the second argument, and the form of use in the fourth argument of
    defineColumnType().
    You can bind or define a Java string against an NCHAR column without explicitly
    specifying the form of use argument. This implies the following:
    If you do not specify the argument in the setString() method, then JDBC
    assumes that the bind or define variable is for the SQL CHAR column. As a
    result, it tries to convert them to the database character set. When the data gets
    to the database, the database implicitly converts the data in the database
    character set to the national character set. During this conversion, data can be
    lost when the database character set is a subset of the national character set.
    Because the national character set is either UTF8 or AL16UTF16, data loss
    would happen if the database character set is not UTF8 or AL32UTF8.
    Because implicit conversion from SQL CHAR to SQL NCHAR datatypes happens
    in the database, database performance is degraded.
    In addition, if you bind or define a Java string for a column of SQL CHAR datatypes
    but specify the form of use argument, then performance of the database is
    degraded. However, data should not be lost because the national character set is
    always a larger set than the database character set.
    You need to set your NLS_LANG on the middle tier or client where you set up iSQL*PLUS.

  • NCHAR issue with oracle database using JDBC adapter

    Hi,
    We have a requirement to develop an XI interface from FTP server(File adapter) to oracle database using JDBC adapter. In the oracle database table few fields are of type NCHAR/NVARCHAR. when we try to insert the character(A,B,c..) values into oracle table fields of type NCHAR/NVARCHAR, we are getting the following error message in the JDBC adapter audit log. IF we pass the numeric value to the same field, then we are able to insert the records successfully.
    Unable to execute statement for table or stored procedure. 'IPCSDD_DOWNLOAD_PROCESS' (Structure 'StatementName1') due to java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    Please find the system information below.
    Oracle version- 10.2.4
    XI version - 3.0/ service pack 19
    JDBC driver- oracle.jdbc.driver.OracleDriver
    Please suggest.
    Thanks,
    Venkata
    Edited by: Venkata Narayana  Eepuri on Oct 21, 2010 12:10 AM

    Dear Venkata Narayana,
    Concerning the error, kindly go through the following note :
    731 - Collective note: ORA-00904
    follow the recommendations mentioned in that and please check if that helps.
    Best Regards
    Nishwanth

  • Oracle defaultNChar=true SLOW on NCHAR/NVARCHAR2

    Hi all,
    I am using a JDBC Prepared Statement with a bunch of parameters using setString(pos, value). The underlying columns on the tables are all NCHAR and NVARCHAR2. I have set the Oracle JDBC driver's "defaultNChar=true" so that Oracle DB would always treat my parameters as national language characters. The driver file is "ojdbc6.jar".
    My problem: My parametrized query is extremely slow with "defaultNChar=true". But as soon as I set "defaultNChar=false" the query is ultra fast (3 seconds).
    Query usage looks like that:
    String sql = "INSERT INTO MYTABLE_ERROR(MY_NAME,MY_FLAG,MY_VALUE) "
                            + "SELECT ? AS MY_NAME,"
                            + "? AS MY_FLAG,v.MY_VALUE"
                            + " FROM OTHER_TABLE v"
                            + " JOIN ( SELECT * FROM ... iv ... WHERE iv.MY_NAME = ? ) rule1 "
                            + " ON v.\"MY_NAME\"=rule1.\"MY_NAME\" AND v.\"MY_VALUE\"=rule1.\"MY_VALUE\""
                            + " WHERE rule1.\"MY_NAME\" = ? AND v.\"MY_VALUE\" = ?";
                preStatement = conn.prepareStatement (sql);
                int count = 1;
                for (String p : params)
                    // SLOW
                    //preStatement.setNString (count++, p);
                    // SLOW
                    //preStatement.setObject (count++, p, Types.NVARCHAR);
                    // SLOW
                    preStatement.setString (count++, p);
    I have been trying to find the root cause of why my prepared statements executed against an "Oracle Database 11g Release 11.2.0.3.0 - 64bit Production" DB are slow with a JDBC driver "Oracle JDBC driver, 11.2.0.3.0". I could not find any clue!
    I even got the DB NLS config hoping to find anything, but I am not sure here either:
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET AL32UTF8
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_COMP BINARY
    Please help!
    Thanks,
    H.

    UPDATE: It looks like the query is stuck when using "defaultNChar=true" somehow. I am seeing this when using JConsole:
    Total blocked: 1  Total waited: 1
    Stack trace:
    java.net.SocketInputStream.socketRead0(Native Method)
    java.net.SocketInputStream.read(Unknown Source)
    java.net.SocketInputStream.read(Unknown Source)
    oracle.net.ns.Packet.receive(Packet.java:311)
    oracle.net.ns.DataPacket.receive(DataPacket.java:103)
    oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:312)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:257)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:182)
    oracle.net.ns.NetInputStream.read(NetInputStream.java:99)
    oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:121)
    oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:77)
    oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1173)
    oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:309)
    oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:200)
    oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:543)
    oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:238)
    oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1446)
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1757)
    oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4372)
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:4539)
       - locked oracle.jdbc.driver.T4CConnection@7f2315e5
    oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:5577)
    com.mycomp.test.DriverTest.fireStatement(DriverTest.java:253)

  • Question about NCHAR and NVARCHAR2 in Oracle 8.1.7

    I am using Oracle 8.1.7 on Red Hat 7.2. The database encoding is UTF8.
    I created a table with a field: col1 nvarchar2(5).
    But I can insert only ONE Chinese character to that field.
    Doesn't it supposed to be 5?
    (I can insert a 5 english characters into the field)
    It seems that a Chinese character occupies 3 bytes in UTF8.
    Doesn't the size of NCHAR and NVARCHAR2 refer to the size of CHARACTERS not bytes?
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET UTF8
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_COMP BINARY

    The National Character Set in 8i was only meant to support a few special Asian character sets. Though it is set to whatever you set the database to the NCHAR columns will not work properly for UTF8. You will need to use SQL CHAR fields in order to support UTF8 in 8i. And the semantics are byte. In Oracle9i the National Character Set exclusively supports Unicode via the character sets UTF8 and Al16UTF16. The default is Al16UTF16 which is UTF-16. The 9i NCHAR fields are character semantics so field(5) would be 5 characters not bytes. There are a couple of papers on our home page that talk about unicode support at:
    http://technet.oracle.com/tech/globalization/content.html
    Oracle Unicode Database Support
    Migration to Unicode Datatypes for Multilingual Databases and Applications in Oracle9i

  • Oracle 11.2.0.2 and nchar optimizer problem

    Hello,
    sorry in advance for not being able to give all details to narrow better this possible problem.
    I admit it could be elsewhere.....
    I have a complex query where in particular an nchar(2) field (say col1) of table tab is involved
    I'm experimenting a sort of problem in optimizer estimating the number of rows it will get from this condition and so the corresponding overall cost of the query
    the table contains about 300k records and this field has at this moment 2 different values
    blankblank --> almost all records
    AA --> about 30 records
    there is at the moment a single index IND1 defined on this column (not a bitmap index)
    Both table and index are analyzed
    if my query contains the condition
    AND TAB.COL1 = ' ' ---> single blank
    Then the optimizer erroneously thinks with explain plan to get about 30 rows
    |* 5 | INDEX RANGE SCAN     | IND1 |     29 |     |     3 (0)
    | 00:00:01 |
    and the overall about 98, but the query actually doesn't come to an end ... (waited 10 minutes)
    if my query contains the condition
    AND TAB.COL1 = ' ' --->double space
    it doesn't use that wrong path and completes in about 1 second.
    If I replicate the query with single space on a test db with 11.2.0.1 it behaves correctly.
    If I force it to behave as the default wrong query in 11.2.0.2 (I have to use 3 hints to duplicate it)
    I get
    |* 5 | INDEX RANGE SCAN     | IND1 | 135K|     | 306 (1)
    | 00:00:04 |
    and overall cost is 304K so it is not used as a possible path...
    ANyone knows if anything changed between 11.2.0.1 and 11.2.0.2 for nchar and these possible different behaviours?
    (BTW: also in another 11.1.0.6 db I don't have this problem)
    The query is created by application and I cannot put the amount of necessary spaces.....
    And I'm afraid this problem could exist also for other tables where I have nchar(N) fields with N >2 too....
    Thanks in advance,
    Gianluca

    1) do you have a frequency histogram on this column?
    and
    2) is the client application using bind variables or string literals when querying?

  • Installation problem with Solution Manager 4.0 on Windows 2003/Oracle 10.2

    Hello,
    I'm receving the following error message while running SAPinst on step 11 Create Database:
    ERROR 2007-05-31 23:20:32
    CJS-00084  SQL statement or script failed.<br>DIAGNOSIS: Error message: ORA-955 for defaultdest
    OLUTION: See ora_sql_results.log and the Oracle documentation for details.
    ERROR 2007-05-31 23:20:32
    MUT-03025  Caught ESAPinstException in Modulecall: ESAPinstException: error text undefined.
    ERROR 2007-05-31 23:20:32
    FCO-00011  The step runCatprocSql with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_OraDBCheck|ind|ind|ind|ind|0|0|NW_OraDBMain|ind|ind|ind|ind|0|0|NW_OraDBStd|ind|ind|ind|ind|3|0|NW_OraDbBuild|ind|ind|ind|ind|5|0|runCatprocSql was executed with status ERROR .
    I've read the log file referenced above and did not find any additional details.
    I'll post the entire log below as well:
    INFO 2007-05-31 15:05:44
    Copied file 'C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/inifile.xml' to 'C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/inifile.4.xml'.
    INFO 2007-05-31 15:05:45
    Copied file 'C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/inifile.xml' to 'C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/inifile.5.xml'.
    INFO 2007-05-31 15:05:52
    Execute step
    Component  W2K_ServicePack_Check|ind|ind|ind|ind
    Preprocess  of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_First_Steps|ind|ind|ind|ind|0|0|W2K_ServicePack_Check|ind|ind|ind|ind|2|0.
    INFO 2007-05-31 15:06:11
    Copied file 'C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/keydb.xml' to 'C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/keydb.3.xml'.
    INFO 2007-05-31 15:06:11
    Execute step runCatprocSql of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_OraDBCheck|ind|ind|ind|ind|0|0|NW_OraDBMain|ind|ind|ind|ind|0|0|NW_OraDBStd|ind|ind|ind|ind|3|0|NW_OraDbBuild|ind|ind|ind|ind|5|0.
    INFO 2007-05-31 15:06:16
    Removing file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS\ora_query3_tmp0_1.sql.
    INFO 2007-05-31 15:06:16
    Creating file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS\ora_query3_tmp0_1.sql.
    INFO 2007-05-31 15:06:18
    Switched to user: sm1adm.
    INFO 2007-05-31 15:06:18
    Working directory changed to C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS.
    INFO 2007-05-31 15:07:03
    Switched to user: sm1adm.
    INFO 2007-05-31 15:07:06
    Working directory changed to C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS.
    ERROR 2007-05-31 15:21:34
    CJS-00084  SQL statement or script failed.<br>DIAGNOSIS: Error message: ORA-955 for defaultdest
    SQL> Rem     bnainani   11/29/00  - specify compatible=8.0 for create_queue_table
    SQL> Rem     liwong     10/20/00  - add def$_destination.flag
    SQL> Rem     bnainani   11/15/00  - specify compatible=8.0 for queue table
    SQL> Rem     narora     09/13/00  - add comment on new def$_destination columns
    SQL> Rem     liwong     09/01/00  - add master w/o quiesce: fixes
    SQL> Rem     liwong     07/12/00  - add total_prop_time_lat
    SQL> Rem     liwong     06/29/00  - add total_txn_count, total_prop_time
    SQL> Rem     liwong     05/17/00  - add_master_db w/o quiesce
    SQL> Rem     jstamos    05/17/00  - add_master_db w/o quiesce
    SQL> Rem     elu        01/24/00  - add column apply_init to def$_destination
    SQL> Rem     alakshmi   12/02/99  - Bug 979398: Before-row insert trigger on
    SQL> Rem                            def$_propagator
    SQL> Rem     wesmith    10/31/98 -  change shape of table def$_pushed_transactions
    SQL> Rem     jnath      02/23/98 -  bug 601972: split anonymous pl/sql blocks
    SQL> Rem     wesmith    01/21/98 -  create def$_pushed_transactions table for
    SQL> Rem                            server-side RepAPI
    SQL> Rem     nbhatt     07/27/97 -  change create_queuetable -> create_queue_table
    SQL> Rem     nbhatt     04/21/97 -  change 'TRACKING' in CREATE_QUEUE to 'DEPENDENCY
    SQL> Rem     nbhatt     04/21/97 -  change syntax of create_queue
    SQL> Rem     liwong     04/16/97 -  Alter view system.AQ$DEF$_AQ{CALL,ERROR}
    SQL> Rem     liwong     04/11/97 -  Fixing defaultdest_primary typo
    SQL> Rem     jstamos    04/10/97 -  remove unneeded indexes
    SQL> Rem     nbhatt     04/08/97 -  change create_qtable to create_queuetable
    SQL> Rem     jstamos    04/04/97 -  tighter AQ integration
    SQL> Rem     liwong     04/02/97 -  Add schema_name, package_name in def$_calldest
    SQL> Rem     ato        03/31/97 -  create_qtable interface change
    SQL> Rem     liwong     03/25/97 -  remove batch_no from def$_tranorder
    SQL> Rem     liwong     02/24/97 -  pctversion --> 0 for def$_aqcall, def$_aqerror
    SQL> Rem     liwong     02/22/97 -  Remove dropping view aq$def$_aqcall
    SQL> Rem     ademers    02/07/97 -  Remove constraint def$_calldest_call
    SQL> Rem     liwong     01/11/97 -  drop and create aq$def$_aqcall (temporary)
    SQL> Rem     liwong     01/10/97 -  Alter view aq$def$_aqcall
    SQL> Rem     liwong     01/07/97 -  Alter default value for batch_no
    SQL> Rem     jstamos    12/23/96 -  change temp$nclob col
    SQL> Rem     jstamos    11/21/96 -  nchar support
    SQL> Rem     sjain      11/11/96 -  Remove dummy buffer # comment
    SQL> Rem     asgoel     11/05/96 -  Disable misc_tracking in def$_aqerror
    SQL> Rem     sjain      11/06/96 -  deferror changes
    SQL> Rem     vkrishna   10/28/96 -  change STORED IN to STORE AS for lob
    SQL> Rem     sjain      10/02/96 -  Aq conversion
    SQL> Rem     sbalaram   09/24/96 -  ARPC performance - add foreign key index
    SQL> Rem     jstamos    09/06/96 -  rename temp$lob and temporarily change nclob
    SQL> Rem     sjain      09/03/96 -  AQ converson
    SQL> Rem     ademers    08/02/96 -  queue_batch default in def_destination
    SQL> Rem     ademers    07/29/96 -  queue_batch default in def_call
    SQL> Rem     ademers    07/29/96 -  queue_batch default
    SQL> Rem     jstamos    07/24/96 -  add system.temp$lob
    SQL> Rem     sbalaram   07/22/96 -  create def$_aqcall and def$_aqerror tables
    SQL> Rem     jstamos    06/12/96 -  LOB support for deferred RPCs
    SQL> Rem     ldoo       06/28/96 -  Comment out queue_table from def_tranorder
    SQL> Rem     ademers    05/30/96 -  create def_origin
    SQL> Rem     ademers    05/28/96 -  fix def_destination col names
    SQL> Rem     ldoo       05/09/96 -  New security model
    SQL> Rem     sjain      05/01/96 -  add seq col to def_destination
    SQL> Rem     ademers    04/29/96 -  add batch_no, dep_scn to def_call
    SQL> Rem     jstamos    12/04/95 -  324303: use index to avoid sorting the queue
    SQL> Rem     jstamos    08/17/95 -  code review changes
    SQL> Rem     jstamos    08/16/95 -  add comments to tables
    SQL> Rem     wmaimone   01/04/96 -  7.3 merge
    SQL> Rem     hasun      01/31/95 -  Modify tables.<br>SOLUTION: See ora_sql_results.log and the Oracle documentation for details.
    ERROR 2007-05-31 15:21:34
    MUT-03025  Caught ESAPinstException in Modulecall: ESAPinstException: error text undefined.
    ERROR 2007-05-31 15:21:34
    FCO-00011  The step runCatprocSql with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_OraDBCheck|ind|ind|ind|ind|0|0|NW_OraDBMain|ind|ind|ind|ind|0|0|NW_OraDBStd|ind|ind|ind|ind|3|0|NW_OraDbBuild|ind|ind|ind|ind|5|0|runCatprocSql was executed with status ERROR .
    INFO 2007-05-31 23:06:17
    An error occured and the user decided to retry the current step: "|NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_OraDBCheck|ind|ind|ind|ind|0|0|NW_OraDBMain|ind|ind|ind|ind|0|0|NW_OraDBStd|ind|ind|ind|ind|3|0|NW_OraDbBuild|ind|ind|ind|ind|5|0|runCatprocSql".
    INFO 2007-05-31 23:06:18
    Removing file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS\ora_query3_tmp0_1.sql.
    INFO 2007-05-31 23:06:18
    Creating file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS\ora_query3_tmp0_1.sql.
    INFO 2007-05-31 23:06:18
    Switched to user: sm1adm.
    INFO 2007-05-31 23:06:18
    Working directory changed to C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS.
    INFO 2007-05-31 23:06:20
    Switched to user: sm1adm.
    INFO 2007-05-31 23:06:20
    Working directory changed to C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS.
    ERROR 2007-05-31 23:20:32
    CJS-00084  SQL statement or script failed.<br>DIAGNOSIS: Error message: ORA-955 for defaultdest
    SQL> Rem     bnainani   11/29/00  - specify compatible=8.0 for create_queue_table
    SQL> Rem     liwong     10/20/00  - add def$_destination.flag
    SQL> Rem     bnainani   11/15/00  - specify compatible=8.0 for queue table
    SQL> Rem     narora     09/13/00  - add comment on new def$_destination columns
    SQL> Rem     liwong     09/01/00  - add master w/o quiesce: fixes
    SQL> Rem     liwong     07/12/00  - add total_prop_time_lat
    SQL> Rem     liwong     06/29/00  - add total_txn_count, total_prop_time
    SQL> Rem     liwong     05/17/00  - add_master_db w/o quiesce
    SQL> Rem     jstamos    05/17/00  - add_master_db w/o quiesce
    SQL> Rem     elu        01/24/00  - add column apply_init to def$_destination
    SQL> Rem     alakshmi   12/02/99  - Bug 979398: Before-row insert trigger on
    SQL> Rem                            def$_propagator
    SQL> Rem     wesmith    10/31/98 -  change shape of table def$_pushed_transactions
    SQL> Rem     jnath      02/23/98 -  bug 601972: split anonymous pl/sql blocks
    SQL> Rem     wesmith    01/21/98 -  create def$_pushed_transactions table for
    SQL> Rem                            server-side RepAPI
    SQL> Rem     nbhatt     07/27/97 -  change create_queuetable -> create_queue_table
    SQL> Rem     nbhatt     04/21/97 -  change 'TRACKING' in CREATE_QUEUE to 'DEPENDENCY
    SQL> Rem     nbhatt     04/21/97 -  change syntax of create_queue
    SQL> Rem     liwong     04/16/97 -  Alter view system.AQ$DEF$_AQ{CALL,ERROR}
    SQL> Rem     liwong     04/11/97 -  Fixing defaultdest_primary typo
    SQL> Rem     jstamos    04/10/97 -  remove unneeded indexes
    SQL> Rem     nbhatt     04/08/97 -  change create_qtable to create_queuetable
    SQL> Rem     jstamos    04/04/97 -  tighter AQ integration
    SQL> Rem     liwong     04/02/97 -  Add schema_name, package_name in def$_calldest
    SQL> Rem     ato        03/31/97 -  create_qtable interface change
    SQL> Rem     liwong     03/25/97 -  remove batch_no from def$_tranorder
    SQL> Rem     liwong     02/24/97 -  pctversion --> 0 for def$_aqcall, def$_aqerror
    SQL> Rem     liwong     02/22/97 -  Remove dropping view aq$def$_aqcall
    SQL> Rem     ademers    02/07/97 -  Remove constraint def$_calldest_call
    SQL> Rem     liwong     01/11/97 -  drop and create aq$def$_aqcall (temporary)
    SQL> Rem     liwong     01/10/97 -  Alter view aq$def$_aqcall
    SQL> Rem     liwong     01/07/97 -  Alter default value for batch_no
    SQL> Rem     jstamos    12/23/96 -  change temp$nclob col
    SQL> Rem     jstamos    11/21/96 -  nchar support
    SQL> Rem     sjain      11/11/96 -  Remove dummy buffer # comment
    SQL> Rem     asgoel     11/05/96 -  Disable misc_tracking in def$_aqerror
    SQL> Rem     sjain      11/06/96 -  deferror changes
    SQL> Rem     vkrishna   10/28/96 -  change STORED IN to STORE AS for lob
    SQL> Rem     sjain      10/02/96 -  Aq conversion
    SQL> Rem     sbalaram   09/24/96 -  ARPC performance - add foreign key index
    SQL> Rem     jstamos    09/06/96 -  rename temp$lob and temporarily change nclob
    SQL> Rem     sjain      09/03/96 -  AQ converson
    SQL> Rem     ademers    08/02/96 -  queue_batch default in def_destination
    SQL> Rem     ademers    07/29/96 -  queue_batch default in def_call
    SQL> Rem     ademers    07/29/96 -  queue_batch default
    SQL> Rem     jstamos    07/24/96 -  add system.temp$lob
    SQL> Rem     sbalaram   07/22/96 -  create def$_aqcall and def$_aqerror tables
    SQL> Rem     jstamos    06/12/96 -  LOB support for deferred RPCs
    SQL> Rem     ldoo       06/28/96 -  Comment out queue_table from def_tranorder
    SQL> Rem     ademers    05/30/96 -  create def_origin
    SQL> Rem     ademers    05/28/96 -  fix def_destination col names
    SQL> Rem     ldoo       05/09/96 -  New security model
    SQL> Rem     sjain      05/01/96 -  add seq col to def_destination
    SQL> Rem     ademers    04/29/96 -  add batch_no, dep_scn to def_call
    SQL> Rem     jstamos    12/04/95 -  324303: use index to avoid sorting the queue
    SQL> Rem     jstamos    08/17/95 -  code review changes
    SQL> Rem     jstamos    08/16/95 -  add comments to tables
    SQL> Rem     wmaimone   01/04/96 -  7.3 merge
    SQL> Rem     hasun      01/31/95 -  Modify tables.<br>SOLUTION: See ora_sql_results.log and the Oracle documentation for details.
    ERROR 2007-05-31 23:20:32
    MUT-03025  Caught ESAPinstException in Modulecall: ESAPinstException: error text undefined.
    ERROR 2007-05-31 23:20:32
    FCO-00011  The step runCatprocSql with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_OraDBCheck|ind|ind|ind|ind|0|0|NW_OraDBMain|ind|ind|ind|ind|0|0|NW_OraDBStd|ind|ind|ind|ind|3|0|NW_OraDbBuild|ind|ind|ind|ind|5|0|runCatprocSql was executed with status ERROR .
    Thanks in advnace for your help,
    Glen

    What do you see in ora_sql_result.log? (the last lines containing the error)?
    Markus

  • Problem with Unicode and Oracle NCLOB fields

    When I try to INSERT a new (N)CLOB into an Oracle database, all is fine until I use a non-ASCII character, such as an accented roman letter, like the "�" (that's '\u00E9') in "caf�" or the Euro Currency symbol "?" (that's '\u20AC' as a Java character literal, just in case the display is corrupted here too). This doesn't happen with "setString", but does happen when streaming characters to the CLOB; however, as Oracle or the driver refuse strings larger than 4000 characters, and as I need to support all the above symbols (and many more), I'm stuck.
    Here's the background to the problem (I've tried to be detailed, after a lot of looking around on the web, I've seen lots of people with similar problems, but no solutions: I've seen and been able to stream ASCII clobs, or add small NCHAR strings, but not stream NCLOBs...).
    I'm using Oracle 9.2.0.1.0 with the "thin" JDBC driver, on a Windows box (XP Pro). My database instance is set up with AL32UTF8 as the database encoding, and UTF8 as the national character set.. I've created a simple user/schema, called LOBTEST, in which I created two tables (see below).
    The basic problems are :
    - with Oracle and JDBC, you can't set the value of a CLOB or NCLOB with PreparedStatement's setString or setCharacterStream methods (as it throws an exception when you send more than 4000 characters)
    - with Oracle, you can only have one LONG VARCHAR-type field per table (according to their documentation) and you MUST read all columns in a set order (amongst other limitations).
    - with a SQL INSERT command, there's no way to set the value of a parameter that's a CLOB (implementations of the CLOB interface can only be obtained by performing a SELECT.... but obviously, when I'm inserting, the record doesn't exist yet...). Workarounds include (possibly) JDBC 4 (doesn't exist yet...) or doing the following Oracle-specific stuff :
    INSERT INTO MyTable (theID,theCLOB) VALUES (1, empty_clob());
    SELECT * FROM MyTable WHERE theId = 1;
    ...and getting the empty CLOB back (via a ResultSet), and populating it. I have a very large application, that's deployed for many of our customers using SapDB and MySQL without a hitch, with "one-step" INSERTS; I can't feasibly change the application into "three-step INSERT-SELECT-UPDATE" just for Oracle, and I shouldn't need to!!!
    The final workaround is to use Oracle-specific classes, described in:
    http://download-east.oracle.com/otn_hosted_doc/jdeveloper/904preview/jdbc-javadoc/index.html
    ...such as CLOB (see my example). This works fine until I add some non-ASCII characters, at which point, irrespective of whether the CLOB data is 2 characters or 2 million characters, it throws the same exception:
    java.io.IOException: Il n'y a plus de donn?es ? lire dans le socket
         at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
         at oracle.jdbc.driver.OracleClobWriter.flushBuffer(OracleClobWriter.java:270)
         at oracle.jdbc.driver.OracleClobWriter.flush(OracleClobWriter.java:204)
         at scratchpad.InsertOracleClobExample.main(InsertOracleClobExample.java:61)...where the error message in English is "No more data to read from socket". I need the Oracle-specific "setFormOfUse" method to force it to correctly use the encoding of the NCLOB field, without it, even plain ASCII data is rejected with an exception indicating that the character set is inappropriate. With a plain CLOB, I don't need it, but the plain CLOB refuses my non-ASCII data anyway.
    So, many many thanks in advance for any advice. The remainder of my post includes my code example and a simple SQL script to create the table(s). You can mess around with the source code to test various combinations.
    Thanks,
    Chris B.
    CREATE TABLE NCLOBTEST (
         ID         INTEGER NOT NULL,
         SOMESTRING NCLOB,
         PRIMARY KEY (ID)
    CREATE TABLE CLOBTEST (
         ID         INTEGER NOT NULL,
         SOMESTRING CLOB,
         PRIMARY KEY (ID)
    package scratchpad;
    import java.io.Writer;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.util.Properties;
    import oracle.jdbc.driver.OracleDriver;
    import oracle.jdbc.driver.OraclePreparedStatement;
    import oracle.sql.CLOB;
    public class InsertOracleClobExample
         public static void main(String[] args)
              Properties jdbcProperties = new Properties();
              jdbcProperties.setProperty( "user", "LOBTEST" );
              jdbcProperties.setProperty( "password", "LOBTEST" );
    //          jdbcProperties.setProperty("oracle.jdbc.defaultNChar","true");
              Driver jdbcDriver = new OracleDriver();
              PreparedStatement pstmt = null;
              Connection connection = null;
              String tableName = "NCLOBTEST";
              CLOB clob = null;
              try
                   connection = jdbcDriver.connect("jdbc:oracle:thin:@terre:1521:orcl", jdbcProperties);
                   pstmt = connection.prepareStatement("DELETE FROM NCLOBTEST");
                   pstmt.executeUpdate();
                   pstmt.close();
                   pstmt = connection.prepareStatement(
                        "INSERT INTO "+tableName+" (ID,SOMESTRING) VALUES (?,?);"
                   clob = CLOB.createTemporary(pstmt.getConnection(), true, CLOB.DURATION_SESSION);
                   clob.open(CLOB.MODE_READWRITE);
                   Writer clobWriter = clob.getCharacterOutputStream();
                   clobWriter.write("Caf? 4,90? TTC");
                   clobWriter.flush();
                   clobWriter.close();
                   clob.close();
                   OraclePreparedStatement opstmt = (OraclePreparedStatement)pstmt;
                   opstmt.setInt(1,1);
                   opstmt.setFormOfUse(2, OraclePreparedStatement.FORM_NCHAR);
                   opstmt.setCLOB(2, clob);
                   System.err.println("Rows affected: "+opstmt.executeUpdate());
              catch (Exception sqlex)
                   sqlex.printStackTrace();
                   try     {
                        clob.freeTemporary();
                   } catch (SQLException e) {
                        System.err.println("Cannot free temporary CLOB: "+e.getMessage());
              try { pstmt.close(); } catch(SQLException sqlex) {}
              try { connection.close(); } catch(SQLException sqlex) {}
    }

    The solution to this is to use a third-party driver. Oranxo works really well.
    - Chris

  • Problem with Character Set in Oracle database 10g

    Hi,
    I tried to import one tablespace into test server. Source server with Oracle 8i and Target server with Oracle database 10g. The error I get is
    Import: Release 10.2.0.1.0 - Production on Thu Aug 3 00:20:49 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Username: sys as sysdba
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V08.01.07 via conventional path
    About to import transportable tablespace(s) metadata...
    import done in WE8DEC character set and AL16UTF16 NCHAR character set
    export server uses WE8DEC NCHAR character set (possible ncharset conversion)
    . importing SYS's objects into SYS
    . importing SYS's objects into SYS
    IMP-00017: following statement failed with ORACLE error 19736:
    "BEGIN sys.dbms_plugts.beginImport ('8.1.7.4.0',2,'2',NULL,'NULL',67051,25"
    "51,2); END;"
    IMP-00003: ORACLE error 19736 encountered
    ORA-19736: can not plug a tablespace into a database using a different national character set
    ORA-06512: at "SYS.DBMS_PLUGTS", line 2386
    ORA-06512: at "SYS.DBMS_PLUGTS", line 1946
    ORA-06512: at line 1
    IMP-00000: Import terminated unsuccessfully
    PLZ somebody help in geting resolve this. Has anybody seen this error before.

    The solution to this problem is described in MetaLink note #211920.1. But this note is published with LIMITED access as it involves using a hidden parameter.
    You can get access to the note through Oracle Support only.
    The problem itself is solved generically, if the source database is at least 10.1.0.3 and the target database is 10.2
    -- Sergiusz

  • 4.7 Enterprise install error in catproc.sql phase(RedHat5- Oracle 10.2.0.4)

    Hi,
    I am installing SAP 4.7 Enterprise on Red Hat 5.3 and Oracle 10.2.0.4. When I install 4.7 Enterpirse I have an error in catproc.sql phase like below: -
    ERROR 2009-06-02 18:42:34
    CJS-00084  SQL statement or script failed.<br>DIAGNOSIS: Error message: ORA-955 for defaultdestSQL> Rem     bnainani   11/29/00  - specify compatible=8.0 for create_queue_tableSQL> Rem     liwong     10/20/00  - add def$_destination.flagSQL> Rem     bnainani   11/15/00  - specify compatible=8.0 for queue tableSQL> Rem     narora     09/13/00  - add comment on new def$_destination columnsSQL> Rem     liwong     09/01/00  - add master w/o quiesce: fixesSQL> Rem     liwong     07/12/00  - add total_prop_time_latSQL> Rem     liwong     06/29/00  - add total_txn_count, total_prop_timeSQL> Rem     liwong     05/17/00  - add_master_db w/o quiesceSQL> Rem     jstamos    05/17/00  - add_master_db w/o quiesceSQL> Rem     elu        01/24/00  - add column apply_init to def$_destinationSQL> Rem     alakshmi   12/02/99  - Bug 979398: Before-row insert trigger onSQL> Rem                            def$_propagatorSQL> Rem     wesmith    10/31/98 -  change shape of table def$_pushed_transactionsSQL> Rem     jnath      02/23/98 -  bug 601972: split anonymous pl/sql blocksSQL> Rem     wesmith    01/21/98 -  create def$_pushed_transactions table forSQL> Rem                            server-side RepAPISQL> Rem     nbhatt     07/27/97 -  change create_queuetable -> create_queue_tableSQL> Rem     nbhatt     04/21/97 -  change 'TRACKING' in CREATE_QUEUE to 'DEPENDENCYSQL> Rem     nbhatt     04/21/97 -  change syntax of create_queueSQL> Rem     liwong     04/16/97 -  Alter view system.AQ$DEF$_AQ{CALL,ERROR}SQL> Rem     liwong     04/11/97 -  Fixing defaultdest_primary typoSQL> Rem     jstamos    04/10/97 -  remove unneeded indexesSQL> Rem     nbhatt     04/08/97 -  change create_qtable to create_queuetableSQL> Rem     jstamos    04/04/97 -  tighter AQ integrationSQL> Rem     liwong     04/02/97 -  Add schema_name, package_name in def$_calldestSQL> Rem     ato        03/31/97 -  create_qtable interface changeSQL> Rem     liwong     03/25/97 -  remove batch_no from def$_tranorderSQL> Rem     liwong     02/24/97 -  pctversion --> 0 for def$_aqcall, def$_aqerrorSQL> Rem     liwong     02/22/97 -  Remove dropping view aq$def$_aqcallSQL> Rem     ademers    02/07/97 -  Remove constraint def$_calldest_callSQL> Rem     liwong     01/11/97 -  drop and create aq$def$_aqcall (temporary)SQL> Rem     liwong     01/10/97 -  Alter view aq$def$_aqcallSQL> Rem     liwong     01/07/97 -  Alter default value for batch_noSQL> Rem     jstamos    12/23/96 -  change temp$nclob colSQL> Rem     jstamos    11/21/96 -  nchar supportSQL> Rem     sjain      11/11/96 -  Remove dummy buffer # commentSQL> Rem     asgoel     11/05/96 -  Disable misc_tracking in def$_aqerrorSQL> Rem     sjain      11/06/96 -  deferror changesSQL> Rem     vkrishna   10/28/96 -  change STORED IN to STORE AS for lobSQL> Rem     sjain      10/02/96 -  Aq conversionSQL> Rem     sbalaram   09/24/96 -  ARPC performance - add foreign key indexSQL> Rem     jstamos    09/06/96 -  rename temp$lob and temporarily change nclobSQL> Rem     sjain      09/03/96 -  AQ conversonSQL> Rem     ademers    08/02/96 -  queue_batch default in def_destinationSQL> Rem     ademers    07/29/96 -  queue_batch default in def_callSQL> Rem     ademers    07/29/96 -  queue_batch defaultSQL> Rem     jstamos    07/24/96 -  add system.temp$lobSQL> Rem     sbalaram   07/22/96 -  create def$_aqcall and def$_aqerror tablesSQL> Rem     jstamos    06/12/96 -  LOB support for deferred RPCsSQL> Rem     ldoo       06/28/96 -  Comment out queue_table from def_tranorderSQL> Rem     ademers    05/30/96 -  create def_originSQL> Rem     ademers    05/28/96 -  fix def_destination col namesSQL> Rem     ldoo       05/09/96 -  New security modelSQL> Rem     sjain      05/01/96 -  add seq col to def_destinationSQL> Rem     ademers    04/29/96 -  add batch_no, dep_scn to def_callSQL> Rem     jstamos    12/04/95 -  324303: use index to avoid sorting the queueSQL> Rem     jstamos    08/17/95 -  code review changesSQL> Rem     jstamos    08/16/95 -  add comments to tablesSQL> Rem     wmaimone   01/04/96 -  7.3 mergeSQL> Rem     hasun      01/31/95 -  Modify tables.<br>SOLUTION: See ora_sql_results.log and the Oracle documentation for details.
    Also  some error lines in ora_sql_results.log file like below:
    Connected to an idle instance.
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Disconnected
    DOC>     The following statement will cause an "ORA-01722: invalid number"
    DOC>     error and terminate the SQLPLUS session if the user is not SYS.
    DOC>     Disconnect and reconnect with AS SYSDBA.
    ERROR at line 1:
    ORA-01432: public synonym to be dropped does not exist
    ERROR at line 1:
    ORA-00942: table or view does not exist
    DOC>     The following PL/SQL block will cause an ORA-20000 error and
    DOC>     terminate the current SQLPLUS session if the user is not SYS.
    DOC>     Disconnect and reconnect with AS SYSDBA.
    ERROR at line 1:
    ORA-01921: role name 'EXP_FULL_DATABASE' conflicts with another user or role
    name
    ERROR at line 1:
    ORA-01434: private synonym to be dropped does not exist
    ERROR at line 1:
    ORA-04043: object DIANA does not exist
    ERROR at line 1:
    ORA-04043: object DIUTIL does not exist
    ERROR at line 1:
    ORA-04043: object DIUTIL does not exist
    ERROR at line 1:
    ORA-04043: object SUBPTXT2 does not exist
    ERROR at line 1:
    ORA-04043: object CREATE_TABLE_COST_COLUMNS does not exist
    ERROR at line 1:
    ORA-01434: private synonym to be dropped does not exist
    And ora_sql.log  file is:
    connect  /  as sysdba ;
    SHUTDOWN ABORT;
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    SHUTDOWN IMMEDIATE;
    exit;
    Executed with error.
    connect  /  as sysdba ;
    STARTUP NOMOUNT;
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    CREATE DATABASE MDP CONTROLFILE REUSE  MAXLOGFILES 255 MAXLOGMEMBERS 3 MAXLOGHISTORY 1000 MAXDATAFILES 254 MAXINSTANCES 50 NOARCHIVELOG CHARACTER SET UTF8 NATIONAL CHARACTER SET UTF8 DATAFILE '/oracle/MDP/sapdata1/system_1/system.data1' SIZE 350M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE PSAPTEMP TEMPFILE '/oracle/MDP/sapdata1/temp_1/temp.data1' SIZE 1750M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M UNDO TABLESPACE PSAPUNDO DATAFILE '/oracle/MDP/sapdata1/undo_1/undo.data1' SIZE 700M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M SYSAUX DATAFILE '/oracle/MDP/sapdata1/sysaux_1/sysaux.data1' SIZE 1000M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M
    LOGFILE GROUP 1 ('/oracle/MDP/origlogA/log_g11m1.dbf',
    '/oracle/MDP/mirrlogA/log_g11m2.dbf') SIZE 50M  REUSE ,
    GROUP 2 ('/oracle/MDP/origlogB/log_g12m1.dbf',
    '/oracle/MDP/mirrlogB/log_g12m2.dbf') SIZE 50M  REUSE ,
    GROUP 3 ('/oracle/MDP/origlogA/log_g13m1.dbf',
    '/oracle/MDP/mirrlogA/log_g13m2.dbf') SIZE 50M  REUSE ,
    GROUP 4 ('/oracle/MDP/origlogB/log_g14m1.dbf',
    '/oracle/MDP/mirrlogB/log_g14m2.dbf') SIZE 50M  REUSE
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    set newpage 0
    set space 0
    set pagesize 0
    set linesize 32767
    set markup HTML off
    set heading off
    set verify off
    set feedback off
    set trimspool on
    set sqlprompt SQL>
    set termout on
    set verify off
    set echo off
    spool ora_query3_tmp0_1.res
    SELECT STATUS FROM V$INSTANCE;
    spool off
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    @@/oracle/MDP/102_64/rdbms/admin/catalog.sql
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    set newpage 0
    set space 0
    set pagesize 0
    set linesize 32767
    set markup HTML off
    set heading off
    set verify off
    set feedback off
    set trimspool on
    set sqlprompt SQL>
    set termout on
    set verify off
    set echo off
    spool ora_query3_tmp0_1.res
    SELECT STATUS FROM V$INSTANCE;
    spool off
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    @@/oracle/MDP/102_64/rdbms/admin/catblock.sql
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    set newpage 0
    set space 0
    set pagesize 0
    set linesize 32767
    set markup HTML off
    set heading off
    set verify off
    set feedback off
    set trimspool on
    set sqlprompt SQL>
    set termout on
    set verify off
    set echo off
    spool ora_query3_tmp0_1.res
    SELECT STATUS FROM V$INSTANCE;
    spool off
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    @@/oracle/MDP/102_64/rdbms/admin/catproc.sql
    exit;
    Executed with error.
    connect  /  as sysdba ;
    set newpage 0
    set space 0
    set pagesize 0
    set linesize 32767
    set markup HTML off
    set heading off
    set verify off
    set feedback off
    set trimspool on
    set sqlprompt SQL>
    set termout on
    set verify off
    set echo off
    spool ora_query3_tmp0_1.res
    SELECT STATUS FROM V$INSTANCE;
    spool off
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    @@/oracle/MDP/102_64/rdbms/admin/catproc.sql
    exit;
    Executed with error.
    connect  /  as sysdba ;
    set newpage 0
    set space 0
    set pagesize 0
    set linesize 32767
    set markup HTML off
    set heading off
    set verify off
    set feedback off
    set trimspool on
    set sqlprompt SQL>
    set termout on
    set verify off
    set echo off
    spool ora_query3_tmp0_1.res
    SELECT STATUS FROM V$INSTANCE;
    spool off
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    @@/oracle/MDP/102_64/rdbms/admin/catproc.sql
    exit;
    Executed with error.
    connect  /  as sysdba ;
    set newpage 0
    set space 0
    set pagesize 0
    set linesize 32767
    set markup HTML off
    set heading off
    set verify off
    set feedback off
    set trimspool on
    set sqlprompt SQL>
    set termout on
    set verify off
    set echo off
    spool ora_query3_tmp0_1.res
    SELECT STATUS FROM V$INSTANCE;
    spool off
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    @@/oracle/MDP/102_64/rdbms/admin/catproc.sql
    exit;
    Executed with error.
    connect  /  as sysdba ;
    set newpage 0
    set space 0
    set pagesize 0
    set linesize 32767
    set markup HTML off
    set heading off
    set verify off
    set feedback off
    set trimspool on
    set sqlprompt SQL>
    set termout on
    set verify off
    set echo off
    spool ora_query3_tmp0_1.res
    SELECT STATUS FROM V$INSTANCE;
    spool off
    exit;
    Executed successfully.
    connect  /  as sysdba ;
    @@/oracle/MDP/102_64/rdbms/admin/catproc.sql
    exit;
    Executed with error.
    The errors are like these. How can I correct these errors and continue to installation? Is the oracle version 10.2.0.4  not correct version to install 4.7 enterprise on Red Hat Linux 5.3?
    Best regards,

    Hi Markus,
    I found 5 ERROR. There are different lines.
    First one:
          <fld name="STATUS">
            <strval><![CDATA[ERROR]]>
    Second one:
    CASE (= 'AUTOALLOCATE') RETURN (' AUTOALLOCATE '),
                    CASE (DEFAULT) RETURN (' ERROR ' + (tTablespaces.extMgmtAllocMode 
    Third one:
    CASE (= 'DICTIONARY') RETURN (' DICTIONARY '),
                  CASE (DEFAULT) RETURN (' ERROR ' + (tTablespaces.extMgmtMode 
    Fourth one:
    CASE (= 'AUTOALLOCATE') RETURN (' AUTOALLOCATE '),
                    CASE (DEFAULT) RETURN (' ERROR ' + (tTablespaces.extMgmtAllocMode 
    Fifth one:
    CASE (= 'DICTIONARY') RETURN (' DICTIONARY '),
                  CASE (DEFAULT) RETURN (' ERROR ' + (tTablespaces.extMgmtMode 
    Which one will I change to OK? Must all off them change to OK?
    Also is this problem about only these oracle error in your oppinion? For example in first line of ora_sql_results.log I have an error like below:
    CJS-00084 SQL statement or script failed
    Connected to an idle instance.
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    But ORACLE_HOME and ORACLE_SID environment variable are ok. Also I can connect and start and stop database manually. There is no problem about it.
    I installed anly Oracle patch 10.2.0.4. I didn't install any oracle interim patch. Should I have install oracle interim patch for Oracle 10.2.0.4?
    Best regards,

  • Character set mismatch in copying from oracle to oracle

    I have a set of ODI scripts that are copying from a source JD Edwards ERP database (Oracle 10g) to a BI datamart (Oracle 10g) and all the original scripts work OK.
    However I have mapped on to some additional tables in the ERP source database and some new BI tables in the target datamart database (oracle - to - oracle) but get an error when I try ro execute these.
    The operator log shows that the error is in the 'INSERT FLOW INTO I$ TABLE' and the error is ORA-12704 character set mismatch.
    The character set for both Oracle databases are the same (and have not changed) the main NLS_CHARACTERSET is AL332UTF8 and the national NLS_NCHAR_CHARACTERSET is AL16UTF16.
    But this works for tables containing NCHAR and NUMBER in previous scripts but not for anything I write now.
    The only other difference is that there was a recent upgrade of ODI to 10.1.3.5 - the repositories are also upgraded.
    Any ideas ?

    Hi Ravi,
    yes, a gateway would help. In 11.2 Oracle offers 2 kind of gateways to a SQL Server - a gateway for free which is based on 3rd party ODBC drivers (you need to get them from a 3rd party vendor, they are not included in the package) and called Database Gateway for ODBC (=DG4ODBC) and a very powerful Database Gateway for MS SQL Server (=DG4MSQL) which allows you also to execute distributed transactions and call remote SQL Server stored procdures. Please keep in mind that DG4MSQL requires a separate license.
    As you didn't post which platform you're going to use, please check out On "My Oracle Support" (=MOS) where you'll find notes how to configure each gateway for all supported platforms - just look for DG4MSQL or DG4ODBC
    On OTN you'll find the also the manuals.
    DG4ODBC: http://download.oracle.com/docs/cd/E11882_01/gateways.112/e12070.pdf
    DG4MSQL: http://download.oracle.com/docs/cd/E11882_01/gateways.112/e12069.pdf
    The generic gateway installation for Unix: http://download.oracle.com/docs/cd/E11882_01/gateways.112/e12013.pdf
    and for Windows: http://download.oracle.com/docs/cd/E11882_01/gateways.112/e12061.pdf

  • Importing a dump fails on Oracle 11g

    Hi
    I am trying to import a dump which was created from Oracle 10g version 10.2.0.3 TO Oracle 11g Release 11.1.0.6.0
    Issue 1)
    The command i am using is
    imp dmuser_02/dmuser_02@bnhpdb11_o11ut03.world file=dmpersist.dmp full=y ignore=y
    This command works fine on Oralce 10g(if i try to import the file to Oracle 10g) but fails on Oralce 11g with following error
    "Export file created by EXPORT:V10.02.01 via conventional path
    Warning: the objects were exported by SYS, not by you
    import done in US7ASCII character set and UTF8 NCHAR character set
    import server uses UTF8 character set (possible charset conversion)
    . importing SYS's objects into DMUSER_02
    . importing DMPERSIST's objects into DMPERSIST
    IMP-00003: ORACLE error 1435 encountered
    ORA-01435: user does not exist"
    Issue 2)
    If i use following command
    imp dmuser_02/dmuser_02@bnhpdb11_o11ut03.world file=dmpersist.dmp fromuser=SYS touser=dmuser_02 ignore=y
    I get error
    import done in US7ASCII character set and UTF8 NCHAR character set
    import server uses UTF8 character set (possible charset conversion)
    Import terminated successfully without warnings.
    Any info/pointers/help
    from
    nayeem

    Issue 1)
    The command i am using is
    imp dmuser_02/dmuser_02@bnhpdb11_o11ut03.world
    file=dmpersist.dmp full=y ignore=y
    . importing DMPERSIST's objects into DMPERSIST
    IMP-00003: ORACLE error 1435 encountered
    ORA-01435: user does not exist"Make sure user DMPERSIST exists. Oracle will not create user for you because it looks like this dump file is not from full expor but a schema level export.
    >
    Issue 2)
    If i use following command
    imp dmuser_02/dmuser_02@bnhpdb11_o11ut03.world
    file=dmpersist.dmp fromuser=SYS touser=dmuser_02
    ignore=y
    I get error
    import done in US7ASCII character set and UTF8
    NCHAR character set
    import server uses UTF8 character set (possible
    charset conversion)
    Import terminated successfully without warnings.
    No issue here. The message looks totally normal.

  • [ ORACLE 10g ] : HELP ! - Error while exporting a schéma

    Hi,
    I want to export all my schemas from my Oracle 10.2.0.30 database using :
    exp userid=%myschema%/%password%@%sid% file=%filename%.dmp log=%filename%.logThis command line was working fine until a few weeks.
    Indeed, I now got errors in my log:
    Connecté à : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export fait dans le jeu de car WE8MSWIN1252 et jeu de car NCHAR AL16UTF16
    . export des actions et objets procéduraux de pré-schéma
    EXP-00008: Erreur ORACLE 4063 rencontrée
    ORA-04063: package body "SYS.DBMS_REPCAT_UTL" comporte des erreurs
    ORA-06508: PL/SQL : unité de programme nommée : "SYS.DBMS_REPCAT_UTL" introuvable
    ORA-06512: à "SYS.DBMS_REPCAT_EXP", ligne 87
    ORA-06512: à ligne 1
    EXP-00083: Le problème précédent s'est produit lors de l'appel à SYS.DBMS_REPCAT_EXP.schema_info_exp
    . export des noms de bibliothèque de fonctions étrangères pour l'utilisateur XXXXXXXXXXXXXXX       
    . export des synonymes de type PUBLIC
    . export des synonymes de type PRIVATE
    . export des définitions de type d'objet pour l'utilisateur XXXXXXXXXXXXXXX       
    Prêt à exporter les objets XXXXXXXXXXXXXXX       ...
    . export des liens de base de données (DATABASE LINKS)
    . export des numéros de séquence
    . export des définitions de cluster
    . Prêt à exporter les tables XXXXXXXXXXXXXXX        ... via le chemin classique...
    . . export de la table            XXXXXXXXXXXXXXX       149 lignes exportées         <
    . export des synonymes
    . export des vues
    . export des procédures stockées
    . export des opérateurs
    . export des contraintes d'intégrité référentielle
    . export des déclencheurs
    . export des types d'index
    . export des index bitmap, fonctionnels et extensibles
    . export des actions post-tables
    . export des vues matérialisées
    . export des journaux de clichés
    . export  des files d'attente de travaux
    . export des groupes de régénération et fils
    . export des dimensions
    . export des actions et objets procéduraux de post-schéma
    EXP-00008: Erreur ORACLE 4063 rencontrée
    ORA-04063: package body "SYS.DBMS_REPCAT_UTL" comporte des erreurs
    ORA-06508: PL/SQL : unité de programme nommée : "SYS.DBMS_REPCAT_UTL" introuvable
    ORA-06512: à "SYS.DBMS_REPCAT_EXP", ligne 87
    ORA-06512: à ligne 1
    EXP-00083: Le problème précédent s'est produit lors de l'appel à SYS.DBMS_REPCAT_EXP.schema_info_exp
    . export des statistiques
    Export terminé correctement avec des avertissements.Therefore, I'm not really confident to drop the schema...
    *==> Is it bad?*
    *==> Can I trust what's been exported despite the errors?*
    Thanks gurus for you answers.
    JM

    Well, it worked but know I get :
    . export des numÚros de sÚquence
    . export des dÚfinitions de cluster
    EXP-00056: Erreur ORACLE 932 rencontrÚe
    ORA-00932: types de donnÚes incohÚrents ; attendu : BLOB, CLOB ; obtenu : CHAR
    EXP-00000: ProcÚdure d'export terminÚe avec erreurSorry for the french log but I don't know how to get it in english.
    JM

  • Problem importing to Oracle XE 10.2.0.1.0

    Hello people...
    I have a Personal Oracle 9i ver. 9.2.0.1.0 in one machine and an Oracle XE ver. 10.2.0.1.0 in the other.
    I am using the exp utility of Oracle 9i with command line exp userid=user/pass owner=user file=file1.dmp
    and get the following output...
    Connected to: Personal Oracle9i Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Export done in EL8ISO8859P7 character set and AL16UTF16 NCHAR character set
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user USER
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user USER
    About to export USER's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export USER's tables via Conventional Path ...
    . . exporting table TABLE1 104789 rows exported
    . . exporting table TABLE2 961 rows exported
    . . exporting table TABLE3 0 rows exported
    . . exporting table TABLE4 133 rows exported
    . . exporting table TABLE5 7 rows exported
    . . exporting table TABLE6 879 rows exported
    . . exporting table TABLE7 3 rows exported
    . . exporting table TABLE8 11 rows exported
    . . exporting table PS_TXN 5 rows exported
    . . exporting table TABLE9 1647 rows exported
    . . exporting table TABLE10 0 rows exported
    . . exporting table TABLE11 77 rows exported
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully without warnings.
    Everything seems ok so I go to Oracle XE, run after installation the catalog.sql script to enable import and i run imp using the following syntax:
    imp user/pass full=y file=file1.dmp
    and i get the following output:
    Export file created by EXPORT:V09.02.00 via conventional path
    import done in EL8ISO8859P7 character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)
    and when it starts to import it brings up a message for every VARCHAR2 field i have in a table
    IMP-00019: Row rejected due to ORACLE error 12899
    IMP-00003: ORACLE error 12899 encountered
    ORA-12899: value too large for column USER.TABLE.FIELD (actual: 6, maximum: 4)
    In Oracle 9i the field is VARCHAR2(4) but for some reason the IMP utility in Oracle XE reads it as VARCHAR2(6)... Anyway I can fix that?
    PS. The user in Oracle XE has all the rights enabled...
    Thanx for your time and effords,
    Nikos
    Edited by: Nikolas_S on 10 Αυγ 2009 5:34 πμ

    Nikolas_S wrote:
    Hello people...hi Nik,
    Export file created by EXPORT:V09.02.00 via conventional path
    import done in EL8ISO8859P7 character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)the errors you recived and the above info suggests that you are going through very common situation which usually manifests in this way when importing
    data which originated from the database that have single byte characer set and is trying to be imported in the database that has multi-byte character set.
    There are several general suggestions for resolving this, currently i can think of the one that is saying to resize a column to a higher value for the table which is causing import to fail.
    There are several notes about this at metalink and some good to know informations at [tahiti.oracle.com|http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch11charsetmig.htm#i1005993]
    Thanx for your time and effords,
    Nikoscheers and good luck

Maybe you are looking for

  • Material master upload using BAPI...

    Helo SDNers, I am trying to upload material master using BAPI. data :  begin of t_mat occurs 0,         material type matnr,             " Material - MATNR         ind_sec type mbrsh,              " Industry sector  - MBRSH         mat_typ type mtart

  • Sender AS2 adapter

    Hello All, i am doing scenario where edi document from external party goes into sap system as an idoc (i.e. edi to idoc scenario). i done all configuration party. when i am testing my interface through configuration test it is working successfully. b

  • Where to Synchronize Struts 1.1

    Hello, I need to thread safe a very basic struts app (1.1 so not ingherently thread safe). It get user info and inserts it into a db, but there are sessions involved. The app uses two model classes, users and orders, each with getters and setters tha

  • What happens after a CORBA object is destroyed?

    Hi, How do we get to know when the object gets destroyed? What happens if I try to reference it after it gets destroyed? Thanks.

  • Mods, please, do visit and comment

    All Mods, I don't know how many and how mods operate here, but if you see number of useful replies by Moderators in 3000 notebook forum during last week, customers tend to feel estranged. There are many issues which only Mods can understand, answer o