Substr function problem in oracle

my requirement is that i am writing the stored procedure in which use
*substr( source_string, start_position, [ length ] )*
my 1 requirement
i have i problem that the source_string is dynamically being passed as a parameter into the stored procedure
means its length can vary
and start_position is dynamically being passed as a parameter into the stored procedure should be that is should start from start of the sting and it can also vary
my 2 requirement
as in SQL Server we have left and Right function
if we use left like this
this is code from SQL Server
note: in SQL Server left function Returns the left part of a character string with the specified number of characters.
*@FinalCode = left(@TempCode,Len(@TempCode)-1)*
*@FinalCode : this user declared local variable in stored procedure*
*@TempCode:this is the dynamic string i am passing in stored procedure*
when we use left it starts the reading string from left side
note: in SQL Server right function Returns the right part of a character string with the specified number of characters.
Set @FinalCode = Right(@FinalCode,len(@FinalCode)-1)
when we use Right it starts the reading string from Right side
my requirement is how to do this oracle as i am new to oracle 10g with the use of
*substr( source_string, start_position, [ length ] )*
Edited by: user21354 on Feb 8, 2011 4:06 AM

when we use Right it starts the reading string from Right sideStart from left:
SQL> select substr('abc', 1, 1) from dual;
S
aStart from right:
SQL> select substr('abc', -1, 1) from dual;
S
c

Similar Messages

  • Informix- Oracle migration: OMWB misapplies SUBSTR function !!!

    New problem occured:
    OMWB translates Informix's substrings wrong:
    Examples of translations:
    INFORMIX ORACLE
    wvs[1] SUBSTR(wvs,1)
    wvs[2,10] SUBSTR(wvs,2,10)
    wvs[10] SUBSTR(wvs,10)
    It seems, that OMWB only copies index numbers in square brackets as parameters of Oracles's SUBSTR function. But SUBSTR works differently by string indexes closed to [] in Informix !
    wvs[1] means 1-st character of wvs string, wvs[3,5] means substring from 3-rd to 5-th character of wvs (length 3), but SUBSTR(wvs,1) means substring from 1-st chracter to end of string, SUBSTR(wvs,3,5) means 5-characters long substring from 3-rd to 7-th character, e.t.c.
    Vladimir Kubanka alias Bare Foot
    null

    Well, I obtained <process_id> from V$SESSION, (...WHERE audsid=to_number(sessid) , ... , sessid:= sys_context('USERENV','SESSIONID') ).
    But problem: this process_id is not the same, which has some process, creating standard tracefile "ora_<process_id>_orcl.trc".
    In case I run procedure from SQLPLUS, process_id was for example 3258 and trace file had name "ora_3259_orcl.trc". It seems that tracefile was created by some child process, called from sqlplus (having UNIX process_id 3258). But it means, that child's process_id could be bigger more than +1 (when more users works in the same time). And in case I run procedure from some Windows-oriented client on my PC, the <process_id> (obtained from V$SESSION as written above in procedure) had some nonsense value (for ex. 54823716) and tracefile I found under name "ora_3271_orcl.trc" - it seems that process, creating tracefile had normal UNIX-liked process_id 3271. From this issues questions:
    1. Is there some way to obtain in procedure process_id, which creates that standard tracefile?
    OR:
    2. Is there some way to obtain (in procedure) name of that tracefile ? (written into directory defined in USER_DUMP_DEST parameter)
    null

  • Convert substring function from SQL Server to Oracle

    I am converting a large application written for SQL Server to Oracle and have encountered a difference in how the substring function is called between the two database systems.
    In SQL Server:
    select substring('xyz'1,2)
    In Oracle:
    select substr('xyz',1,2)
    Is there a way to establish a user-defined operator to map the substring call to a substr call so I don't have to change the application code?
    Is the user-defined function a way to do this?
    Which is better?

    If you want to be able to use the code that has substring in it, without modifying it, and have it do the same thing as substr, then try running the script below. It will create a user-defined function named substring that will cause substring to act like substr.
    CREATE OR REPLACE FUNCTION substring
    (p_string IN VARCHAR2,
    p_start IN VARCHAR2,
    p_end IN VARCHAR2 DEFAULT NULL)
    RETURN VARCHAR2
    IS
    v_string VARCHAR2 (100);
    BEGIN
    IF p_end IS NULL
    THEN
    SELECT SUBSTR (p_string, p_start)
    INTO v_string
    FROM DUAL;
    ELSE
    SELECT SUBSTR (p_string, p_start, p_end)
    INTO v_string
    FROM DUAL;
    END IF;
    RETURN v_string;
    END substring;
    null

  • Using substr function loses index. Query tune help

    Hi
    when i use substr function in the join condition it loses index and the query is slow. How to fix this problem or tune this query. These are the lines in the query.
    and substr(a.invoice_num,1,9) = l.invoice_num
    and substr(c.invoice_num,1,9) = mgr_apprv_lst.user_key
    and substr(c.invoice_num,1,9) = pbl_apprv_lst.user_key
    select
    pap.full_name employe_name,
         k.SEGMENT1 ||'.' ||k.segment2 Cost_Center,
         a.invoice_num Invoice_Number,
         b.item_description Line_Item,
         b.amount Amount,
         cc.trx_id Corporate_Card_Transaction_Id,
         cc.transaction_date Date_Charge_Incurred,
         cc.posted_date Date_Charge_Posted_To_USBank,
         cc.creation_date Date_Posted_To_IExpense,
         a.creation_date Expense_Report_Creation_Date,
         l.report_submitted_date Expense_Report_Submitted_Date,
         mgr_apprv_lst.activity_begin_date Managers_Approval_Begin_Date,
         mgr_apprv_lst.activity_end_date Managers_Approval_End_Date,
         pbl_apprv_lst.activity_begin_date AP_Approval_Begin_Date,
         pbl_apprv_lst.activity_end_date AP_Approval_End_Date,
         e.check_date Payment_Date_To_USBank,
         e.check_number Payment_Number,
         mgr_apprv_lst.activity_result_display_name Managers_Process_Result,
         pbl_apprv_lst.activity_result_display_name AP_Process_Result
    from
         ap_checks_all e,
         ap_invoice_payments_all d,
         ap_invoices_all c,
    ap_expense_report_headers_all a,
         ap_credit_card_trxns_all cc,
         per_all_people_f pap,
         ap_expense_report_headers_all l,
         ap_expense_report_lines_all b,
         gl_code_combinations k,
         (select ias1.user_key,
         ias1.activity_result_display_name,
         ias1.activity_begin_date,
         ias1.activity_end_date
    from wf_item_activity_statuses_v ias1,
    (select c1.invoice_num
         from ap_checks_all e1,
         ap_invoice_payments_all d1,
         ap_invoices_all c1
         where trunc(e1.check_date) between nvl(:From_Date, trunc(e1.check_date))
         and nvl(:To_Date, trunc(e1.check_date))
    and e1.org_id = 141
    and e1.void_date IS null
    and d1.check_id = e1.check_id
         and c1.invoice_id = d1.invoice_id) inv_lst1
    where ias1.item_type = 'APEXP'
    and ias1.user_key = inv_lst1.invoice_num
    and ias1.activity_name = 'AP_MANAGER_APPROVAL_PROCESS') mgr_apprv_lst,
    (select ias2.user_key,
         ias2.activity_result_display_name,
         ias2.activity_begin_date,
         ias2.activity_end_date
    from wf_item_activity_statuses_v ias2,
    (select c2.invoice_num
         from ap_checks_all e2,
         ap_invoice_payments_all d2,
         ap_invoices_all c2
         where trunc(e2.check_date) between nvl(:From_Date, trunc(e2.check_date))
         and nvl(:To_Date, trunc(e2.check_date))
    and e2.org_id = 141
    and e2.void_date IS null
    and d2.check_id = e2.check_id
         and c2.invoice_id = d2.invoice_id) inv_lst2
    where ias2.item_type = 'APEXP'
    and ias2.user_key = inv_lst2.invoice_num
    and ias2.activity_name = 'AP_PAYABLES_APPROVAL_PROCESS') pbl_apprv_lst
    where
    trunc(e.check_date) between nvl(:From_Date, trunc(e.check_date))
    and nvl(:To_Date, trunc(e.check_date))
    and e.org_id = 141
    and e.void_date IS null
    and d.check_id = e.check_id
    and c.invoice_id = d.invoice_id
    and a.invoice_num = c.invoice_num
    and a.source = 'CREDIT CARD'
    and a.employee_id = nvl(:Emp_id,a.employee_id)
    and a.report_header_id = b.report_header_id
    and cc.trx_id = b.credit_card_trx_id
    and pap.person_id = a.employee_id
    and pap.effective_start_date <= trunc(sysdate)
    and pap.effective_end_date >= trunc(sysdate)
    and k.code_combination_id = b.code_combination_id
    and k.segment2 between nvl(:From_Cost_Center,k.segment2)
    and nvl(:To_Cost_Center,k.segment2)
    and substr(a.invoice_num,1,9) = l.invoice_num
    and substr(c.invoice_num,1,9) = mgr_apprv_lst.user_key
    and substr(c.invoice_num,1,9) = pbl_apprv_lst.user_key

    Hi
    If I understood correctly your logic, and if the columns involved are of type varchar2, you can use the like operator:
    and a.invoice_num like l.invoice_num || '%'
    and c.invoice_num like mgr_apprv_lst.user_key  || '%'
    and c.invoice_num like pbl_apprv_lst.user_key  || '%'In this case, Oracle will be able to use the indexes. If they are numeric, you need to do something like:
    and a.invoice_num between l.invoice_num * 1000000
                                and l.invoice_num * 1000000 + 999999I hope this makes sense...
    Luis

  • SUBSTR function in the where clause

    HI
    I want to get a number of 15 digits from a column where the user only know the last 10 digits.
    So that when the user enter a number with 10 digits, only the record of that specific number should be displayed.
    And then when the user did not enter any number all the records in the table should be displayed.(this part works fine)
    The problem is: when the user enters any last digits( last, second last, thirth last and so on) the records which satisfy this are retrieved, which is not supose to be the case.
    I' am trying to use the substr function in the where clause but I'm not sure if it's working or not becasue the result of the query is just the same as before i used the substr.
    Thanks

    better to pad with '*' me thinks in case u have a number ending with 0's:
      1  select empno,ename
      2  from emp
      3* where empno like '%'||lpad('&1',2,'*')
    SQL> /
    Enter value for 1: 0
    old   3: where empno like '%'||lpad('&1',2,'*')
    new   3: where empno like '%'||lpad('0',2,'*')
    no rows selected
    SQL> /
    Enter value for 1: 00
    old   3: where empno like '%'||lpad('&1',2,'*')
    new   3: where empno like '%'||lpad('00',2,'*')
         EMPNO ENAME
          7900 JAMES
    SQL> /
    Enter value for 1:
    old   3: where empno like '%'||lpad('&1',2,'*')
    new   3: where empno like '%'||lpad('',2,'*')
         EMPNO ENAME
          7369 SMITH
          7499 ALLEN
          7521 WARD
          7566 JONES
          7654 MARTIN
          7698 BLAKE
          7782 CLARK
          7788 SCOTT
          7839 KING
          7844 TURNER
          7876 ADAMS
         EMPNO ENAME
          7900 JAMES
          7902 FORD
          7934 MILLER
    14 rows selected.

  • Substring formula problem for Traditional Chinese

    Dear all,
    I created two InfoObjects (type: character, length: 60)in order to load one field with 100 characters from R/3. I created formula in transfer rule using "Substring" function for each of the two InfoObjects (e.g. Substring(field_name, 0, 60) and Substring(field_name, 60, 40). The data is in Traditional Chinese and both R/3 and BW are Unicode verison. The first InfoObject seems always get less than 60 characters, but the second InfoObject get 40 characters correctly. When I use English data to test, both InfoObjects get correct legnth of data. Does anyone come across this problem before? Thanks a lot.

    Download CS6 products
    Mylenium

  • Using substring function with error

    Hi Guys,
    I have a source field with 1200 characters which need to map to multiple target segments for  132 count of this source field.
    This is not a mandatory field so it sometimes come without any value.
    I am using substring function to breakout the string for every 132 characters and mapped to the target segments.
    There are two problems, first it seems that if source is blank, there will be error.
    Second, if source field come with only eg. 300 characters, error will also occurs.
    I have searched thru SDN and try some of the UDF but to no avail.
    Appreciate your guidance on this problem.
    Regards
    FNG

    H Rahul,
    I have tried your quote but face some syntax error as follows
    Function calculate, Line 6:
    cannot find symbol symbol  : method length() location: class java.lang.String[] j = input.length();       
    Function calculate, Line 26:
    cannot find symbol symbol  : method subString(int,int) location: class java.lang.String[]           
    result.addValue(input.subString(0,EndIndex));                                      ^
    Function calculate, Line 34:
    cannot find symbol symbol  : method subString(int,int) location: class java.lang.String[]                result.addValue(input.subString(StartIndex,EndIndex));                                              ^
    Function calculate, Line 40:
    cannot find symbol symbol  : method subString(int,int) location: class java.lang.String[]                result.addValue(input.subString(StartIndex,EndIndex));                                              ^ Note: /usr/sap/D03/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd66a3a60002911e09ba9e41f132d6b68/source/com/sap/xi/tf/_MM_MT_COMS_TO_ZME_CRE_CHG_CONTRACT_.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /usr/sap/D03/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapd66a3a60002911e09ba9e41f132d6b68/source/com/sap/xi/tf/_MM_MT_COMS_TO_ZME_CRE_CHG_CONTRACT_.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 4 errors

  • Substr function in CTL file of sqlloader

    Hi gurus,
    I am using sql loader to load the data from text file to oracle table.
    I have 2 columns in the input data, which are of more size than their corresponding destination table column sizes.
    I am using substr() function in the control file, but it is failing for some records in 2 scenarios, details given below.
    First scenario:
    destination table column size is 250 characters.
    substr() function works fine when the source data is less than 255 characters, but when it is more than 255 characters, the record is getting rejected as bad record.
    eg: if the source data is of 254 characters, only 250 chars are inserted in the table, but if the size is 256, record is not inserted in the table.
    Here is the syntax i am using
    ENQUIRY "SUBSTR(:ENQUIRY, 0, 250)",
    Second scenario:
    destination table column size is 2000 characters.
    substr() function works fine when the source data is upto 2000 characters, but when it is more than 2000 characters, the record is getting rejected as bad record.
    Here is the syntax i am using
    ANSWER CHAR(2000) "SUBSTR(:ANSWER, 0, 2000)",
    Please suggest.
    Thanks,

    odie_63 wrote:
    Hi,
    Try with specifying a larger size limit for both columns :
    ENQUIRY CHAR(4000) "SUBSTR(:ENQUIRY, 0, 250)",        
    ANSWER  CHAR(4000) "SUBSTR(:ANSWER, 0, 2000)"
    Will the substr work with a starting offset of 0 ? Doesn't substr uses 1 as the first character position? or it is different with sqlloader?
    Okay I checked, It works just like if the offset is given as one. Perfect.
    SQL> select substr('ABCDEF',0,3) from dual;
    SUB
    ABCThanks odie_63. :)
    Edited by: zahid79 on Jul 23, 2010 5:20 PM
    Edited by: zahid79 on Jul 23, 2010 5:22 PM

  • Substring function for presentation variables in obiee

    I have a presentation variable called period that has the (fromdate and to date)
    Is there any way that I can split this one variable into 2 by using substring function??in such a way that it gives one for from date and the other for to date..
    any synatx like
    SUBSTRING ( '@{period} FROM 0 FOR POSITION
    (' - ' IN '@{period})) ???
    and how to apply this?

    The answer to this question is the same for the one you posted here:
    can we create two dashboard prompts for the same column in the samepage
    You need to split your prompts into two. If you read the link I posted in the other thread and re-posted here, you will find that the reason to do it this way is so you can see the values of the prompts. Read the first paragraph of this link -- again, if you already read it. You cannot split the single presentation variable if you use the BETWEEN operand in the dashboard prompt. You need to put the operand in the filter in your report.
    http://oraclebizint.wordpress.com/2008/02/26/oracle-bi-ee-101332-between-prompts-for-date-columns-using-presentation-variables/

  • Substring function giving out empty fields

    I am using OAS 10.1.3v . I have a problem with the substring function in the BPEL functions. In 10.1.2v , all the xpaths with substring functions gave out data.
    But in 10.1.3v, all those nodes are seen empty. Is there any particular reason for this ?
    Is this a problem of any particular jar file ? I am using xalan 2.7.0 along with this, for custom functions.
    Also, in which class, inside the jar file, is the substring function defined ?

    Try wrapping the substring function in a @member function. You need the ruturn of a member name not a string. Look at the example of @member in the technical reference for more details

  • Invalid length parameter passed to the LEFT or SUBSTRING function, error on INSERT

    I have a stored procedure that does a BULK INSERT of a csv file into myCSVTable then INSERTs records from
    myCSVTable into myTable. The INSERT statement is giving me this error: 
    Invalid length parameter passed to the LEFT or SUBSTRING function.
    CSV File: 
    3,020000007,OR,051,97205,02020005,41075,19470721,2,0,,0,0,0,0,0,1,0,0,,,,,,,,,0,2,,334418,334418,334418,13,,0,,0,0,0,0,0,1,0,0,1,20100217,,,,,20100304,20121030,1,1,,,0,0,0,0,0,,,,,0,0,0,0,9,0,0,0,1,1,0,0,0,3,00,20100304,20100426,20100922,20101011,20100304,20100922,20101011,,20101011,20100819,,20100326,20100326,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,1,1,,9,9,1,1,1,1,0,0,111150,111150,111150,999999,5586.25,4714.01,5884.28,7055.89,11097.89,10839.39,0.00,2,,,,,20120617,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,The
    Workforce Investment Board for the City of xxxxxxxx and xxxxxxxxx and W,020005,,mstr: 1000000000000000017  js: 372651          epi: 1,Jane Doe
    4,020000007,OR,051,97205,02020005,41075,19470721,2,0,,0,0,0,0,0,1,0,0,,,,,,,,,0,2,,334418,334418,334418,13,,0,,0,0,0,0,0,1,0,0,1,20100217,,,,,20100304,20121030,1,1,,,0,0,0,0,0,,,,,0,0,0,0,9,0,0,0,1,1,0,0,0,3,00,20100304,20100426,20100922,20101011,20100304,20100922,20101011,,20101011,20100819,,20100326,20100326,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,1,1,,9,9,1,1,1,1,0,0,111150,111150,111150,999999,5586.25,4714.01,5884.28,7055.89,11097.89,10839.39,0.00,2,,,,,20120617,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,The
    Workforce Investment Board for the City of xxxxxxxx and xxxxxxxxx and W,020005,,mstr: 1000000000000000017  id: 020000007       epi: 1,Jane Doe
    There is no LEFT or SUBSTRING function used in the procedure and there are no triggers on either table. 
    The procedure had been working fine until today, when I altered one of the CSV fields. The code which triggers the error is this:
    INSERT [myTable]
    SELECT * FROM [myCSVTable]
    The weird thing is, the 1st record containing the changed field (mstr: 1000000000000000017  js: 372651          epi: 1) triggers the error, but the 2nd record containing
    the old field value (mstr: 1000000000000000017  id: 020000007       epi: 1), does not. 
    There are only blank spaces in the 2 strings, no non-printable characters or anything like that. I'm confused.

    A View of myTable was causing the problem.
    Hi LoriCazares,
    Do you mean that you have solved this issue? If so, please close this thread.
    Regards,
    Elvis Long
    TechNet Community Support

  • Problem using oracle.dataaccess.dll

    Hi,
    I have an web application which uses Oracle.DataAccess.dll to communicate with and Oracle db. The web application deployed on 32 bit windows system works but not on windows server 2008 64 bit. I installed 10204_vista_win2k8_x64_production_db package, referenced the installed dll (version 2.102.4.0) from the project but I get the following error:
    Could not load file or assembly 'Oracle.DataAccess, Version=2.102.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    Any help is appreciated. Thanks in advance.

    I had this problem too.
    I have not found any way to get ODP to work on a 64 bit machine. I have gone through more than 30 permutations of install combinations and all have their problems.
    Your's is one I remember.
    The error message does not give a good description of the problem. It CAN find it, but it can't load it.
    The main problem in my opinion is that Visual Studio is a 32 bit app and so are its tools. MS will say that is no big deal because they don't want to rewrite native code sooner than they have too. It is going to stay that way for 2010. Visual Studio is going to load a .dll to connect to Oracle in server explorer and in any datasets you have created with the designer...its going to use a 32 bit .dll now your application wants a 64bit .dll... see the problem? I beleive that when you install the ODP registry settings are made for viual studios sake, but I don't know what happens under the hood.
    Does visual studio give you any option at all to choose what assemblies to use for the IDE tools? nope
    I have tried 32 bit client, 64 bit client, ODACwithODP and every combination of them in every version oracle offers on their download site. Nothing worked 100%.
    I got
    1) "cannot load file x" when x is at the specified path
    2) BadImageFormat exception
    3) App worked but visual studio tools crashed the IDE
    4) installed all 3, but used the old system.data.oracleclient and tools worked sluggish or crashed.
    You can also combine the problem of Oracle provider along with the fact that 1/2 of Visual Studio's tools don't care about 64 bit programming. For example, I made a wcf service that as going to access my database. Well, guess what you can't use Visual Studio's WCF debugger because WcfSvcost.exe is 32 bit. Will it give you an informative error message? nope. Just a BadImageFormat Exception with no clue which file is causing the problem. spent a week of precious time on that one and thought it was an oracle provider issue.
    I have given up using ODP for now and am forced to use (4) System.Data.OracleClient just for the sake of getting any coding done at all instead of hacking my environment. It sucks. I got that working by installing 11r2 64 bit client in one home and 11r2 64bit client in another, then ODP in a 3rd. That way I can still use more friendly tools made for Oracle and let VS use the 32 bit client with the old System.Data.OracleClient dll.
    If anyone has the magic step but step to get both a working IDE with its tools remaining functional along with a working application on Windows 7 64bit, than please please let me know!

  • Problem installing Oracle Identity Manager Server  9.1

    Hello,
    I try to install oracle identity Manager Server 9.1, but I'm having a problem.
    Oracle identity manager 9.03 is already installed with jboss-4.0.3SP1 and j2sdk1.4.2_15
    and oracle 10.2.0
    So I follow these steps to clean out the db:
    1. Drop tablespace: drop tablespace oimtbs including contents;
    2. Drop user: drop user oimuser cascade;
    and ran prepare_xl_db.bat as instructed. No errors in the log.
    I ran the DiagonasticDashboard : the db setup was fine.
    When I ran the installer "setup_server.exe", i haved this message :
    Folowing Error occured during schema creation
    Error encountered while loading database script
    E:\OIM_Install\OIM9100\installServer\Xellerate/db/oracle/xell.sql
    Please contact your DBA!
    maximum key length (1478) exceeded
    Does anybody have any idea what this error is about ?
    Thanks.

    Index IDX_LKV_LKV_ENCODED on Table LKV (Column :- LKV_ENCODED - VARCHAR2(3000)) is failing on 2k block size. Though all the Indexes are working fine with the 4k block size.
    But OIM Dev team recommends to create the 8k block size for the Index storage.
    Because the blocksize affects the number of keys within each index node, it follows that the blocksize will have an effect on the structure of the index tree. All else being equal, large blocksizes will have more keys, resulting in a flatter index than the same index created in a 2k tablespace. A large blocksize will also reduce the number of consistent gets during index access, improving performance for scattered reads access.
    HOW TO CREATE THE INDEXES IN LARGER BLOCKSIZE TABLESPACE
    In the existing database:-
    Create a tablespace with the 8k blocksize, For Example
    First,
    Set the system cache size for that particular db block size
    sql> alter system set db_8k_cache_size=100M;
    sql> CREATE TABLESPACE db_8k_tablespace DATAFILE 'C:/oracle/product/10.2.0/oradata/8k_file.dbf' SIZE 100M BLOCKSIZE 8192;
    Then
    Reorganize the Index using command:-
    sql> Alter Index <Index_Name> Rebuild tablespace <Tablespace_Name>
    Regards,
    Neeraj Goel

  • Problem with Oracle 11g(32 bit) installation on windows 7 ultimate edition

    Hello all,
    I have a problem with Oracle 11g(32 bit) installation on windows 7 ultimate edition (32 bit).
    I have successfully installed it immediately after OS installation. But today, i have decided to deinstall it and go for Oracle 10g version for 32 bit.
    Everything went normal during installation, but i can see the services is not present in services.msc. Also its throwing some exception for dbca, netca
    Now i tried to deinstall it and again go for 11g. But even the same story here..
    Can anybody give me a solution for this..
    -Regards
    Rajesh Menon

    Saqib Alam wrote:
    i recently install Oracle 11g R1 on windows 7 ultimate, i installed it and working perfectly.
    ur problem is that u install latest version and now u trying to installing old version.
    now u need to uninstall 10g and delete oracle from services, if the probleme presist then u should
    install fresh windows 7.
    Regards
    SaqibNo need to install a fresh OS. That's like tearing your house down just because you wired a lamp wrong and blew a circuit breaker.
    There are MeaLink notes on how to eradicate an Oracle install from Windows, but it boils down to this:
    Stop all Oracle services
    In the registery:
    - Delete all oracle services from the register (HKLM\SYSTEM\CurrentControlSet
    - Delete the entire Oralce folder from HKLM\Software
    reboot
    Delete the ORACLE_HOME directory and any other Oracle related directories/files. Offhand, it seems like there is an Oracle directory under Program Files.
    reboot

  • A lot of problems with Oracle BI SEE 11g

    I have a lot of problems with Oracle BI SEE 11g
    1. I upgraded my BI SEE 10 repository and can it openning in offline mode.
    2. I can't deploy my upgraded repository in EM MW Control 11g - when i try to open Farm_bifoundation_domain->Business Intelligence->coreapplication, i get error "Stream closed
    For more information, please see the server's error log for an entry beggining with: Server Exception during PPR, #41".
    Opening Logs by EM control doesn't work too.
    in file middleware\user_projects\domains\bifoundation_domain\servers\AdminServer\logs\AdminServer.log i see this event:
    <Error> <HTTP> <oratest.itera.ru> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <b639ac3e56e9a463:bd6fa7f:12ac7271e09:-8000-00000000000009e8> <1283408423378> <BEA-101019> <[ServletContext@329875093[app:em module:/em path:/em spec-version:2.5]] Servlet failed with IOException
    java.io.IOException: Stream closed
    Have you any ideas?
    3. Ok, i taking sample repository and adding a new datasource in it:
    Database: Oracle 8i
    Connection pool:
    Call interface OCI 8i/9i
    Data source name:
    (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (Host = oraapp) (Port = 1521) ) ) (CONNECT_DATA = (SID = MYSID) ) )
    This settings are working fine in BI 10.
    In BI 11g i get this funny error: "The connection has failed". I lost my time in attempts to connect to Oracle DB 8, but have not results. After that i hacked button "Query DBMS" at "Features" tab, pressed it and when get error "ORA-03134: Connections to this server version are no longer supported.".
    Therefore Oracle 8 DB as datasource not supported. Am i right?
    4. In sample repository i added oracle DB 10 as datasource, then added two dual tables and their connection to all layers.
    Now i open BI Answers, and trying to create report with one dummy column, Now i have this error:
    Error
         View Display Error
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 42016] Check database specific features table. Must be able to push at least a single table reference to a remote database (HY000)
    SQL Issued: SELECT s_0, s_1 FROM ( SELECT 0 s_0, "ORA10G"."dual"."dummy" s_1 FROM "ORA10G" ) djm
    Database features are defaults.
    Does anyone solve this problem?

    Turribeach, Thanks for you time.
    1. It was not a question
    3. Yes, i have read platforms, but not supported datasources. Now i see, that BI 11g support as datasource Oracle DB 9.2.0.7 or higher. I am sorry.
    4. I'm using OCI connection type
    Now i recreate Database in Physical schema and answers is showing report data for me! But only from one table, when i use columns from to tables from one datasource, i geting error:
    Error View Display Error Odbc driver returned an error (SQLExecDirectW). Error Details Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 46008] Internal error: File server/Utility/Server/DataType/SUKeyCompare.cpp, line 875. (HY000) SQL Issued: SELECT s_0, s_1, s_2 FROM ( SELECT 0 s_0, "Ora10g"."hierarchy_obj_cust_v"."sort_order" s_1, "Ora10g"."NSI_SCHEMA"."SCHEMA_NAME" s_2 FROM "Ora10g" ) djm
    Edited by: serzzzh on 03.09.2010 3:44

Maybe you are looking for