How to rebuild index from different schema

Hi All,
I want to rebuild an Index of schema A from Schema B.
Is there any grant needs to be give to Schema B in order to rebuild index of Schema A?
Thanks,
Tarak

It is true what P. Forstmann said. However if you don't want to give the second user the ANY priviledge, then you can do a little workaround. Create a small procedure in Schema A that does the rebuild (maybe dynamically). Then grant execute rights on the procedure to Schema B.

Similar Messages

  • How to compare tables from different schema.

    Edited by: Adi's on 24-Jan-2010 03:30

    i am done with this report...
    sorry for editing it like that
    Edited by: Adi's on 24-Jan-2010 03:31

  • Accessing tables from different schema in CDS and AMDP

    Hi All,
    We are working on a HANA system which has several schema replicated from SAP R/3/Non SAP systems. We have BW 7.4 SP9 deployed on the same system and accessing the HANA views using latest BW virtual objects such as Open ODS , Composite providers etc.
    We are also using the BW system for few ABAP based data processing developments. We are currently accessing HANA views in ABAP programs by creating dictionary views based on external HANA views.
    We would like to however use recent possibilities of CDS and AMDP for better life cycle management of ABAP based solutions. The open SAP course on this subject was of very good help. Thanks a lot "open SAP team" for that. I would however have few open questions,
    As I understand AMDP gives us full flexibility of writing sql procedures within ABAP development environment, but can we access tables from different schema into AMDP code. If yes, then sample code would help.
    If the answer of first question is yes, then how do we manage transports between development and production systems where the schema names would be different. Currently in open HANA developments, such transport is manged using Schema mapping.
    Can I also use different schema tables in CDS views.
    We are updating few tables in ABAP dictionary after applying processing logic in ABAP program as detailed in step 1. With the new approach using AMDP, can we directly update database schema tables which will give us an optimization advantage.
    New ABAP HANA program interfaces are quite promising and we would like to use them to optimize many data intensive applications.
    Thanks & Regards,
    Anil

    Hi Anil,
    I can only answer 1. and 2. (and would be interested into 3. as well):
    1.
    Yes you can access tables from a different schema and also HANA views. In this case no 'using' is needed.
    Examples:
        RESULT = SELECT
        FROM
              "SAP_ECC"."T441V" AS t,
              "_SYS_BIC"."tmp.package/AFPO" AS a.
        WHERE ...
    2. In this case, if you need schema mapping: You could use HANA (projection) views which just forward to a different schema, also see example.
    Best regards,
    Christoph

  • No Easy Way to Join on Tables from Different Schemas

    Hi,
    The company policy does not allow to join on tables from different schemas or use db links...
    I'm tasked to come up with a Perl script that does exactly that - allows for the SELECT statement to do several joins on 3 different schemas. In addition 1 of the schemas is on the different host altogether.
    Upping the privileges for my user and allowing db links is not an option...Can someone, please help me to understand on a conceptual level how would I use Perl and what logic would it have and what would it (perl) do?
    Thank you,

    Court in the wrong job... ;)
    It's like a librarian who is a hard rock artist maintaining the silence in the premises. ;)
    My dear friend, i don't think this is the right place for your requirement. This is the PL/SQL forum. If you have any problem related PL/SQL or SQL you can place that here.
    Regards.
    Satyaki De.

  • How do I select from multiple schema's

    How do I select from multiple schema's
    Tried:
    SELECT * FROM schema1.table1, schema2.table2
    WHERE schema1.table1.column1 = schema2.table2.column2;
    Errored......

    Thanks
    We finally got in touch with our DBA and he said the same thing.
    SELECT t1.*,
    t2.*
    FROM schema1.table1 t1,
    schema2.table2 t2
    WHERE t1.column1 = t2.column2;
    I'll try it afther I finish a task my boss just gave me.
    BRB then.

  • How to join  fields from different internal tables and display into one int

    hai i have one doubt...
    how to join  fields from different internal tables and display into one internal table..
    if anybody know the ans for this qus tell me......

    hii
    you can read data as per condition and then can join in one internal table using READ and APPEND statement..refer to following code.
    SELECT bwkey                         " Valuation Area
             bukrs                         " Company Code
        FROM t001k
        INTO TABLE i_t001k
       WHERE bukrs IN s_bukrs.
      IF sy-subrc EQ 0.
        SELECT bwkey                       " Valuation Area
               werks                       " Plant
          FROM t001w
          INTO TABLE i_t001w
           FOR ALL ENTRIES IN i_t001k
         WHERE bwkey = i_t001k-bwkey
           AND werks IN s_werks.
        IF sy-subrc EQ 0.
          LOOP AT i_output INTO wa_output.
            READ TABLE i_t001w INTO wa_t001w WITH KEY werks = wa_output-werks.
            READ TABLE i_t001k INTO wa_t001k WITH KEY bwkey = wa_t001w-bwkey.
            wa_output-bukrs = wa_t001k-bukrs.
            MODIFY i_output FROM wa_output.
            CLEAR wa_output.
          ENDLOOP.                         " LOOP AT i_output
        ENDIF.                             " IF sy-subrc EQ 0
    regards
    twinkal

  • How to access symbol from different stage

    Hi everyone,
    I'm really new at Edge, so I still have a lot to learn and I need your help with something..
    I want to know how to access a symbol from another stage, here's what I've and what I want to do..
    I've the main index page with symbol named "content", in content I load other composition (page). called "page2".
    all I want to do is when I click a symbol "XX" inside "page2". The "content" symbol loads other composition called "page3".
    I don't know how to access "Content" from "page2", so I could load "page3" ..  that's it
    I feel like it's simple, but I just couldn't know how to do it, I',m sorry for bothering you for such a question, but I've searched a lot and I got nothing.
    Thanks
    I thought I could use something like this
    var comp = Edge.getComposition("EDGE-638329");  
    var stage = comp.getStage(); 
    var symp= comp.stage.getSymbol("content");
    EC.loadComposition("assets/units/stage1/s1_3/s1_3.html",symp);
    but it's still not working, could someone please tell me what I'm doing wrong?

    I have multiple compositions, where I need to go from one to another.
    I use click scripts in an element to do this, using identical pages with different animations on each page.:
    Click script:
    AdobeEdge.goLoc(url); //url is the URL of an identical new html page with a different animation
    Then I have a custom .js page that I use that has the function:
    AdobeEdge.goLoc = function(url) {
    location=url;
    Peter Small

  • HOW TO DROP INDEX OF OTHER SCHEMA

    hi,
    I want to know how can we refer to objects that are of other schema. i need to drop an index of a table that belongs to some other schema and so if i write :
    drop tablename.indexname; - its not working.
    Please Help
    Thanks

    You are trying to drop an index on a table that belong to a different schema you are connected to.
    Do not add the table name to your command.
    Simply try
    drop index schema_name.index_name;
    Nico P.

  • Query from different schema

    I am using oracle sqldeveloper. I am trying to run a query on a different schema. Whenever I run the following:
    Select *
    From SchemaA.Users us
    Order by US.last_name asc
    I get the following error:
    US.last_name: invalid identifier.
    I would get the same error when I place a where clause on the end as well. I am sure it is an error in syntax. Nonetheless, I am not sure how to correctly write the query. Any help on this topic would be great. Thanks in advance.

    Hi,
    NewApexCoder wrote:
    I am using oracle sqldeveloper. I am trying to run a query on a different schema. Whenever I run the following:
    Select *  
    From SchemaA.Users us  
    Order by US.last_name asc 
    I get the following error:
    US.last_name: invalid identifier.
    I would get the same error when I place a where clause on the end as well. I am sure it is an error in syntax. Nonetheless, I am not sure how to correctly write the query. Any help on this topic would be great. Thanks in advance.
    I don't see anything obviously wrong with the syntax, or ianything else in that code.  You didn't post CREATE TABLE and INSERT statements for the USERS table, so I can't actually test it, but I can run very similar queries, like this:
    SELECT    *
    FROM      scott.dept  sd
    ORDER BY  sd.dname  ASC
    Are you sure there's a column called LAST_NAME in the SCHEMAA.USERS table?  If I spell DNAME wrong, then the query above gets the "invalid identifier"  error, just like yours.
    USERS is an Oracle keyword, so it's not a very good table name.  That's almost certainly not what's causing this problem, however.

  • How to insert  data from different internal  table  into a data base table

    hi all,
             I want to insert a particular field in an internal table to a field in a data base table.Note that the fields in the internal table and database table are not of the same name since i need to insert data from different internal tables.can some one tell me how to do this?
    in short i want to do something like the foll:
    INSERT  INTO ZMIS_CODES-CODE VALUE '1'.
    *INSERT INTO ZMIS_CODES-COL1 VALUE DATA_MTD-AUFNR .(zmis_codes is the db table and data_mtd is the int.table)

    REPORT  ZINSERT.
    tables kna1.
    data: itab LIKE KNA1.
    data lv_kUNAG LIKE KNA1-KUNNR.
    lv_kuNAG =  '0000010223'.
    ITAB-kuNNR = lv_kuNAG.
    ITAB-name1 = 'XYZ'.
    INSERT INTO KNA1 VALUES ITAB.
    IF SY-SUBRC = 0.
    WRITE:/ 'SUCCESS'.
    ELSE.
    WRITE:/ 'FAILED'.
    ENDIF.
    Here lv_kunag is ref to kna1 kunnr passed in different name
    In internal table .
    Try and let me know if this logic dint work.

  • Analytic View with tables from different schema

    Hi,
    I'm curious if I make something wrong or if this is not possible:
    I want to use two tables each in a different schema. I can drop them into the DataFoundation, can connect them, assign them some measure. But activation fails due to insufficient privileges. When I use the tables from the same schema activation works well. With the insufficient privileges I would guess HANA cannot create a View (failed with the statement CREATE COLUMN_VIEW "_SYS_BIC"."USER/ANALYTIC_VIEW_NAME"....).
    Since I tried the same assignment with the System-User and failed I wonder what kind of permissions are required. Or is this generally not allowed (resp. prohibited)?
    If not allowed, could somebody give me a hint, why its not possible?
    If it is possible, what kind of rights are required to get it working?
    roland

    Hm', I have allowed SYS_REPO the rights to the table and was able to activate the view. But now I have the problem, that the DataPreview is not working (again insufficient privileges). What user has to have additional permissions for the JDBC-query?
    Do I have to take care more on the privileges for other things?

  • Read tables from different schemas in oracle

    Hi, I'm trying to write a code to run a query to get data from an Oracle server, the problem is that the query refers to multiple tables in multiple schemas... the regular way to do it in oracle (SCHEMANAME.TABLENAME) does not work in excel vba query and
    I cant find a way to so, any help will be really appreciated, below a sample code with one table from WWPP schema.....
    Const DB As String = "Driver={Microsoft ODBC for Oracle};" & _
                         "CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=1526))(CONNECT_DATA=(SERVICE_NAME=MyName)));" & _
                         "Uid=MyID;Pwd=MyPwd*;"
    Sub test()
        Dim cnt As ADODB.Connection, rst As ADODB.Recordset
        Set cnt = New ADODB.Connection
        Set rst = New ADODB.Recordset
        cnt.Open DB
        (I also tried this but didn't work) -> cnt.Execute "ALTER SESSION SET CURRENT_SCHEMA=WWPP"
        rst.Open "SELECT * FROM WWPP.SO_LIFE_CYCLE_BACKLOG_RP", cnt, adOpenDynamic, 2
        If rst.EOF = False Then
            Sheet1.Cells(2, 2).Select
            Selection.CopyFromRecordset rst
        End If
        rst.Close
    End Sub
    Oscar Marquez

    1) Posting the error number (i.e. ORA-00942) in addition to the error message is often quite helpful since that's generally far easier to look up and far less likely to get confused in translation.
    2) Are you using an invoker's rights stored procedure? Or a definer's rights stored procedure? If you're not sure, the default is definer's rights.
    3) How has YFS been granted access to the Y_PS table? My hunch is that it was granted access via a role, not via a direct grant. Privileges granted through a role would be available for ad hoc SQL queries, but those privileges are not available to a definer's rights stored procedure. A definer's rights stored procedure only has access to the privileges granted directly to the owner.
    If my hunch is correct, you'd either have to directly grant YFS access to the table(s) it needs to access in other schemas or you'd need to make the stored procedure use invoker's rights, which may have ripple effects down the line if users other than YFS are going to be running the procedure.
    Justin

  • How to get data from  different SEGMENTs

    Hi;
    My requirement is to first of all retrieve the data from different segments in run time.
    I mean, i have to execute t/code WE19 and the idoc will be given after that an user exit would called where i have to retrieve the data from different segments and then it would store in an internal table for further calculation.
    Can you all please guide me how to retrieve the data via ABAP code in runtime so that it can store in an internal table.
    Regards
    Shashi

    write code lke this ..
    form post_idoc tables idoc_data structure edidd
                                    idoc_status structure bdidocstat .
    loop at idoc_data .
      case idoc_data-segnam .
        when 'zsegment1'.
           move idoc_data-sdata to wa_zsegment1 .
        when 'zsegment2'.
          move idoc_data-sdata to wa_zsegment2 .
       when 'zsegmentn'.
          move idoc_data-sdata to wa_zsegmentn.
      endcase .
    endloop.
    After this write code to move data to int table from work area .
    endform .
    Hope this helps u....

  • How to get Time from Different Work Station on the Network

    Hi,
    How do I get time from different work station on the network using its ip:port etc.
    Lets say, my main server-side Java application is running on a work station 123.12.123.1:1527,
    the client-side applications are accessing it using above IP.
    what I wanna do is, use the time of 123.12.123.1 machine throughout the application, not client local time.
    Appreciated..

    Ok, this network service on IP:Port is working for me, I hope this is the best way of doing it.
    In server application, I have this
    package RenameItToYourOwnPackage;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.text.SimpleDateFormat;
    public class ServerSocketExample implements Runnable {
        private ServerSocket server;
        private int port = 7777;
        Socket socket;
        public void run() {
            try {
                System.out.println("Waiting for client message");
                server = new ServerSocket(port);
                while (true) {
                    socket = server.accept();
                    // Read a message sent by client application
                    ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
                    String clientMessage = (String) ois.readObject();
                    System.out.println("Message sent by client: " + clientMessage);
                    // send current datetime to client
                    ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
                    oos.writeObject(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new java.util.Date()));
                    ois.close();
                    oos.close();
                    socket.close();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
    }In the client application I have
    package RenameItToYourOwnPackage;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    public class ClientSocketExample {
        static String dateTimeString;
        public ClientSocketExample() {
        public static String getServerDateString() {
            try {
                // Create a connection to the server socket on the server application
                InetAddress host = InetAddress.getByName("127.0.0.1");
                Socket socket = new Socket(host.getHostName(), 7777);
                // Send a message to the server application
                 ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
                 oos.writeObject("Send me today's timestamp as string");
                // Read the response by server application
                ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
                dateTimeString = (String) ois.readObject();
                //System.out.println("Message sent by server: " + message);
                ois.close();
                oos.close();
            } catch (UnknownHostException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            return dateTimeString;
    }And I run the service on the server-side with
            new Thread(new ServerSocketExample()).start();On the client-side I receive the date with
            System.out.println("DateTime on Server : " + ClientSocketExample.getServerDateString());Edited by: nkamir on Sep 13, 2010 2:53 PM

  • How to access tables from multiple schemas

    Hi,
    I have access to 2 different schema (schema_a, Schema_B) through my APEX environment... I have a query that's based on tables from both the schemas... something like this
    select SCHEMA_A.table1.column1, table2.column2
    from
    SCHEMA_A.table1, table2
    it is giving me a message that table doesn't exist.
    Please advice.
    Thanks

    You need to grant the required permission (if there is no restriction then you can use GRANT ALL), You can give the permission to particular user on the schema.
    conn / as sysdba
    grant select on userA.table_name to userB;
    connect userB/passwordB
    select userA.table1.column1, table2.column2
    from
    userA.table1, table2;Refer these links,
    https://forums.oracle.com/forums/thread.jspa?threadID=616903
    http://www.techonthenet.com/oracle/grantrevoke.php_
    Thanks
    Lakshmi

Maybe you are looking for