Use of nvarchar field in a Unicode database

Hi,
I'm using an application (SPI) where, in the manual of this application, is clearly stated under the chapter to create the Oracle database:
i. Under Database Character Set, select Use Unicode (AL32UTF8).
ii. Under National Character Set, select AL16UTF16 (the default).
Then, in the latest version of SPI all varchar fields where changed to nvarchar fields.
Now I'm wondering what the advantage could be of this setup.
In a Unicode database, I can already store any international character set in a varchar field, so why would they use nvarchar?
I do see the disadvantage, because in various SQL's against this database I get ORA-12704 (Character set mismatch errors) when using
select
tag from ..
union
select '-' from ... instead I have to add a cast
select
tag from ..
union
select cast('-' as nvarchar2(1)) from ...

Now I'm wondering what the advantage could be of this setup.Hard to say but plenty of disadvantages.
See [url https://forums.oracle.com/forums/thread.jspa?threadID=2302983#9955254]Dear Gurus: Can u pls explain the difference between VARCHAR2 & NVARCHAR2??

Similar Messages

  • Nvarchar fields using Transparent Gateway for MS SQL

    We are using TG to make a number of tables/views available in an Oracle database. The tables in question contain a number of nvarchar fields which are expected to contain Unicode data. These fields cause a number of problems when accessed in Oracle. Firstly, queries returning any nvarchar(x) (for some x) fields hang when they are run in Oracle and it is necessary to reset the connection before running another query! Fields with type nvarchar(max) do come through, however they come through as type LONG, which is very difficult to do anything useful with in Oracle and cannot be searched on.
    We are working around the problem by creating views in MS SQL on top of our original tables/views which cast nvarchar(x) to varchar(x). We are then able to query these new views in Oracle, search on text fields etc. However, MS SQL does not properly support UTF-8 in varchar fields and the conversion results in downgrading our data to the latin-1 character set. Note casting nvarchar(x) to nvarchar(max) in MS SQL does not work, the queries still hang. We also have a problem where the length of the nvarchar field in MS SQL is longer than the max supported varchar2 length in Oracle. In this case TG will again provide a LONG converted field.
    We would like to know how to get full Unicode data to come across Transparent Gateway. We would be happy to get our data in the Oracle nvarchar2 type, or varchar2 with utf8 would also be fine, ideally with clob/nclob for over-length fields. Alternatively any solution which allows us to access full Unicode data would probably be acceptable. We only need to query the data from inside one ETL package, which will store the transformed data in Oracle, so a solution which involves a cast at this stage would also be acceptable, although obviously having the data show up correctly directly through TG would be better.

    Heya,
    Here is an example table in SQL Server:
    CREATE TABLE [dbo].[tblPnLCostNames](
         [ID] [int] IDENTITY(1,1) NOT NULL,
         [Name] [nvarchar](2048) NOT NULL,
         [Group] [nvarchar](50) NULL,
          [nvarchar](50) NULL,
         [Description] [nvarchar](1024) NULL,
    CONSTRAINT [PK_tblPnLCostNames] PRIMARY KEY CLUSTERED
         [ID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    And in Oracle I did this:
      CREATE TABLE "FOR_DW_DEV01"."UNICODE_COST_TEST"
       (     "ID_" NUMBER,
         "NAME_" LONG,
         "GROUP_" VARCHAR2(50 CHAR),
         "CODE_" VARCHAR2(50 CHAR),
         "DESCRIPTION_" VARCHAR2(1024 CHAR)
    Now I want to be able to say:
    insert into unicode_cost_test ( id_, name_, group_, code_, description )
    select "ID", to_lob( "Name" ), "Group", "Code", "Description" from tblPnlCostNames@my_link;
    The other fields are shorter and will go straight in to varchar2 fields as UTF-8 with no problems following some tweaks to the gateway ini file. Anything over 2000 characters comes across as a LONG, but trying to use the to_lob function results in "ORA-00997: illegal use of LONG datatype". Doing the same thing using a local table with a LONG field as the source works fine. Is to_lob supposed to work on LONG fields that come across the gateway?
    I found this in the 11.2.0.2.2 bugfix list:
    10157402 - lob segment has null data after long to lob conversion in parallel mode
    (ftp://ftp.hj.se/Oracle/Patchar/11.2.0.2/psu_april_2011/download.htm#BABDIEDD)
    Could this be related?
    The only way I have found to read the LONG fields so far that works is to use select into, and read each value individually!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • A record selection problem with a string field when UNICODE database

    We used report files made by Crystal Reports 9 which access string fields
    (char / varchar2 type) of NON-UNICODE database tables.
    Now, our new product needs to deal with UNICODE database, therefore,
    we created another database schema changing table definition as below.
    (The table name and column name are not changed.)
        char type -> nchar type
        varchar2 type -> nvarchar2 type
    When we tried to access the above table, and output a report,
    the SQL statement created from the report seemed to be wrong.
    We confirmed the SQL statement using Oracle trace function.
        SELECT (abbr.) WHERE "XXXVIEW"."YYY"='123'.
    We think the above '123' should be N'123' because UNICODE string
    is stored in nchar / nvarchar2 type field.
    Question:
    How can we obtain the correct SQL statement in this case?
    Is there any option setting?
    FYI:
    The environment are as follows.
        Oracle version: 11.2.0
        ODBC version: 11.2.0.1
        National character set: AL16UTF16

    With further investigating, we found patterns that worked well.
    Worked well patters:
        Oracle version: 11.2.0
        ODBC version: 11.2.0.1
        National character set: AL16UTF16
        Report file made by Crystal Reports 2011
        Crystal Reports XI
    Not worked patters:
        Oracle version: 11.2.0 (same above)
        ODBC version: 11.2.0.1 (same above)
        National character set: AL16UTF16 (same above)
        Report file made by Crystal Reports 2011 (same above)
        Crystal Reports 2008 / 2011
    We think this phenomenon is degraded behavior of Crystal Reports 2008 / 2011.
    But we have to use the not worked patters.
    Anything wrong with us? Pls help.
    -Nobuhiko

  • How to update field values in a database table using module pool prg?

    hi
    how to update field values in a database table using module pool prg?
    we created a customized table, and we put 2 push buttons in screen painter update and display.
    but update is not working?
    data is enter into screen fields and to internal table, but it is not updated in database table.
    thanks in adv
    vidya

    HI,
    we already used the update statement. but its not working.
    plz check this.
    *& Module Pool       ZCUST_CALL_REC
    PROGRAM  ZCUST_CALL_REC.
    TABLES: ZCUST_CALL_REC,ZREMARKS.
    data:  v_kun_low like ZCUST_CALL_REC-kunnr ,
           v_kun_high like ZCUST_CALL_REC-kunnr,
           v_bud_low like ZCUST_CALL_REC-budat,
           v_bud_high like ZCUST_CALL_REC-budat.
    ranges r_kunnr for ZCUST_CALL_REC-kunnr  .
    ranges r_budat for zcust_call_rec-budat.
    DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
          JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
    *data:begin of itab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of itab.
    *data:begin of Jtab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of Jtab.
    CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
    CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
    *start-of-selection.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'ENQUIRY'.
    perform multiple_selection.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9001'.
    WHEN 'UPDATE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
          perform update on commit.
    WHEN 'DELETE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE STATUS_9000 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE USER_COMMAND_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    endcase.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
          text
    MODULE STATUS_9001 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    move itab-MANDT   to zcust_call_rec-MANDT.
    move itab-kunnr   to zcust_call_rec-kunnr.
    move itab-budat   to zcust_call_rec-budat.
    move itab-code    to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9002  INPUT
          text
    module  USER_COMMAND_9002 input.
    CASE sy-ucomm.
       WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
          LEAVE SCREEN.
          CLEAR sy-ucomm.
       WHEN 'UPDATE'.
             perform move_data.
         UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
            IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
            ENDIF.
      WHEN 'DELETE'.
             perform move_data.
             DELETE ZCUST_CALL_REC FROM TABLE ITAB.
              IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
            ENDIF.
    endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    *&      Module  STATUS_9002  OUTPUT
          text
    module STATUS_9002 output.
      SET PF-STATUS 'ZCUSTOMER1'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_9002  OUTPUT
    *&      Module  update_table  OUTPUT
          text
    module update_table output.
         move itab-MANDT   to zcust_call_rec-MANDT.
         move itab-kunnr   to zcust_call_rec-kunnr.
         move itab-budat   to zcust_call_rec-budat.
         move itab-code    to zcust_call_rec-code.
         move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    endmodule.                 " update_table  OUTPUT
    ***Selection Data
    FORM SELECT_DATA.
    SELECT  mandt kunnr budat code remarks  FROM zcust_call_rec INTO
                            table itab
                             WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
    ENDFORM.
    ****append vendor code
    FORM APPEND_CUSTOMER_CODE.
    clear r_kunnr.
    clear itab.
    clear r_budat.
    refresh r_kunnr.
    refresh itab.
    refresh r_kunnr.
    IF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                  EXPORTING
                                      input         = v_kun_high
                                  IMPORTING
                                      OUTPUT        = r_kunnr-high.
                     r_kunnr-option = 'BT'.
                     r_kunnr-sign = 'I'.
                     append r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
          PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        IF SY-SUBRC = 0.
                             MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
                              CALL SCREEN '9000'.
                        ENDIF.
    PERFORM V_BUDAT.
    ENDIF.
    ENDFORM.
    FORM V_BUDAT.
    IF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'BT'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-HIGH = v_bud_HIGH.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
              ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                   IF SY-SUBRC = 0.
                       MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
                      CALL SCREEN '9000'.
                    r_budat-low = ''.
                    r_budat-option = ''.
                    r_budat-sign = ''.
                    ENDIF.
            ENDIF.
    ENDFORM.
    *&      Form  update
          text
    -->  p1        text
    <--  p2        text
    form update .
    commit work.
    endform.                    " update
    *&      Form  move_data
          text
    -->  p1        text
    <--  p2        text
    form move_data .
       clear itab.
      refresh itab.
           move-corresponding  zcust_call_rec to itab.
           MOVE ZCUST_CALL_REC-MANDT   TO ITAB-MANDT.
           MOVE ZCUST_CALL_REC-KUNNR   TO ITAB-KUNNR.
           MOVE ZCUST_CALL_REC-BUDAT   TO ITAB-BUDAT.
           MOVE ZCUST_CALL_REC-CODE    TO ITAB-CODE.
           MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
         APPEND ITAB.
         delete itab where kunnr is initial.
    endform.                    " move_data
    thanks in adv
    vidya

  • How can I use a subsummary field in a calcultaion field in a database ???

    how can I use a subsummary field in a calcultaion field in a database???? I need to use the average I get in my sorted records to make another calculation. Can this be done???
    powerbook G4   Mac OS X (10.4.8)  

    Calculation fields work with data that is contained in a single record.
    Summary fields use data from the same field(s) in a range of records.
    Summary field results can't be used in further calculations.
    You may be able to define a summary field to include the average AND the further calculation that you need, but only if you do not want the results to be placed into a particular record or records.
    A detailed description of the data you want to use and the result you want to achieve might lead to some ideas on whether it can be done, and how to do it.
    Regards,
    Barry

  • How to use a parameter field value as a substring in a "like" statement?

    Hi all,
    I'm trying to use a parameter field in a Record selection formula where the parameter field value would be a substring of the data stored in the field.
    My parameter field (SlctResearcher) is constructed as follows:
    Type: string
    List of Values: static
    Value Field: (Reports) RptAuthors
    (in Value Options) Allow custom values?: True
    {Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
    {Reports.RptAuthors} like "*{?SlctResearcher}*"
    When I hit F5 to generate the data, I get no results (and the parameter prompt field does not even come up...)
    If I modify the formula to put a hard-coded string, like
    "*Jones*"
    after the 'like', I get results (all the reports where "Jones" is a substring in the RptAuthors string.) If I modify the formula to just use the parameter field without the quotes/stars like:
    {Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
    {Reports.RptAuthors} like {?SlctResearcher}
    I do get the parameter prompt field, but still no results even if I put in a valid substring value (since it is not searching for a substring anymore...)
    How can I do this?
    Thanks,
    Will

    1st thing... Make a copy of your report before doing anything!!!
    To use a SQL Command, you'll want to open the Database Expert and look at the Current Connections. Expand the data source and the 1st option you see is the Add Command option.
    To find the SQL That CR is currently using, choose Database from the menu bar and select Show SQL Query...
    You can copy this and paste it directly into the command window. (If you you can write your own SQL you don't need copy CR's, it's just an option.)
    You'll also want to take not of any parameters that you have, you'll need to add them the the Parameter List of the command as well... be sure to spell them EXACTLY as they are in the design pane.
    Anyway, once the SQL statement is in the Command window you'll be able to alter the WHERE clause to use the wild cards.
    For future reference... What type of database are you reporting against???
    Jason

  • Peoplesoft convert Oracle non-unicode database to unicode database

    I am following doc 1437384.1 to convert a Peoplesoft database from non-unicode database to unicode database
    I use the following export statement (as user PS)
    SET NO TRACE;
    SET OUTPUT output_file.dat;
    SET NO DATA;
    EXPORT *;
    And the following import statement (as user sysadm)
    SET NO TRACE;
    SET NO DATA;
    SET INPUT output_file;
    SET LOG log_file;
    SET UNICODE ON;
    SET STATISTICS OFF;
    SET ENABLED_DATATYPE 9.0;
    IMPORT *;
    Before I do the datapump import, I am comparing the objects
    SQL> select object_type, count(*) from dba_objects where owner = 'SYSADM' group by object_type order by 1 asc;
    OBJECT_TYPE COUNT(*)
    INDEX 33797
    LOB 2775
    TABLE 28829
    TRIGGER 9
    VIEW 21208
    on oracsc63 (targetdb):
    SQL> select object_type, count(*) from dba_objects where owner = 'SYSADM' group by object_type order by 1 asc;
    OBJECT_TYPE COUNT(*)
    INDEX 23748
    LOB 2170
    TABLE 19727
    I don't have the same number of object. When I do the import this means that around 10000 tables will not have the UTF-8 format.
    Any ideas how I can solve this? How has experience with this peoplesoft conversions?

    Hello Jacques,
    please check sapnote #808505 (Secondary connection to Oracle DB w/ different character set).
    Regards
    Stefan

  • ASP & Clob fields in the Oracle Database 8i

    Hi All,
    This is the first time I am posting a question. We are having a problem interfacing ASP pages with Clob fields int he Oracle Database.
    We are trying to display clob fields in an oracle database from ASP PAge. The ASP Page does a select to a clob field from a table. But we lose the formatting od the data inside the clob field when we display it out using ASP. We display it as a
    single stream of data. But when we display the clob using SQLPLUS we do see the formatted data.
    How can we solve this issue or circumvent it ?
    We are not looking to parse through the clob field in ASP, rather we already have a stored procedure that parses the data for us. The parsed data is then stored in a clob field already formatted the way we need it. The problem occurs when the ASP
    page reads the clob field. The ASP page reads it as one continuos string instead of the formatted data that exists in the clob field.
    I imported the data from Oracle to Access in order to view the raw data. The data is shown formatted properly in Access, so we know our stored procedure is doing what it supposed to do. As far as getting the data to display. The only way to retrieve (as far as I know) a clob field using ASP is by a built in function called GetChunk(). Is there a better method of displaying the formatted data aside from parsing on the client side, using ASP?
    Let me know if anyone has a solution to this problem.
    Thanks for your help and time. Sanjiv.

    Sanjiv, you might want to try some of the Windows development forums:
    ODBC: http://forums.oracle.com/forums/forum.jsp?id=763957
    New .NET provider forum: http://forums.oracle.com/forums/forum.jsp?id=1015160
    Oracle Objects for OLE: http://forums.oracle.com/forums/forum.jsp?id=763961
    Oracle Provider for OLE DB: http://forums.oracle.com/forums/forum.jsp?id=763961
    Oracle Services for MTS: http://forums.oracle.com/forums/forum.jsp?id=763960
    You'll reach a more appropriate audience than just the Web services audience.
    Mike.

  • Oracle Text Indexing performance in Unicode database

    Forum folks,
    I'm looking for overall performance thoughts in Text Indexing within a Unicode database. Part of our internal testing suites includes searching on values using contains filters over indexed binary and text documents. We've architected these tests such that they could be run in a suite or on their own, thus, the data is loaded at the beginning of each test and then the text indexes are created and populated prior to running any of the actual testing.
    We have the same tests running on non-unicode instances of Oracle 11gR2 just fine, but when we run them against a Unicode instance, we are almost always seeing timing issues where the indexes haven't finished populating, thus our tests are saying we've only found n number of hits when we are expecting n+ 50 or in some cases n + 150 records to be returned.
    We are just looking for some general information in regards to text indexing performance in a unicode database. Will we need to add sleep time to the testing to allow for the indexes to populate? How much time? We would rather not get into having to create different tests for unicode vs non-unicode, but perhaps that is necessary.
    Any insight you could provide would be most appreciated.
    Thanks in advance,
    Dan

    Roger,
    Thanks much for your quick reply...
    When you talk about Unicode, do you mean AL32UTF8?
    --> Yes, this is the Unicode charset we are using.
    Is the data the same in both cases, or are you indexing simple 7-bit ascii data in the one database, and foreign text (maybe Chinese?) in the UTF8 database?
    With the same data, there should be virtually no difference in performance due to the AL32UTF8 database character set.
    --> We have a data generation tool we utilize. For non-unicode data, we generate using all 256 characters in the ISO-8859-1 set. With our Unicode data for clobs, we generate using only the first 1,000 characters of UTF8 by setting up an array of code points...0 - 1000. For Blobs, we have sets of sample word documents and pdfs that are inserted, then indexed.
    I'm not sure I understand your testing methodology. Do you run ( load-data, index-data, run-queries ) sequentially?
    --> That is correct. We utilize the ctx_ddl package to populate the pending table and then to sync the index....The following is an example of the ddl we generate to create and populate the index:
    create index "DBMEARSPARK_ORA80"."RESRESUMEDOC" on "DBMEARSPARK_ORA80"."RESUME" ("RESUMEDOC") indextype is CTXSYS.CONTEXT parameters(' nopopulate sync (every "SYSTIMESTAMP + INTERVAL ''30'' MINUTE" PARALLEL 2) filter ctxsys.auto_filter ') PARALLEL 2;
    execute ctx_ddl.populate_pending('"DBMEARSPARK_ORA80"."RESRESUMEDOC"',null);
    execute ctx_ddl.sync_index('"DBMEARSPARK_ORA80"."RESRESUMEDOC"',null,null,2);
    If so, there should be no way that the indexes can be half-created. If not, don't you have some check to see if the index creation has finished before running the query test?
    --> Excellent question....is there such a check? I have not found a way to do that yet...
    Were you just lucky with the "non-unicode" tests that the indexing just happened to have always finished by the time you ran the queries?
    --> This is quite possible as well. If there is a check to see if the index is ready, then we could add that into our infrastructure.
    --> Thanks, again, for responding so quickly.
    Edited by: djulson on Feb 12, 2013 7:13 AM

  • Problem about using Oracle Form 6i to connect Oracle Database 10g express.

    Sorry to interrupt all of you.
    I have encountered a problem about using Oracle Form 6i to connect Oracle Database 10g express.
    As I would like to
    I use Oracle Net8 Easy Config to create a connection.
    According to "tnsnames.ora", the paramater of connection is as follows;
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA = (SID = XE))
    Unfortunately, when I use Oracle Net8 Easy Config to test the connection, an error message is prompted as follows:
    Connecting....
    The test did not succeed.
    ORA-03106: fatal two-task communication protocol error
    There may be an error in the fields entered
    or the server may not be ready for a connection.
    You can check the server and retry, or continue.
    After I google it, I still have no idea how to solve the problem. I would like to ask, could anyone mind providing some hints or solution to address the issues.
    Thanks for your assistance in advance.

    I don't believe the Net8 Easy Config (NEC) will create a compatible entry in the tnsnames.ora. I have Forms 6i running successfully against a 10g Express database, but I did not use the NEC - I created the entry myself. Here is the entry I use:
    XE=
      (DESCRIPTION=
        (ADDRESS=
          (PROTOCOL=TCP)
          (HOST=<<servername or IP address>>)
          (PORT=1521)
        (CONNECT_DATA=
          (SERVER=dedicated)
          (SERVICE_NAME=XE)
      )Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Data errors/changes in unicode database Once all code is unicode compliant

    Hi All,
    This is regarding unicode project.
    We have currently made all the programs unicode complaint
    and the database we are using is not unicode database.
    We are moving now the entire code to the Unicode database system.
    1>Could anyone tell what kind of data errors that might be encountered due to this new database system.
    2>What kind of data changes regarding the format/data we might observe in the output files generated.
    Any expertise and experiences in the similar upgradation will be very helpful..
    Thank you all in advance

    Hi Kumar,
    each code page encodes characters into a binary representation. ASCII is may be the best known. It encode 128 characters with seven bits. The first 32 characters are control characters for printers and terminals like carriage return and bell. Then there are some special characters like Space and Comma followed by digits and the characters of the roman alphabet in upper case and lower case representation. Unicode is another code page which is defined in unicode standard documentation. Because unicode characters are wider than one byte (the current standard contains almost 100.000 characters) there are different encoding used in applications. The most used encoding is probably UTF-8 which is used by DB2 and Oracle. MaxDB uses UTF-16 which uses much more space for most used characters. Languages use characters from a code page to build words. You may have multiple code pages in one system (MDMP) or a unicode system which supports all languages on a single code page.
    I hope this help you to understand the difference between a code page and a language. May be you check out the links [http://www.asciitable.com|http://www.asciitable.com] and [http://unicode.org|http://unicode.org].
    Best regards
    Ralph

  • Adding new constant value to an 'enum' used in a field causes an exception

    We are using the DPL. I added a new constant to an enum that is used as a field on an entity called Booking (this field is not a key). This seems to cause an exception during onForeignKeyDelete when we delete an object from a related entity. The constraint is a "NULLIFY" on a "MANY_TO_ONE" relationship, so the effect should be just to nullify the Booking foreign key, but for some reason the fields are being checked and causing this exception. Shouldn't it be possible to add a new constant value to an enum without having to do some sort of migration? The stack is below. Note that the two types mentioned in the exception message are in fact the same (this is the enum). For the moment we can truncate our database, because we are still in development, but this would present a problem in production.
    IllegalArgumentException: Not a subtype of the field's declared class com.chello.booking.model.BookingStatus: com.chello.booking.model.BookingStatus
    at com.sleepycat.persist.impl.RawAbstractInput.checkRawType(RawAbstractInput.java:142)
    at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:75)
    at com.sleepycat.persist.impl.RawAccessor.writeField(RawAccessor.java:232)
    at com.sleepycat.persist.impl.RawAccessor.writeNonKeyFields(RawAccessor.java:148)
    at com.sleepycat.persist.impl.ComplexFormat.writeObject(ComplexFormat.java:528)
    at com.sleepycat.persist.impl.PersistEntityBinding.writeEntity(PersistEntityBinding.java:143)
    at com.sleepycat.persist.impl.PersistKeyCreator.nullifyForeignKeyInternal(PersistKeyCreator.java:170)
    at com.sleepycat.persist.impl.PersistKeyCreator.nullifyForeignKey(PersistKeyCreator.java:137)
    at com.sleepycat.je.SecondaryDatabase.onForeignKeyDelete(SecondaryDatabase.java:1082)
    at com.sleepycat.je.ForeignKeyTrigger.databaseUpdated(ForeignKeyTrigger.java:37)
    at com.sleepycat.je.Database.notifyTriggers(Database.java:2016)
    at com.sleepycat.je.Database.deleteInternal(Database.java:800)
    at com.sleepycat.je.Database.delete(Database.java:714)
    at com.sleepycat.persist.BasicIndex.delete(BasicIndex.java:133)
    at com.sleepycat.persist.PrimaryIndex.delete(PrimaryIndex.java:206)
    at com.sleepycat.persist.BasicIndex.delete(BasicIndex.java:124)
    at com.sleepycat.persist.PrimaryIndex.delete(PrimaryIndex.java:206)
    Kind regards
    James Brook

    James,
    I've started investigating this and at first look it does appear to be a DPL bug. Over the next few days I'll look more deeply and report back here with what I find. If it is indeed a bug, we'll fix this for the next JE 4.0.x release and I'll make the fix available to you.
    You are correct that adding enum values is allowed without a conversion of any kind. The only change you should have to make, other than adding the enum value, is to bump the version of the containing entity in the @Entity annotation. I'm suspect you've already done that, but if you hadn't, it wouldn't cause the problem you're seeing.
    We have tested the addition of enum values, but not in combination with foreign key deletion and the NULLIFY constraint, I'm afraid.
    If I'm correct about it, the bug is specific to adding enum values and deleting a secondary key with the NULLIFY constraint, prior to re-writing the entity in some other way. So if the entity is updated (written) before the secondary key is deleted, then the problem should not occur. Therefore, one workaround is to call EntityStore.evolve after adding the enum value, and before using the store in other ways.
    Thanks for reporting this, and I hope this is not blocking your development.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Errors while performing non-Unicode database export

    Hi,
    I am exporting of a non-unicode database (to perform a unicode conversion). The export has completed without any problems, but I frequently got the following messages in logfile.
    Error 1- UMGCOMCHAR read check skip, no data found; probably old SPUMG
    Error 2- enviornment variable I18N_POOL_WIDTH is not set. Checks are active
    Error 3- I18N_NAMETAB_TIMESTAMPS not in env: checks are ON (Note 738858)
    My query is that
    1- Are these above 3 errors an issue.
    2- When I import already exported files into a unicode database, will it cause any problem or loss of data.
    3- What is the fix to this issue.
    Points to be awarded for any kind of small help.
    Thanks

    Depending on the data that you have in your non-unicode database, potentially data expansions or data loss may occur.
    Data expansions
    For example, a 1 byte character in a VARCHAR2(1) column may expand to 2 bytes or 3 bytes in a Unicode (UTF8) database; hence you may need to re-define you scheme prior to importing the data into your new Unicode database.
    Data Loss
    This happens only if you have invalid characters inside your non-unicode database. For example, you may have some 8-bit non-ASCII characters inside your US7ASCII database, during export these characters will be converted to some replacement characters (?).
    However you can use the character set scanner (csscan) to scan your source database to detect both of the above scenarios. Please visit the Globalization Support section of OTN for more info - http://technet.oracle.com/tech/globalization/content.html
    Regards
    Nat

  • "get info" not recalculating "size" field in iTunes XML database correctly

    I have updated some of my mp3 files directly in the iTunes directory. The update changed from CBR to VBR at a higher bit rate. I selected the files and used 'get info' to update the iTunes database with the new bit rate information, which seemed to work fine. The resulting update works fine on the 1G nano, the 3G nano and the 1G iPod (yes, 1G!), but does not work on the iPod 5G (Video 80Gb). On the 5G iPod the changed songs will play for about a minute, then jump to the end of the song.
    After much investigation, I found that deleting the song from iTunes and re-adding it solved the problem. When I examined the iTunes database had a different value for the size field. It went from
    <key>Size</key><integer>4969036</integer>
    to
    <key>Size</key><integer>4967106</integer>
    There are other changes, but this seems to be the most significant.
    Is there any way to force iTunes to re-calculate this field?
    Thanks,
    Jonathan
    PS I will post this on the iPod forum as well.

    My own experience with truncated songs on the iPod is that I flag them when they happen. When I get back to iTunes, I resync and pull up the recently played and find those songs. Note the time, which is usually shown as the abbreviated version. If I then double click them to play, iTunes will normally update the time to the correct time. Resyncing to the iPod fixes the problem.
    Oh I should mention that I give truncated songs on my iPod a 3-star rating as a tag. So after I "re-play" the song on iTunes to fix the time, I then change the rating back to no-stars. So this also forces an update back to the iPod. So you might have to tweak something after fixing the time to get it to reupdate back to the iPod.
    Patrick

  • Unicode datatypes v.s. unicode databases

    We have a legacy system that is implemented in Powerbuilder and C++. We are pretty sure about which columns we need to convert to support Unicode. Besides, some of our clients have cooperate standard (AMERICAN_AMERICA.WE8MSWIN1252) for the NLS_LANG on the Oracle clients set up, .
    Therefore, we decided to use the unicode datatypes approach to only update the columns identified to NVARCHAR2 and NCLOB with AL16UTF16 as the national character set. Our understanding is that this is the safe and easy way for our situation since both C++ and Powerbuilder support UTF-16 standard as default. This will not require any change on the NLS_LANG set up.
    However, one of our clients seems to have strong opinions against the unicode datatypes option and would rather migrating the entire database to be Unicode. The client mentioned that "AL16UTF16 has to be used in a Unicode database with UTF8 or AL32UTF8 as the database character set in order to display characters correctly". To our knowledge and understanding we have not heard about this requirement. I didn't see anything like this in Oracle official document.
    Could anyone advise if Unicode database is really better than Unicode datatype option?
    Thanks!

    Besides, some of our clients have cooperate standard
    (AMERICAN_AMERICA.WE8MSWIN1252) for the NLS_LANG on
    the Oracle clients set up, . This might even be necessary requirement since they are using Windows-1252 code page.
    that "AL16UTF16 has to
    be used in a Unicode database with UTF8 or AL32UTF8
    as the database character set in order to display
    characters correctly".Hard to say without knowing what they refer to specifically.
    They might have been thinking about the requirement to use AL32UTF8, depending on how binds are done. If you insert string literals, which is interpreted in the database character set, into NCHAR columns, you obvisouly need a character set that supports all characters you are going to insert (i.e. AL32UTF8 in unicode case).
    This is described very clearly by Sergiusz Wolicki, in Re: store/retrieve data in lang other than eng when CHARACTERSET is not UTF8.

Maybe you are looking for