How to avoid:Query returns extra trailing spaces in oracle 10g

I want to use cursor sharing FORCE, SIMILAR for performance tuning. but i am having some problems like query process will give extra trailing spaces this will throw errors from the java application while reading literals.
do we have any option in oracle 10g to avoid extra trailing spaces during query processing ?
alter session set cursor_sharing ='EXACT'
select 1 from dual;
'1'
1
alter session set curson_sharing='FORCE'
select 2 from dual;
'2'
2
alter session set curson_sharing='SIMILAR'
select 3 from dual;
'3'
3

You are right, But we already wrote millions of queries during that time we used cursor sharing is EXACT. so i don't want to take risk in modifying all the existing queries by adding TRIM.
do we have any option in oracle to trim after/ during processing the query.
Now we are facing performance issues and suggested us to use SIMILAR as cursor_sharing. but all the selected rows are giving extra tralining spaces.
I think i am clear now.

Similar Messages

  • Please reply:how to avoid extra trailing spaces while using cursor sharing

    i am using cursor sharing with FORCE or SIMILAR.
    what is the solution to avoid extra trailing spaces without any java code change.
    do we have any option in oracle to avoid extra trailing spaces during the query processing ?
    I am using Oracle 10g
    CURSOR SHARING is a feature in which multiple sql statements
    which are same will have a shared cursor (in the library cache) for an oracle session,
    i.e, the first three steps of the sql processing (hard parse, soft parse, optimization)
    will be done only the first time that kind of statement is executed.
    There are two ways in which similar SQL statements with different condition values can be made to "SHARE" cursor during execution:
    1. Writing SQLs with Bind Variables: SQLs having no hard coded literals in them
    For e.g., the query below
    SELECT node.emp_name AS configid
    FROM emp node
    WHERE emp_no = :1
    AND dept_no =
    DECODE (SUBSTR (:2, 1, 3),
    :3, :4,
    (SELECT MAX (dept_no)
    FROM emp
    WHERE emp_no = :5 AND dept_no <= :6)
    AND node.dept_type = :7
    ORDER BY node.emp_name
    Here all the variables are dynamically bound during the execution. The ":X" represents BIND Variable and the actual values are bound to the SQL only at the 4th step of the execution of the SQL.
    In applications: The queries written with "?" as bind variables will be converted into ":X" and are sqls with Bind Variables.
    2. The CURSOR_SHARING parameter: Only Useful for SQL statements containing literals:
    For eg., the query below:
    SELECT node.emp_name AS configid
    FROM emp node
    WHERE emp_no = 'H200'
    AND dept_no =
    DECODE (SUBSTR (:1, 1, 3),
    'PLN', :2,
    (SELECT MAX (dept_no)
    FROM emp
    WHERE emp_no = :3 AND dept_no <= :4)
    AND node.dept_type = :5
    ORDER BY node.emp_name
    In the query above, there are two hard coded literals H200 , PLN. In this case when the same SQL executed with different values like (H2003 , PLN), oracle will create a new cursor for this statement and all the first three steps ( hard & soft parse and optimization plan) needs to be done again.
    This can be avoided by changing the CURSOR_SHARING parameter which can be set to any of three values:
    1. EXACT: Causes the mechanism not be used, i.e. no cursor sharing for statements with different literals. This is the default value.
    2. FORCE: Causes unconditional sharing of SQL statements that only differ in literals.
    3. SIMILAR: Causes cursor sharing to take place when this is known not to have any impact on optimization.
    So, FORCE and SIMILAR values of the parameter will be helping in cursor sharing and improve the performance of the SQLs having literals.
    But here the problem arises if we use the FORCE and SIMILAR other than EXACT.
    alter session set cursor_sharing ='EXACT'
    select 1 from dual;
    '1'
    1
    alter session set curson_sharing='FORCE'
    select 2 from dual;
    '2'
    2
    alter session set curson_sharing='SIMILAR'
    select 3 from dual;
    '3'
    3
    So, this will give extra trailing spaces in when we retrieve from java method and any
    further java processing based on the hardcoded literal values will fail. this needs lot of
    effort in remodifying the existing millions of lines of code.
    My question is i have to use cursor sharing with FORCE or SIMILAR and can't we do the trimming
    from the oracle query processing level ?
    please help me on this ?
    Message was edited by:
    Leeladhar
    Message was edited by:
    Leeladhar

    Please reply to this thread
    How to avoid extr trailing spaces using Cursor sharing opton FORCE, SIMILAR

  • How to hide the data in particular table in oracle 10g

    How to hide the data in particular table in oracle 10g
    i want steps

    If its on Report u can  always hide the column - Keyfigure or Selection - Display - Hide......y do u want to have it on the report if it is to be hided in the first place?

  • How to install NW2004s abap and/or java on Oracle 10g on SLES 10 32 bit?

    Does anyone know - How to install NW2004s abap and/or java on Oracle 10g on SLES 10 32 bit?
    Does SAP offer the software for trial for this?
    Jay

    Hi Check the link page you shall get the PDF and then goto Page 50 .you shall find the details.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3096e412-7308-2b10-4999-e16c64ce5eeb
    Thanks
    Rishi Abrol

  • CONNECT BY QUERY returns different count of rown in 10g resp. 11g databases

    Folks,
    I just spot a bellow issue in our databases.
    1.) 10g database:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from global_name;
    SQL> SELECT ROWNUM
      2    FROM   dual
      3  CONNECT BY ROWNUM <= 2;
        ROWNUM
             1
             2
             3
    SQL> 2. 11g database
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select * from global_name;
    SQL> SELECT ROWNUM
      2    FROM   dual
      3    CONNECT BY ROWNUM <= 2;
        ROWNUM
             1
             2
    SQL> As you can see in 10g above query returns 3 records, in 11g only 2.
    Why it's like that? Can it be somehow set, to produce the same output?
    Many thanks,
    Tomas

    I get correct rows on both database version !
    Oracle Versions
    10g 10.2.0.1.0
    11g 11.1.0.6.0
    SQL> select rownum from dual connect by rownum <= 2;
        ROWNUM
             1
             2
    SQL> select * from v$version ;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> select rownum from dual connect by rownum <= 2;
        ROWNUM
             1
             2
    SQL> select * from v$version ;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production

  • Same query returns differenent result sets in oracle 9i and 10g

    Could anyone please clarify the issue i am having on a query. I have query that is returning around 2000 records in oracle db 9.2.0.8.0, at the same time with same data if run on 10.2.0.1.0 is returning only 12 records.
    what might be the reason for this descrepancy, is something in 9i is considered differently in 10g?
    Here is the query.
    SELECT
    0
    ,ot_req_head.rh_sys_id
    ,ot_req_head.rh_comp_code
    ,ot_req_head.rh_txn_code
    ,ot_req_head.rh_no
    ,ot_req_head.rh_appr_uid
    ,'Action to be taken' action
    ,ot_req_head.rh_appr_dt
    ,NULL AUTH_TO_UID
    ,NULL
    ,NULL
    ,NULL from_remarks
    ,NULL
    ,NULL
    ,'REQ'
    ,ot_req_head.rh_amd_no
    ,ot_req_head.rh_amd_dt
    ,ot_req_head.rh_cr_uid
    ,DECODE(ot_req_head.rh_charge_area_num,6,ot_req_head.rh_locn_code,1,ot_req_head.rh_charge_code,NULL)
    ,ot_req_head.rh_cr_dt
    ,NULL
    FROM
    orioni.om_txn_setup,
    orioni.ot_req_head,
    iscoit.isco_txn_auth,
    SELECT DISTINCT rh_sys_id
    FROM orioni.pending_mr
    )pending_mr
    WHERE
    ot_req_head.rh_txn_code=txns_txn_code
    AND
    auth_comp_code(+)=ot_req_head.rh_comp_code
    AND
    auth_action_to_type(+) IS NULL
    AND
    auth_head_sys_id(+)=ot_req_head.rh_sys_id
    AND
    auth_txn_code(+)=ot_req_head.rh_txn_code
    AND
    ot_req_head.rh_clo_status IS NULL
    AND
    ot_req_head.rh_comp_code='001'
    AND
    txns_txnp_code='PURREQ'
    AND
    txns_values='N'
    AND
    ot_req_head.rh_appr_status=3
    AND
    ot_req_head.rh_sys_id = pending_mr.rh_sys_id
    AND NOT EXISTS
    SELECT 'X'
    FROM
    iscoit.isco_txn_auth A
    WHERE
    a.auth_head_sys_id = isco_txn_auth.auth_head_sys_id
    AND
    a.auth_action_from_uid = ot_req_head.rh_appr_uid
    AND
    a.auth_action_from_type = 'Action to be taken'
    AND
    a.auth_action_from_dt = ot_req_head.rh_appr_dt
    AND
    NVL(a.auth_txn_amend_no,0) = NVL(ot_req_head.rh_amd_no,0)
    AND
    a.auth_action_to_type = 'REJECT'
    AND
    ot_req_head.rh_cr_dt > TO_DATE('16-MAR-2008','DD-MON-YYYY')
    Edited by: unus on Oct 19, 2009 3:56 AM
    Edited by: unus on Oct 19, 2009 4:18 AM

    Here's what I got on 9i and 10G:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    SQL> CREATE TABLE T_1(VAL1 NUMBER,VAL2 VARCHAR2(10));
    Table created.
    SQL> CREATE TABLE T_2(VAL1 NUMBER,VAL2 VARCHAR2(10));
    Table created.
    SQL> INSERT INTO T_1 VALUES(1,'FIRST');
    1 row created.
    SQL> INSERT INTO T_1 VALUES(2,'SECOND');
    1 row created.
    SQL> INSERT INTO T_2 VALUES(1,'FIRST');
    1 row created.
    SQL> INSERT INTO T_2 VALUES(2,'SECOND');
    1 row created.
    SQL> INSERT INTO T_1 VALUES(3,'THIRD');
    1 row created.
    SQL> INSERT INTO T_1 VALUES(4,'FOURTH');
    1 row created.
    SQL> INSERT INTO T_1 VALUES(5,'FIFTH');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> SELECT A.VAL1,B.VAL1 FROM
      2  T_1 A,T_2 B
      3  WHERE A.VAL1=B.VAL1;
         VAL1      VAL1
            1         1
            2         2
    SQL> SELECT A.VAL1,B.VAL1 FROM
      2  T_1 A,T_2 B
      3  WHERE A.VAL1=B.VAL1(+);
         VAL1      VAL1
            1         1
            2         2
            3
            4
            5
    SQL> SELECT A.VAL1,B.VAL1 FROM
      2  T_1 A,T_2 B
      3  WHERE A.VAL1=B.VAL1(+)
      4  AND
      5  NOT EXISTS (SELECT 'X' FROM t_2 C WHERE c.val1=b.val1);
         VAL1      VAL1
            3
            4
            5
    SQL> select name, value from v$parameter where name like '%optimizer%' or name like '%cursor_sharing
    NAME                                                             VALUE
    cursor_sharing                                                   EXACT
    optimizer_features_enable                                        9.2.0
    optimizer_mode                                                   CHOOSE
    optimizer_max_permutations                                       2000
    optimizer_index_cost_adj                                         100
    optimizer_index_caching                                          0
    optimizer_dynamic_sampling                                       1
    -- 10G
    Verbonden met:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> SELECT A.VAL1,B.VAL1 FROM
      2  T_1 A,T_2 B
      3  WHERE A.VAL1=B.VAL1;
          VAL1       VAL1
             1          1
             2          2
    SQL> SELECT A.VAL1,B.VAL1 FROM
      2  T_1 A,T_2 B
      3  WHERE A.VAL1=B.VAL1(+);
          VAL1       VAL1
             1          1
             2          2
             5
             4
             3
    SQL> SELECT A.VAL1,B.VAL1 FROM
      2  T_1 A,T_2 B
      3  WHERE A.VAL1=B.VAL1(+)
      4  AND
      5  NOT EXISTS (SELECT 'X' FROM t_2 C WHERE c.val1=b.val1);
          VAL1       VAL1
             3
             4
             5( Please use the tag before and after your example, so we're sure we're looking at your complete example )                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Alter SHRINK SPACE in oracle 10g

    Hello,
    My table PRICE_T table gets deleted and inserted almost 50 million records everyday.
    Now it takes too much time to perform this operation because of TABLE fragmented.
    i can use "CREATE table as select” option to remove fragmentation from table.
    but i dont want to use this option.
    so i hv tried ALTER TABLE SHRINK SPACE as i m using ORACLE 10g
    alter table price_t enable row movement;
    alter table price_t shrink space
    alter table price_t disable row movement;
    and i have applied following query to check table gets remove free space but still having free space after applying ALTER SPACE COMMAND
    select table_name,round((blocks*8),2)||'kb' "size1",round((num_rows*avg_row_len/1024),2)||'kb' "size"
    from DBA_tables
    where table_name = 'PRICE_T';
    Tablespace in PRICE_T table fall into is SEGMENT SPACE MANAGEMENT AUTO
    please help me to remove fragmentation from table using SHRINK command.
    Thanks.

    Now it takes too much time to perform this operation because of TABLE fragmented.How do you define "fragmented"?
    Why do you believe that your table is fragmented?
    Why do you believe that the fragmentation is causing performance problems?
    select table_name,
           round((blocks*8),2)||'kb' "size1",
           round((num_rows*avg_row_len/1024),2)||'kb' "size"
      from DBA_tables
    where table_name = 'PRICE_T'; - What is the output of this query before and after you shrink the table?
    - Are your statistics up to date? NUM_ROWS, BLOCKS and AVG_ROW_LENGTH provide information to the optimizer-- they are estimates gathered when object statistics are gathered. They are not maintained by Oracle in real time and may be substantially out of date.
    - I don't see any attempt to account in this query for overhead like PCTFREE.
    - Is there a reason that you aren't using the DBMS_SPACE package? This query seems highly suspect.
    Justin

  • How do I view Migrate Data errors - Access 2003 - Oracle 10g

    I'm trying to use the SQL Developer to migrate data from an Access 2003 database to an Oracle 10g database. I followed the instructions found here:
    http://www.oracle.com/technology/tech/migration/workbench/files/omwb_getstarted.html
    I was able to complete every step except the actual data move. I exported the xml for the Access database, I captured the export and then ran the generation scripts on my target Oracle database (I'm using the same schema for the migration repository and the actual data). It created the tables with only one or two errors which I resolved.
    Now, when I select Migration->Migrate Data, I get the dialog that appears to start 4 or 5 threads and attempts to migrate each table. They all error and do not transfer any rows. I can see that there's one error per table, but I can't see the error text. I just know that an error occurred. Is there a log somewhere or is the error displayed somewhere else? How do I know what's gone wrong?
    Thanks.

    I too receive unexplained error counts using the Migrate Data menu selection and unexplained failures using the Generate Data Move Scripts menu selection. Permissions granted by role or direct grants should not be a problem, but a Migrate Data error appears in the Migration Log panel at the bottom of the SQL Developer window, "Failed to disable constraints: ORA-00942 ... ". No further details available on what constraints or why the error. No other errors were detected while following the instructions found in the Oracle SQL Developer Migration Workbench Getting Started guide. SQL Developer never migrates the data from the existing Access 2000 mdb file to the newly created schema objects in Oracle 10g using either method. The following roles and privileges have been granted to both the repository owner and the target schema owner:
    GRANT RESOURCE TO MIGRATE_USER WITH ADMIN OPTION;
    GRANT CONNECT TO MIGRATE_USER WITH ADMIN OPTION;
    ALTER USER MIGRATE_USER DEFAULT ROLE ALL;
    -- 25 System Privileges for MIGRATE_USER
    GRANT CREATE ROLE TO MIGRATE_USER;
    GRANT ALTER TABLESPACE TO MIGRATE_USER;
    GRANT ALTER ANY SEQUENCE TO MIGRATE_USER;
    GRANT INSERT ANY TABLE TO MIGRATE_USER;
    GRANT SELECT ANY TABLE TO MIGRATE_USER;
    GRANT CREATE ANY TABLE TO MIGRATE_USER;
    GRANT UNLIMITED TABLESPACE TO MIGRATE_USER WITH ADMIN OPTION;
    GRANT DROP TABLESPACE TO MIGRATE_USER;
    GRANT CREATE ANY TRIGGER TO MIGRATE_USER;
    GRANT ALTER ANY ROLE TO MIGRATE_USER;
    GRANT CREATE VIEW TO MIGRATE_USER WITH ADMIN OPTION;
    GRANT DROP USER TO MIGRATE_USER;
    GRANT CREATE TABLESPACE TO MIGRATE_USER;
    GRANT GRANT ANY ROLE TO MIGRATE_USER;
    GRANT CREATE ANY SEQUENCE TO MIGRATE_USER;
    GRANT ALTER ANY TABLE TO MIGRATE_USER;
    GRANT DROP ANY TRIGGER TO MIGRATE_USER;
    GRANT DROP ANY ROLE TO MIGRATE_USER;
    GRANT DROP ANY SEQUENCE TO MIGRATE_USER;
    GRANT UPDATE ANY TABLE TO MIGRATE_USER;
    GRANT ALTER ANY TRIGGER TO MIGRATE_USER;
    GRANT COMMENT ANY TABLE TO MIGRATE_USER;
    GRANT DROP ANY TABLE TO MIGRATE_USER;
    GRANT CREATE PUBLIC SYNONYM TO MIGRATE_USER WITH ADMIN OPTION;
    GRANT CREATE USER TO MIGRATE_USER WITH ADMIN OPTION;
    -- 1 Tablespace Quota for MIGRATE_USER
    ALTER USER MIGRATE_USER QUOTA UNLIMITED ON USERS;
    Operating system for both Access 2000 and Oracle 10g is Windows XP PRO SP2.
    Oracle SQL Developer is version 1.1.2.25 build MAIN-25.79 on Windows XP PRO SP2. All three are on the same PC.
    Since only the last step failed, I created a User DSN with the ODBC administrator. Then, linked the newly created Oracle table to Access via ODBC using the DSN created. Next, I created an append query with the source being the Access table and the target being the Oracle table. I moved the data by pressing the red exclamation mark.

  • Query Regarding Rich Text Editor in Oracle 10G

    Hello.
    Can anyone let me know is their any privilege in Oracle 10g that we Incorporate the Rich Text Editor functionality. Currently we are working on Laboratory / Radiology Template based Reports in which they are requesting their should be option through which we can simply Cut and Paste our organized TEXT(REPORT) which are formatted in MS WORD with Bold,Underline and in Bullets format, it should simply paste in Editor and we can view a Template based report with formatted REPORT.
    We are using Oracle 10G and it's Applet based Application. Any clue how can we Accomplish this? Any Suitable Suggestion?
    Thanks

    Sorry, I referred this already.. This also returns the HTML text. But i don't want the HTML text. I want Normal Text what i enter in the Editor. But as of now all the editors are returning HTML text. So in the front end also it is showing HTML text only.
    I entered the text in Editor as
    System Defaulted Note
    Quote entered
    But editor returns as below and the same way it is showing in the Front end application instead of above text.
    <html>
    <head>
    </head>
    <body>
    System Defaulted Note
    <p>
    Quote entered
    </p>
    </body>
    </html>

  • How to transfer data between different tables in an Oracle 10g databse?

    I have to do the following: there are 5 database tables in our Oracle 10g database that store certain data. Then there are 2 new tables where we want the data to go to. My task is to somehow transfer all the data that is in the first 5 tables and insert it in the 2 new ones. All tables are in the same database. The challenge lies in the fact that the structures of the tables are very dissimilar so it won't be a matter of a simple INSERT SQL query.
    The data access tier of our application is developed in JAVA. We use EJB. So one way I am thinking of doing the above mentioned data transfer is to simply code it in the JAVA backed. But that might be to slow, there are millions of records in those first 5 tables. What is the best way to do something like that? Perhaps a custom (Perl?) script or some such?
    Thanks.

    The problem is that the way the data is stored in the old tables you cannot write a query that would return it in such a format that you could immediately insert it in the new table without some formatting. Let me illustrate with an example. To pull the data from the old tables I use this query:
    SELECT
         SXML_DOCUMENT_DATA.VALUE As DocumentValue,
    SXML_ELEMENT.NAME As ElementName
    FROM
         SXML_DOCUMENT,
         SXML_DOCUMENT_DATA,
         SXML_DOCUMENT_DETAIL,
         SXML_ELEMENT,
         SXML_TYPE
    WHERE
         SXML_TYPE.XML_TYPE_KEY = SXML_DOCUMENT.XML_TYPE_KEY
    AND     SXML_DOCUMENT.XML_DOCUMENT_KEY = SXML_DOCUMENT_DETAIL.XML_DOCUMENT_KEY
    AND     SXML_DOCUMENT_DETAIL.XML_DOCUMENT_DETAIL_KEY = SXML_DOCUMENT_DATA.XML_DOCUMENT_DETAIL_KEY
    AND     SXML_ELEMENT.XML_ELEMENT_KEY = SXML_DOCUMENT_DATA.XML_ELEMENT_KEY
    AND     SXML_TYPE.NAME = 'DA_UNIT_COMMITMENT'
    AND     (SXML_ELEMENT.NAME = 'resource'
         OR SXML_ELEMENT.NAME = 'resourceType'
         OR SXML_ELEMENT.NAME = 'commitmentType'
         OR SXML_ELEMENT.NAME = 'startTime'
         OR SXML_ELEMENT.NAME = 'endTime'
         OR SXML_ELEMENT.NAME = 'schedulingCoordinator')
    ORDER BY
         SXML_DOCUMENT.NAME,
         SXML_DOCUMENT_DETAIL.XML_DOCUMENT_DETAIL_KEY,
         SXML_DOCUMENT_DATA.XML_DOCUMENT_DATA_KEY,
         SXML_ELEMENT.NAME;
    The results from the SQL query above look like this:
    DOCUMENTVALUE | ELEMENTNAME
    1 | ALAMIT_7_UNIT_1 | resource
    2 | GEN | resourceType
    3 | BRS8 | schedulingCoordinator
    4 | IFM | commitmentType
    5 | 2008-07-29T18:00:00:00 | startTime
    6 | 2008-07-30T00:00:00 | endTime
    7 | ALAMIT_7_UNIT_1 | resource
    8 | GEN | resourceType
    9 | BRS8 | schedulingCoordinator
    10 | IFM | commitmentType
    11 | 2008-07-29T00:00:00 | startTime
    12 | 2008-07-29T04:00:00 | endTime
    and so on. The type of data repeats every 6 records. And the values of each 6 records corresponds to 1 row in the new table, which looks like this:
    schedulingCoordinator | resource | resourceType | commitmentType | startDate | endDate
    1| 1 | 27 | GEN | IFM | 2008-07-29T18:00:00:00 | 2008-07-30T00:00:00
    2| 1 | 27 | GEN | | 2008-07-29T00:00:00 | 2008-07-29T04:00:00
    So hopefully now you see the challenge. It is not as simple as writing a SQL query that returns result rows corresponding 1 to 1 to a row in the new table. Somehow I need to take the first 6 result rows from that big SQL query and put them in the first row of the new table. Then the next 6 and put them in the second row and so on. And also, we are talking about millions of records. What happens if I process the first 2 million and then some error occurs? Do I start from the beginning again? One idea I have is to process the data in chunks, say process 500 results, commit, process another 500, commit, and so on.
    Edited by: 799984 on Oct 11, 2010 9:08 AM

  • How can i create a new database instance in oracle 10g express edition?

    hello everybody
    i'm a student
    i am developing a database application
    i'm using oracle 10g express edition
    to run my application i need to create another database instance
    but i didn't find any option for doing so in that product
    if there is pls tell me where it is?
    if not pls tell me how to manually create it?
    regards,
    Chaitanya

    Chaitanya Babu M wrote:
    yaa i'm sure about that .
    i want one more instance of database.Can you perhaps explain why? I have a fair share of production and development servers - and not a single one of them needs to run more than one database instance.
    So I'm interested in what requirement you are trying to satisfy by using two database instances on a single platform.
    Oh yeah - if you want to create a custom XE instance (different SID, different tablespace sizes, more/less PL/SQL stuff installed, hack standard), make a copy of your XE db creation script (in your XE's +$ORACLE_HOME/bin+ and called createdb.sh ) and modify that for your needs.
    PS. even with a different SID, only a single XE instance can be run at a time - you can however have 2 different ones defined and then use one at a time (e.g. testing international settings, init param differences, etc.)

  • How do you import data base dmp file in oracle 10g

    How do you run data base dmp file in oracle 10g

    Examples..
    Table Exports/Imports
    The TABLES parameter is used to specify the tables that are to be exported. The following is an example of the table export and import syntax:
    expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
    impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log
    For example output files see expdpEMP_DEPT.log and impdpEMP_DEPT.log.
    The TABLE_EXISTS_ACTION=APPEND parameter allows data to be imported into existing tables.
    Schema Exports/Imports
    The OWNER parameter of exp has been replaced by the SCHEMAS parameter which is used to specify the schemas to be exported. The following is an example of the schema export and import syntax:
    expdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
    impdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=impdpSCOTT.log
    For example output files see expdpSCOTT.log and impdpSCOTT.log.
    Database Exports/Imports
    The FULL parameter indicates that a complete database export is required. The following is an example of the full database export and import syntax:
    expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log
    impdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=impdpDB10G.log

  • SQL QUERY to create new schema in Oracle 10g Express

    Can anyone provide the SQL query to create a new schema in Oracle 10g Express edition.

    Can anyone provide a SQl query to create a
    schema/user named 'test' with username as 'system'
    and password as 'manager'system user is created during database creation, it's internal Oracle admin user that shouldn't be used as schema holder.
    In Oracle database, Oracle user is schema holder there's no seperate schema name to be defined other than username.

  • How to Enable Full text search in UCM with Oracle 10g

    Hi,
    Can you please guide me on how to enable full text search in UCM after I have installed it. My database is Oracle 10g. It would be great if you could guide me through the steps since I am very new to this product.
    Regards
    Ashish

    Hi
    Are you sure that your indexer is finishing without any errors? Check activeindex.hda under \search directory to see what is the variable set for activeindex variable? If Oracle Text is the indexer search enabled then the variable activeindex should either OTS1 or OTS2. If anything else then you have indexer problems that is not indexing documents.
    Check the CS log file to see if indexer errors are shown there. If yes, then put it over here so that we can analyse it.
    Hope it helps
    Thanks
    Srinath

  • How to protect a third party solution developed in Oracle 10G database

    Hello!
    We are building a third party solution for several specific industries, all the technology is based on Oracle 10G database, meanwhile, we are looking for a solution to protect the IPR to avoid the source code distributed incorrectly.
    Welcome any input from you. thanks!

    Different coding tools and language environments provide different facilities.
    You might want to mention whether you are using PL/SQL, Java, C#, SQL extensions and object types, etc. and what characteristics of the IPR you are trying to protect.

Maybe you are looking for