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

Similar Messages

  • 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

  • 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 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

  • How do I move a table from one schema to another schema?

    How do I move a table from one schema to another schema?

    Grant access to the table from the source schema to destination schema.
      GRANT SELECT ON <TABLE_NAME> TO  <DESTINATION SCHEMA>A simple way would be to use CREATE Table with select syntax (in destination schema)
      CREATE TABLE <TABLE_NAME> AS SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME><li>However, you would be in <b><u>trouble when the table has index,constraints and triggers</u></b>.
    So you can better of grab the DDL statement of the table(and any additional components) andd then create the table in the destination schema.You can use SQL developer, Toad or Apex's Object browser for this.
    After the table is created, Insert the records using SELECT.
    INSERT INTO <TABLE_NAME> SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME>This question is discussed in great detail in this <b>AskTom thread</b>

  • POWL accessing data from multiple tables/objects

    Hello,
    I have a query on the POWL applications.
    If the powl application has to access data from multiple tables/objects, then the solution would be creating a data structure of those tables/objects and referring to that structure in GET_OBJECT_DEF methods.
    Is there any other soln? or I am right here?
    The queries which are saved for a particular user are transportable? if not, how can they be made transportable?
    Thanks & regards,
    Ravish

    you are right, you can do in get_objects method.
    POWL_QUERIES are transportab;e, you can save them in POWL_QUERY transaction.
    Best regards,
    Rohit
    http://wiki.sdn.sap.com/wiki/display/WDABAP/POWL

  • How can we copy table from one schema to other schema

    Hi,
    I have create one table in one schema and i want to copy it to other schema.How we can copy table from one schema to other schema

    Hi,
    You can try something like this :-
    SQL> CONNECT SYS/SYS123@SERVER AS SYSDBA
    Connected.
    SQL> CREATE USER TEST_1 IDENTIFIED BY TEST_1;
    User created.
    SQL> CREATE USER TEST_2 IDENTIFIED BY TEST_2;
    User created.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_1;
    Grant succeeded.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_2;
    Grant succeeded.
    SQL> CONNECT TEST_1/TEST_1@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY ( TEST_COL NUMBER );
    Table created.
    SQL> INSERT INTO TEST_COPY VALUES ( 1 );
    1 row created.
    SQL> INSERT INTO TEST_COPY VALUES ( 2 );
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> GRANT ALL ON TEST_COPY TO TEST_2;
    Grant succeeded.
    SQL>  CONNECT TEST_2/TEST_2@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY AS SELECT * FROM TEST_1.TEST_COPY;
    Table created.
    SQL>  SELECT * FROM TEST_COPY;
      TEST_COL
             1
             2Regards,
    Sandeep

  • How do I move a table from one schema to another schema on Oracle XE?

    How do I move a table from one schema to another schema on Oracle XE?

    Hi,
    I tried to use the insert/select statement that you had given, it did not work.
    The error is ORA-00913: too many values.
    But finally what I did was, I went into the system schema where the table was and generated the DDL through the utilities and afterwards I imported them into the schema that I am currently working on. It solved the problem!
    However I am still curious to know why the insert/select statement did not work? Do you know any site/tutorial which gives a real time example?
    Thank you
    Skye

  • APEX  How do I create a Form based on a Database Table from other schema

    My APEX schema is WISEXP. I have a database table that resides in WISDW schema on the same database. I want to create Tabular form based on this table.
    I am not able to create a FORM based on the table from WISDW schema. I am able to create a FORM based on SQL though from this table in WISDW schema - but it does not do any action on Update/Insert rows.
    Appropriate Synonyms and grants are created. Is there a limitation or am I missing something? Please advise.
    thanks
    Rupen

    If Rupen is using 2.2 or 2.2.1, it is likely he is running into the bug described here: Re: Workspace to Schema Assignments
    In that case, it may be a necessary and sufficient workaround to assign the foreign schema to the workspace.
    Scott
    Message was edited by:
    sspadafo

  • 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 access tables/views of an external database provider..

    After much trouble I finally managed to setup a second Database Provider that doesn't display the "0 out of 0 connections are good" error by filling in the "Configuration Class" field with "intradoc.server.DbProviderConfig".
    But now the problem is actually accessing the tables/views in my newly configured external database provider...
    In the Configuration Manager applet when I try to add a new Table or View it only lists the tables contained in the schema of the SystemDatabase database provider (the original one), I've tried running Queries via components trying stuff like SELECT * FROM provider_name.table_name and other similar but obviously it doesn't work...
    So... with that said, I just want to know how I access tables or views in my "supposedly" well conected (15 out of 15 connections are good, no errors on the Test Query) Oracle external Database Provider - After searching I was unable to find any information regading any post-provider-setup actions in the Content Server documentation - Does anyone know how to do this?
    On a side note, if the database is SQLServer instead of Oracle, with the same configuration and apparently no errors on the database side (other clients access it well) the Query Test of the new database provider returns the following error:
    "The provider 'TestSqlSrv' is in error. Unable to create database connection for JDBC:ODBC:SqlSrv. Unable to create result set for query 'select * from dummy'. Invalid Fetch Size Unable to create result set for query 'select * from dummy'. Invalid Fetch Size java.sql.SQLException: Invalid Fetch Size".But I won't even go there yet.... for now I would settle with just knowing how to reference information in the Oracle external database provider...
    Message was edited by:
    user602700

    if you are able to, pick up Bex Huff's book the Definitive Guite to Stellent Content Server Development (amazon link: http://www.amazon.com/Definitive-Stellent-Content-Server-Development/dp/1590596846/ref=sr_1_1?ie=UTF8&s=books&qid=1196365101&sr=8-1)
    chapter 11 is all about this.

  • SELECT from multiple schema's

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

    Hello
    you need to use an alias for each table
    tylerd@UAT51> select dual.dummy from dual, dual
      2  /
    select dual.dummy from dual, dual
    ERROR at line 1:
    ORA-00918: column ambiguously defined
    tylerd@UAT51> select dual_1.dummy,dual_2.dummy from dual dual_1, dual dual_2
      2  /
    D D
    X X
    1 row selected.

  • SQL Loader to Load Multiple Tables from Multiple Files

    Hi
    I wish to create a control file to load multiple tables from multiple files
    viz.Emp.dat into emp table and Dept.dat into Dept table and so on
    How could I do it?
    Can I create a control file like this:
    OPTIONS(DIRECT=TRUE,
    SKIP_UNUSABLE_INDEXES=TRUE,
    SKIP_INDEX_MAINTENANCE=TRUE)
    UNRECOVERABLE
    LOAD DATA
    INFILE 'EMP.dat'
    INFILE 'DEPT.dat'
    INTO TABLE emp TRUNCATE
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
    (empno,
    ename,
    deptno)
    INTO TABLE dept TRUNCATE
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
    (deptno,
    dname,
    dloc)
    Appreciate a Quick Reply
    mailto:[email protected]

    Which operating system? ("Command Prompt" sounds like Windows)
    UNIX/Linux: a shell script with multiple calls to sqlldr run in the background with "&" (and possibly nohup)
    Windows: A batch file using "start" to launch multiple copies of sqlldr.
    http://www.pctools.com/forum/showthread.php?42285-background-a-process-in-batch-%28W2K%29
    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx?mfr=true
    Edited by: Brian Bontrager on May 31, 2013 4:04 PM

  • 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

  • Is it possible to export tables from diffrent schema using expdp?

    Hi,
    We can export tables from different schema using exp. Ex: exp user/pass file=sample.dmp log=sample.log tables=scott.dept,system.sales ...But
    Is it possible in expdp?
    Thanks in advance ..
    Thanks,

    Hi,
    you have to use "schemas=user1,user2 include=table:"in('table1,table2')" use parfileexpdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log{quote}
    I am not able to perform it using parfile also.Using parfile it shows "UDE-00010: multiple job modes requested, schema and tables."
    When trying the below, i get error
    {code}
    bash-3.00$ expdp directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=(\'MM\',\'MMM\') include=TABLE:\"IN\(\'EA_EET_TMP\',\'WS_DT\'\)\"
    Export: Release 10.2.0.4.0 - 64bit Production on Friday, 15 October, 2010 18:34:32
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=('MM','MMM') include=TABLE:"IN('EA_EET_TMP','WS_DT')"
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "MM"."EA_EET_TMP" 0 KB 0 rows
    ORA-39165: Schema MMM was not found.
    Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
    /export/home/nucleus/dump/test.dmp
    Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 1 error(s) at 18:35:19
    {code}
    When checking expdp help=y shows :-
    {code}TABLES Identifies a list of tables to export - one schema only.{code}
    As per few testing,tables from different schemas are not possible to export using expdp in a single command.
    Anand

Maybe you are looking for