Problem in executing select statement using hetrogenous services

I am trying to import data from SqlServer 2005 to oracle 10g using hetrogenous services.
Oracle is installed on solaris 10 platform. I am running my query by Windows platform using Pl/Sql Developer
when i run the following query,
select * from GSecMstr@demodata2;
i get the following error message
Error: ORA-04052: error occurred when looking up remote object [email protected]
ORA-00604: error occurred at recursive SQL level 1
ORA-07268: szguns: getpwuid error.
But strange thing is that when i logon to the solaris server machine with user oracle and execute the same command using sqlplus from solaris console, then command is executed successfully

Server side tnsnames.ora file
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = solaris.ssilhr.com.pk)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
SQLServer =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = solaris.ssilhr.com.pk)(PORT = 1522))
(CONNECT_DATA =
(SID = SQLServer)
(HS = OK)
Server side sqlnet.ora file
SQLNET.AUTHENTICATION_SERVICES= (NONE)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Client side tnsnames.ora file
# tnsnames.ora Network Configuration File: E:\Oracle\product\10.2.0\db_2\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL_SUN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.235)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
Client side sqlnet.ora file
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Another thing i want to mention is that by mistake, i changed the role of user oracle from dba to root, which i have changed back to dba now.
To create database link, i used the following SQL
create public database link DEMODATA2
connect to "username"
IDENTIFIED BY "MyPassword"
using 'SQLServer';

Similar Messages

  • Performance tunning for select statements using likp lips and vbrp

    Dear all,
      I have a report where i am using select statements using first on likp the for all entries of likp  i am taking data from lips and then for all entries in lips i am taking data from vbrp by matching VGBEL and VGPOS. Now the problem is that when it fetches data from vbrp it is taking lot of time around 13mins. to fetch data from vbrp. How can i overcome the problem.
    regards
    Amit

    Hi,
    there is also no secondary index for preceding document in VBFA table.
    You will also have to create it here.
    Regards,
    Przemysław

  • How to write SELECT statement using tables ekko,ekpo and eket?

    Hi,
    I got a problem in  performance tuning using below tables?
    how to write SELECT statement using tables EKKO,EKPO and EKET and in conditon ( WHERE clause)  use only fields 
                        ekko~ebeln       IN ebeln
                       ekko~loekz       EQ ' '
                       ekko~lifnr       IN lifnr
                       ekko~ekorg       IN ekorg
                      ekko~ekgrp       IN ekgrp          
                       ekpo~werks       IN werks
                       ekpo~pstyp       EQ  '3'
                       ekpo~loekz       EQ  space
                       ekpo~elikz       EQ  space
                       ekpo~menge       NE  0
                     eket~rsnum       NE space.
    Thanks in Advance.
    bye.

    Hi,
    ekko~ebeln IN ebeln
    ekko~loekz EQ ' '
    ekko~lifnr IN lifnr
    ekko~ekorg IN ekorg
    ekko~ekgrp IN ekgrp
    ekpo~werks IN werks
    ekpo~pstyp EQ '3'
    ekpo~loekz EQ space
    ekpo~elikz EQ space
    ekpo~menge NE 0          " Remove this from where clause
    eket~rsnum NE space.    " Remove this from where clause
    ' instead delete the entries after fetching into the table
    DELETE it_itab WHERE menge EQ '0' AND rsnum EQ ' '.
    Regards
    Bala Krishna

  • Need to Improve  pefromance for select statement using MSEG table

    Hi all,
    We are using a select statement using MSEG table
    which takes a very long time to run the program which is scheduled in back ground.
    Please see the history below.;
    1) Previously this program was using SELECT-ENDSELECT statement inside the loop i.e.
    LOOP AT I_MCHB.
    To get Material Doc. Details
          SELECT MBLNR
                 MJAHR
                 ZEILE INTO (MSEG-MBLNR,MSEG-MJAHR,MSEG-ZEILE)
                 UP TO 1 ROWS
                 FROM MSEG
                WHERE CHARG EQ I_MCHB-CHARG
                 AND  MATNR EQ I_MCHB-MATNR
                 AND  WERKS EQ I_MCHB-WERKS
                 AND  LGORT EQ I_MCHB-LGORT.
          ENDSELECT.
    Endloop.
    The program was taking 1 hr  for  20 k data
    2)The above statement was replaced by ALL ENTRIES to remove the SELECT-ENDSELECT from the loop.
    ***GET MATERIAL DOC NUMBER AND FINANCIAL YEAR DETAILS FROM MSEG TABLE
        SELECT MBLNR
               MJAHR
               ZEILE
               MATNR
               CHARG
               WERKS
               LGORT
                   INTO TABLE I_MSEG
                   FROM   MSEG
                   FOR ALL ENTRIES IN I_MCHB
                   WHERE CHARG EQ I_MCHB-CHARG
                   AND   MATNR EQ I_MCHB-MATNR
                   AND   WERKS EQ I_MCHB-WERKS
                   AND   LGORT EQ I_MCHB-LGORT.
    3)After getting the further technical analysis from BASIS team , And with the suggestion to optimize the program by changing the INDEX RANGE SCAN to
           MSEG~M.
    SELECT MBLNR
               MJAHR
               ZEILE
               MATNR
               CHARG
               WERKS
               LGORT
                   INTO TABLE  I_MSEG
                   FROM   MSEG
                   FOR ALL ENTRIES IN I_MCHB
                   WHERE MATNR EQ I_MCHB-MATNR
                   AND   WERKS EQ I_MCHB-WERKS
                   AND   LGORT EQ I_MCHB-LGORT.
    At present the program is taking 3 to 4 hrs in back ground .
    The table is complete table scan using index
    MSEG~M.
    Please suggest to improve the performance of this
    many many thanks
    deepak

    The benchmark should be the join, and I can not see how any of your solutions can be faster than the join
    SELECT   .....
                  INTO TABLE  ....
                  UP TO 1 ROWS
                  FROM mchb as a
                  INNER JOIN mseg as b
                  ON    amatnr EQ bmatnr
                  AND  awerks  EQ bwerks
                  AND  algort    EQ blgort
                  And   acharg  EQ bcharg
                  WHERE a~ ....
    The WHERE condition must come from the select on MCHB, the field list from the total results
    you want.
    If you want to compare, must compare your solutions plus the select to fill I_MCHB.
    Siegfried
    Edited by: Siegfried Boes  on Dec 20, 2007 2:28 PM

  • Problem with select statement using Ranges

    Hi Guys,
                   I have used Ranges and used a select statement for selecting those ranges but I am facing a problem.
    RANGES: r_doctyp for EDIDC-DOCTYP.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'DEBMAS'.
    append r_doctyp.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'MATMAS'.
    append r_doctyp.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'PRICAT'.
    append r_doctyp.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'ORDERS'.
    append r_doctyp.
    r_doctyp-sign = 'I'.
    r_doctyp-option = 'EQ'.
    r_doctyp-low  = 'INVOIC'.
    append r_doctyp.
    Select DOCNUM                                " IDoc number
           DOCTYP                                " IDoc Type
                 from  EDIDC into table IT_ZEDIDC
                 where CREDAT EQ s_credat-low
                 and   DOCTYP EQ r_doctyp        " IDOC Types
                 and   DIRECT EQ '1'.
    Here my select statement is only taking INVOIC.
    But my statement should take any document type.
    Thanks,
    Prasad.

    Hi...,
    Your following select statement is correct.
    Select DOCNUM                                " IDoc number
                DOCTYP                                " IDoc Type
                from  EDIDC into table IT_ZEDIDC
                where CREDAT IN s_credat
                and   DOCTYP IN r_doctyp        " IDOC Types
                and   DIRECT EQ '1'.
    Why you are not getting result..
    1. structure of the IT_ZEDIDC is having two fields DOCNUM , DOCTYP  with same data lengths. If not it should be...
    2. Order in the database table is must be similer to the order you maintained in the select statement.
    3. As you are hard coding the input ranges make sure about every letter.
    4. take a look at other where condition fields too.
    5. check the table of the ranges in debugging mode.
    6. why can't you declare separate work area and table for ranges...?
      like .... data: r_tab type range of <field>
                 data: wa_tab like line of r_tab.
    7. Use clear work area statement after the append statment.
    --Naveen Inuganti.

  • Problem executing SELECT statement due to st_spatial column type

    I am using a CachedRowSet and cache.execute() will not run because it does not support the st_spatial column type. I have been told to use the column metadata to build a select statement of column names, and check the column's type before you add it to the select clause. But, I am unsure of what to do since I can't get column names without running a select statement first... I will attach some code for you to look at, but please give me suggestions!
    try{
    Class.forName("com.informix.jdbc.IfxDriver");
    CachedRowSet cache = new CachedRowSet();
    cache.setReadOnly(true);
    cache.setUrl(dbname);
    cache.setUsername(user);
    cache.setPassword(password);
    cache.setCommand("SELECT * FROM "+table);
    try{
    cache.execute();
    }catch(Exception e){
    out.print("Can't Display");
    OTHER JSP CODE THAT WORKS WITH THE RESULTS FROM ABOVE
    }catch(Exception exc){
    out.println(exc.toString());
    } // end try-catch

    I honestly don't have a clue. I have no idea what the st_spatial data type is, or where it is defined, and as a result, I don't know why Java would be complaining about it. I do know that java.sql.ResultSet doesn't care about it (it would internally recognize it as a plain old object type via the getObject() method and you would have to cast it to st_spatial).
    What I would check:
    Is the Informix driver up to date?
    Does the CachedRowSet class extend ResultSet or otherwise use it as an internal data structure? If so, does it properly create the ResultSetMetaData object and no exceptions are being trapped?
    Otherwise... when copying data from the ResultSet object into its own internal data structure, does it correctly realize that the st_spatial column should NOT be copied into a String or a slot in a String array?
    Does a quick and dirty command line version of your program properly use CachedRowSet to retrieve at least one record from your database?
    Basically, put the JSP aside and just test the CachedRowSet to make sure it is working correctly. I have no idea what's in that class since it is not a Java standard class, so I can't really give you any additional suggestions.

  • Limitation on SQL executing select statement from ADO and Oracle 8.1.7.1 OleDB Driver

    Hi,
    we are running a query with a big dunamic select statement from VB code using ADO command object. When Execute method is called system hangs and control won't return back to the application. it seems to be that there is some type limitation on Query string length. Please tell us if there is any?
    we are running Oracle 8.1.7 Server on Windows 200 Server and connecting from a W2K professional, ADO 2.6 and Oracle OLEDB 8.1.7.1 OLEDB Driver.
    Sample code:
    Dim rs As ADODB.Recordset
    Dim cmd As ADODB.Command
    Set cmd = New Command
    With cmd
    .CommandText = ' some text with more than 2500 characters
    .CommandType = adCmdText
    Set rs = .Execute
    End With
    when i debug using VB6 and when .Execute line is called system hangs or return a message method <<somemethod> of <<some class name>> failed error.
    Any help is appreciated.
    Thanks,
    Anil

    A stored procedure would only slow you down here if it was poorly written. I suspect you want to use the translate function. I'm cutting & pasting examples from the documentation-- a search at tahiti.oracle.com will give you all the info you'll need.
    Examples
    The following statement translates a license number. All letters 'ABC...Z' are translated to 'X' and all digits '012 . . . 9' are translated to '9':
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
    '9999999999XXXXXXXXXXXXXXXXXXXXXXXXXX') "License"
    FROM DUAL;
    License
    9XXX999
    The following statement returns a license number with the characters removed and the digits remaining:
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')
    "Translate example"
    FROM DUAL;
    Translate example
    2229
    Also, LIKE '%<string>%' is going to be rather expensive simply because it has to compare the entire string and because it forces full table scans, rather than using indexes. You could speed this sort of query up by using interMedia Text (Oracle Text now in 9i). If you can eliminate one of the '%' options, you could also improve things.
    My guess is that your stored procedure is inefficient and that's causing the problem-- 5k rows per table should be pretty trivial.
    If you post your query over on the PL/SQL forum, there are better performance tuners than I that might have more hints for you. To get really good advice, though, you'lllikely have to get at least the execution plan for this statement and may need to do some profiling to identify the problem areas.
    Justin

  • Table or view does not exists error while executing select statement

    Hi,
    I am new to Oracle. I am getting a error while executing the select statement if i give table name without double quotes.
    Ex: Select * from Customer;
    But working fine when the table name is enclosed within a double quotes.
    Ex: Select * from "Customer";
    Is there any way to execute the select statement without the double quotes?
    Actually I am using NHibernate objects for data access.
    Thanks,
    Sai

    Actually I am using NHibernate objects for data access.And probably that's the problem:
    SQL> select * from mytab;
             A
             1
    SQL> select * from mYtAb;
             A
             1
    SQL> select * from MYTAB;
             A
             1
    SQL>  select * from MYTAb;
             A
             1Oracle statements are case insensitive and doesn't require double quotes unless the object names are reserved words.
    As wrote by others if table is created using double quotes it's name bacomes case-sensitive... and this could be the problem...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/02/05/gestione-degli-errori-in-sql-con-log-errors/]
    Edited by: Massimo Ruocchio on Feb 5, 2010 7:08 PM
    Added last comment..

  • How to use a table name in the select statement using a variable?

    Hi Everybody,
                       I got a internal table which has a field or a variable that gets me some tables names. Now I need to retrieve the data from all these tables in that field dynamically at runtime. So could you suggest me a way out to use the select query which uses this variable as a table ?
    Regards,
    Mallik.

    Hi all,
    Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
    for ex : select * from (tab_name) where....?
    Can we do inner join on such select statements? If so how?
    Thanks & Regards,
    Mallik.

  • Problem in jdbc select statement

    {{  public List dis(int getmodified,int getindex){
    List outerList=null;
    outerList=new ArrayList();
    List display=null;
    try{
         System.out.println("testing.....3");
    con=getconnection();
    pstmt= con.prepareStatement("SELECT title from newss where nno >(10*(?)) and nno <=(10*?)");
         pstmt.setInt(1,getmodified);
         pstmt.setInt(2,getindex);
         System.out.println("testing.....2");
         //pstmt.setInt(1,pgno);
    rs=pstmt.executeQuery();
              while(rs.next())
                   display=new ArrayList();
                   display.add(rs.getString(1));
                   System.out.println("###########################" +rs.getString(1));
                   System.out.println("(((((((((((())))))))))" +display);
                   outerList.add(display);
    }catch(Exception e){
    System.out.println ("exception in select statement" +e.getMessage());
         System.out.println("*************" +outerList);
    return outerList;
    my problem is it says exception in select statement and no data found
    can someone resolve my problem}

    Check the below code snippet this what my fellow poster meant.check whether the proposed works well or not.
    public List dis(int getmodified,int getindex){
        List outerList = new ArrayList();
        List display=null;
         try{
              System.out.println("testing.....3");
              con = getconnection();
              pstmt = con.prepareStatement("SELECT title from newss where nno > ? and nno <= ?");
              pstmt.setInt(1,10*getmodified);
              pstmt.setInt(2,10*getindex);
              System.out.println("testing.....2");
              rs = pstmt.executeQuery();
              while(rs.next()){
                   display=new ArrayList();
                   String title = rs.getString(1);
                   display.add(title);
                  System.out.println("###########################" +title);
                  System.out.println("(((((((((((())))))))))" +display);
                  outerList.add(display);
       }catch(Exception e){
           e.printStackTrace();
       }finally{
           if(rs != null){
                 try{rs.close();}catch(Exception e){e.printStackTrace();}
           if(pstmt != null){
                   try{pstmt.close();}catch(Exception e){e.printStackTrace();}
           if(con != null){
                   try{con.close();}catch(Exception e){e.printStackTrace();}
            con = null;
            pstmt = null;
            rs = null;
       return outerList;
    REGARDS,
    RaHuL

  • How to pass a parameter into a select statement using a bulk collect

    Using a cursors I can use execute immediate to pass a parameter to specify a table name.
    I have modified the procedure not to use the cursor. I am using a collection using a bulk insert into a nested table. How can I specify the table the table name as a parameter without using the execute immediate statement.
    Thank you

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • Problem in excuting select statement

    Hi,
    I have created simple report and in start-of-selection i have writen select statement with bukrs and lifnr as parameters. But i am unable to execute the query.
    find the code
    start-of-selection.
      select bukrs
             lifnr
             name1
             name2
             name3
             from zapv_names
             into table it_zapv
             where  bukrs  =  p_bukrs
             and  lifnr =  p_lifnr.
    I am not under stand why it is not working. The code is correct. I have taken names as zname field and others are standered data elements.
    Thanks,
    RamuV

    I'm going to take a wild guess that since you show this to be the first statement
    after the START-OF-SELECTION line, that is is coming from a report program
    where the two field you are testing for are actually RANGEs on the selection screen.
    select bukrs
    lifnr
    name1
    name2
    name3
    from zapv_names
    into table it_zapv
    where bukrs = p_bukrs   " This is likely a RANGE
    and lifnr = p_lifnr.           " This is likely a RANGE
    Change them to this
    select bukrs
    lifnr
    name1
    name2
    name3
    from zapv_names
    into table it_zapv
    where bukrs IN p_bukrs   " This is likely a RANGE
    and lifnr IN p_lifnr.           " This is likely a RANGE
    Ranges would be tables and have value like 'IEQ0101' where with the = sign would never be equal.
    Edited by: Paul Chapman on Jan 12, 2009 12:23 PM

  • Performance problem of asset selection statement.

    Hi guys quick question.
    SELECT a~bukrs
               a~anln1
               b~anln2
               a~anlkl
               a~aktiv
               a~txt50
               a~lvtnr
               b~afabe
               b~afabg
               b~ndjar
               b~ndper
               INTO TABLE it_anla
               FROM anla AS a
               INNER JOIN anlb AS b
               ON a~bukrs EQ b~bukrs
               AND a~anln1 EQ b~anln1
               WHERE a~bukrs IN s_bukrs
               AND a~anln1 IN s_anln1
               AND a~anln2 EQ '0000'
               AND a~anlkl IN s_anlkl
               AND a~aktiv EQ '00000000'
               AND a~lvtnr IN s_lvtnr
               AND b~afabe EQ 01.
    I have a select statement which is filtered by capitalization date which is the field AKTIV. This select alone has 450 thousand hits. Having an ANLN2 = 0 and AKTIV  = blank/no date means that the asset group is no longer active.
    Now for another scenario I have to retrieve table ANLA again excluding all the Main Asset Number/ANLN1 found on that table.
    Is there a way to select by doing it only once?
    I tried to pass all the anln1 to a range table but the program dumps. I think the range table can't handle too many entries.
    Retrieving all the entries from the DB then processing it takes longer.
    I tried to delete the table using a loop but it takes to long as it process the table every loop.
    LOOP AT it_anla WHERE anln2 EQ '0000' AND aktiv EQ '0000000'.
          DELETE it_anla WHERE bukrs EQ it_anla-bukrs AND anln1 EQ it_anla-anln1.
        ENDLOOP.
    Thanks.
    Edited by: Thomas Zloch on Sep 21, 2010 5:39 PM - please use code tags

    Moderator message - Welcome to SCN
    If the range table for anln1 is large and contains distinct values, you can try using it in a FOR ALL ENTRIES construct rather than IN.
    Rob

  • Advice required on a select statement using "FOR ALL ENTRIES"

    Hi,
    this is really intresting ...
    I have a small requirement where in i have to find out
    the valid entries in my internal table (T_MATNR) by using a select statement to a check table (MARA) which has all the fields present in the internal table T_MATNR.
    Select statement is
    SELECT MATNR
           MTART
           from MARA
           for all entries in T_MATNR
           into table T_MATNR
           where matnr eq T_MATNR-MATNR.
    If you observe the itab in the option 'FOR ALL ENTRIES' and the destination table is the same. I want to know whether this is correct? will it cause any performance issue? right now this statement is working fine for me.

    Hi,
    U have to use
    SELECT MATNR
    MTART
    from MARA
    <b>into table I_MATNR(different table)</b>
    for all entries in T_MATNR
    where matnr eq T_MATNR-MATNR.
    If u r specifying both same table name then for what entries it will retrieve, if u have alreay selected some entries and appending u can use
    SELECT MATNR
    MTART
    from MARA
    <b>into table T_MATNR</b>where matnr eq T_MATNR-MATNR.
    then
    SELECT MATNR
    MTART
    from MARA
    <b>appending table T_MATNR</b>
    for all entries in T_MATNR
    where matnr eq T_MATNR-MATNR.
    In this way u can do.
    Hope u got it.

  • Executing select statement

    I want to exectue a select statement and show the result retrived in Tabular view(multiple records) how to do it?

    lets assume you want a tabular layout based on table employees in hr-schema:
    1. create a new data-block using datablock-wizard->choose table->choose columns->choose block-name
    2. invoke layout wizard after finishing block-wizard->choose items to show->set prompts->choose tabular layout->set number of records displayed to something>1->finish
    3. Layout editor is opened showing you the generated layout.
    4. Run the forms, query some data (ctrl-f11 or menu)

Maybe you are looking for

  • Template and flash video

    I want to insert a video using the insert flash video using DW8. I am using a chid page made from a template. When I try to insert the video it says the page is locked due to a template or translators. How can I do this?Thanks. Here is the page I wan

  • Cant click or type anywhere but the URL field in Safari! please help

    hi, i got my touch a few days ago and everything was fine until today, i turned it on, got connected and tried to check my email, via yahoo but when i was asked to enter my email, i couldnt click on the field where i was supposed to enter it then i t

  • Read and Write Binary File

    Hi... I have a problem. In C programming, if we want to read a file, we can determine to read it as text or binary. There is difference between them. But we still can read it in ASCII mode. My problem is : How to do that in Java ? I want to read any

  • Regarding reserving a material

    Dear Guru's, I am facing a problem while doing reservation through MB21.For the particular material we are having stock of around 780kg in unrestricted usage .When I am doing reservation for 730Kg,system is giving an error that on 17.03.2008,only 0Kg

  • Lost my ringtone after updating to  8.1.1 any one know how to retrieve them

    hi updated to 8.1.1 and seemed to have lost my ringtone I bought on Monday