Accessing a Cube under different schema

Guys,
Is it possible for a user to access OLAP cube residing in a different schema under same oracle database and SID ? If yes, how it can be done (permissions etc.)
Thanks,
Mav

Hi,
Yes this is possible. The other user needs to have the olap_user role, and if you are going to use discoverer it also needs the d4opub role.
In addition to that you also need to grant rights on the AW$ table to the user you want to give access to.
The AW$ table is where actually the AW is stored and should be in the schema where you have created the AW. The name of it s AW$<AW_NAME> so in order for you to grant select on it to other users, all you need to do is the following:
grant select on aw$<aw_name> to <user>
Ragnar

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

  • JDBC Lookup - Import table data from a different schema in same DB

    Hi XI Experts,
    We are facing an issue while importing a Database table into the external definition in PI 7.1.
    The details are as below:
    I have configured user 'A' in PI communication channel to access the database. But the table that I want to access is present in schema "B". Due to this, I am unable to view the table that I have to import in the list available.
    In other words, I am trying to access a table present in a different schema in the same database. Please note that my user has been given all the required permissions to access different schema. Even then, I am unable to access the table in different schema.
    Kindly provide your valuable suggestions as to how I can import table which is present in another schema but in the same Database.
    Regards,
    Subbu

    If you are using PI 7.1, then you can do JDBC Lookup to import JDBC meta data (table structures from DB). Configure a jdbc receiver communication channel where you specify username and password which has permission to access schema A and Schema B of database. Specify database name in the connection string. Then you might have access to import both schema.
    Please refer these links
    SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups
    How to use JDBC Lookup in PI 7.1 ?

  • Stored Procedure executes on two different schemas in Oracle 8i

    Can I Create a Stored Procedure that access table from two different schemas?
    For Example I have created this Stored Procedure on SCHEMA_ONE
    CREATE OR REPLACE PROCEDURE SP_DEMO IS
    BEGIN
    INSERT INTO SCHEMA_ONE.COUNTRY_ONE(COUNTRY_NAME)
    SELECT COUNTRY_NAME
    FROM SCHEMA_TWO.COUNTRY_TWO
    END SP_DEMO;
    and when I execute it I am getting error message as :
    Error: PLS-00201: identifier 'SCHEMA_TWO.COUNTRY_TWO' must be declared
    is that possible? If yes then what I need to do for that?
    Please assist me.

    hi john
    How are you?
    please have a view there and correct me if m wrong.
    insufficient privileges
    Khurram Siddiqui
    [email protected]                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Creating dup app in different schema...

    I have found a few notes on exporting/importing applications, but they don't tell me whether the export is a copy or move. I need to keep both schema's versions of the same application. My original version is under my personal schema. I am ready for office wide testing. How do I copy my application so that I have both versions, but under different schemas. Exactly how do I do that? Is it simply exporting the application and then performing an import?

    Hello,
    >> but they don't tell me whether the export is a copy or move
    Export is a copy. APEX creating a SQL script, which include all the application meta data. Your original application is stay intact.
    >> Is it simply exporting the application and then performing an import?
    Basically Yes. You are exporting your application on one server, and import it on the other. As part of the import process, you can choose the schema in which to install the application.
    However, as you are installing your application on a new server/schema, you need also to copy and install all the supporting objects (on the database level) your application is using. You can read more about how to deploy a new application in the following - http://download-uk.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32471/deploy.htm#BABGJIAD .
    Regards,
    Arie.

  • Acess table located on different schema

    hi ,
    oracle 10.2.0.1.0
    I have production database and i'm able to access video_asset_language located on different schema (CAM) of same db.there is synonym for the table here (at production ) .If I query user_synonyms the last column DBLINK has entry here.
    Now from development DB I created a synonym for the table video_language_asset located in CAM schema. it says "translation error " . Synonym is created but not able to fetch from the table. If I query user_synonyms the last column DBLINK has no entry here.
    Please suggest what I need to do .
    thanks
    Kishna

    - Verify you have been granted select access to the table (from user_tab_privs_recd)
    - Verify the database link exists, if not create it (get the definition using dbms_metadata.get_ddl
    - get the correct synonym definition, and replace the synonym when (get the definition using dbms_metadata.get_ddl)
    Sybrand Bakker
    Senior Oracle DBA

  • Getting list of tables the user has access to across different schemas.

    Hi,
    I have to get the list of tables that an User has access to. I tried the below code. It takes a very long time. Is there any way in which I can specify the user name and get all the tables that he has access to? I know that we can use dbMetadata.getTables api. But this returns the list of tables under the said schema. But I want the list of tables that the user has access including tables in other schema.
    In the below code, I am trying to get the tables for which USER_MICHAEL has access to.
    DatabaseMetaData dbMetadata = connection.getMetaData(); String userName = null; dbrs = dbMetadata.getTables(null,userName , "%", new String[] { "TABLE" }); dbrs=dbMetadata.getTablePrivileges("",userName,"%"); while (dbrs.next()) { String tableName = dbrs.getString("TABLE_NAME"); String schema = dbrs.getString("TABLE_SCHEM"); String privilege = dbrs.getString("PRIVILEGE"); String grantee = dbrs.getString("GRANTEE"); if(grantee!=null && grantee.equals("USER_MICHAEL")){       System.out.println("Schema---"+schema+" Table---"+tableName+"  Privilege----"+privilege+"  grantee---- "+grantee); } }

    That would be database dependent.
    Some engines have some system tables that together may be used to extract such information, others may not make it available at all outside closed APIs.

  • MapViewer metadata problem - accessing spatial data in a different schema.

    I have a MapViewer application that uses data from three different schemas.
    1. Dynamic Themes come from schema A.
    2. Static Themes come from schema B.
    3. A newly added static theme in B whose data comes from schema C.
    The mapviewer datasource points to schema B where the static themes, data and metadata are defined while the dynamic themes have their own datasource specified as part of addJDBCTheme(...).
    To get the newly added map to work I've had to add a view in schema B that points to C instead of referencing directly the table and I've had to add the metadata twice, once for schema B and once for schema C.
    If I put the metadata in just one of the two schemas I get the following errors.
    08/11/21 13:58:57 ERROR [oracle.sdovis.ThemeTable] cannot find entry in ALL_SDO_GEOM_METADATA table for theme: AMBITOS_REST
    08/11/21 13:58:57 ERROR [oracle.sdovis.ThemeTable] java.sql.SQLException: Invalid column index
    OR
    08/11/21 13:53:39 ERROR [oracle.sdovis.theme.pgtp] java.sql.SQLException: ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    It's not a big deal but I'd like to know if anyone else has has similar problems.
    Saludos,
    Lew.
    Edited by: Lew2 on Nov 21, 2008 6:42 AM

    Hi Lew,
    if you are using a recent version (10.1.3.1 or later) there is no need to use a view and to create the metadata in both schemas.
    You need to grant selection on tables between the schemas.
    You can try the following. Assume you have the MVDEMO schema (from MapViewer kit) and SCOTT schema.
    1) grant select on MVDEMO Counties table to SCOTT
    SQL> grant select on counties to scott;
    2) Now you are ready to create a predefined theme in schema SCOTT using the MVDEMO Counties table.
    - Open MapBuilder and loads the SCOTT schema.
    - On the Data navigator (bottom left tree), go to Geometry tables and you should see the MVDEMO node and the COUNTIES node inside it.
    - Start a wizard to create a geometry theme based on this Counties table.
    - At the end you should see that the base table name is MVDEMO.COUNTIES. Therefore MapViewer will use the metadata in MVDEMO schema and there is no need to replicate it in SCOTT schema.
    Joao

  • Accessing a different schema in Oracle

    Hi,
    I currently have a great deal of code that assumed it would have access to the same database schema as the logged on user e.g.
    "Select * from TABLE_NAME" (no need to specify schema name).
    I have found out that we will now be using a system where the user that logs on, will be granted select, update and delete priviledges on another schema. So now after setting up the connection, my code would have to read: "Select * from ANOTHER_SCHEMA.TABLE_NAME" where ANOTHER_SCHEMA is the schema that contains the tables.
    My question is, since I would have to modify a great deal of code at this point, is there any way to change the user on an existing connection so that I would not have to manually affix the new schema name to all table references? I would have to be able to do this without logging on as this alternate user since we will not have the password for that user (for security reasons).
    I have considered creating views in the initial schema that access the alternate schema (e.g CREATE VIEW TABLE_NAME AS SELECT * FROM ANOTHER_SCHEMA.TABLE_NAME), however I was wondering if there might be a better way to do this?

    Yes he would have to change his code. I am just used to using "S_" and it is the standard Oracle naming convention for synonyms. (Also it makes it clear that you are referencing the table via a synonym rather than hitting the table directly.
    Why not encode all table names in an abstract class.
    Eg
    package utils;
    public class TableNames
    public static final String TABLE_NAME1 = "S_TABLE_NAME1";
    public static final String TABLE_NAME2 = "S_TABLE_NAME2";
    //etc etc
    This class can then be used in the building of sql statements. If the table name happens to change at any time then a change is only required in TableNames class.

  • Import of BaseView to a different schema in database

    Hi All,
    We have developed some bam reports. Now the base view, meta view are referring to a schema name (say SchemaName1) in database.
    In the plans we are using "SQL query" to get data from database. So we have queries like "Select SchemaName1.table1.column1 ... from ......".
    Now we have taken a export of the base view, meta view ,plans and all other components of BAM.
    All is fine till now... But now i need to import all these stuff in a different database. My problem is that in the new database instance i cannot use the same schema name (i.e. SchemaName1 ). I have a different schema name(say SchemaName2) there and i need to use that......There is no way i can use SchemaName1.
    Will the import of Base view/Meta view/plans work or we need to do some configuration changes during import??
    Do we have to create Base view for the new schema names from scratch or the imported code can be used??
    The plans have sql queries referring to SchemaName1 but we need it to refer to the Other schema(SchemaName2 )...What is the possible way of referring to the new schema without developing the plan again??
    Waiting for your valuable feedback...

    ***Backup your repository database***
    ***Please review all steps before attempting***
    Sarputil Export
    1.     Start | Run, type “sarputil”
    2.     Do a partial export. (Note down directory that will contain files to be exported.).
    3.     Select your Baseview, Metaview, Security:Login Profile, and Plan. (Note, the check boxes are in front of each object name and might appear very light on some clients.)
    4.     On the XML dialog and with the question on what you would like to do – select Execute Now.
    5.     Finish the wizard and from the directory noted above, verify .csv files were created. (Typically C:\OracleBAM\EnterpriseLink\Data\rp\export).
    6.     Copy all .csv files and paste to different temporary folder on 2nd server.
    Sarputil Import
    1.     Start | Run, type “sarputil” on the 2nd server where you’ll import into.
    2.     Partial import
    3.     Under Repository Information dialog, set the Data Source information on the right and remember to change the directory now containing your .csv files.
    4.     Like before, select “Execute now” and Finish the wizard.
    Oracle BAM Admin
    Modify connect string (host string or tns name) if you need to:
    1.     Connect in Oracle BAM Admin
    2.     Expand Baseviews and select the imported Baseview
    3.     Check under “Server” on the left if the connect string is correct.
    4.     If not, click Modify button and change.
    Modify Baseview Login if you need to:
    1.     With your Baseview still selected on the left side, click on “Baseview Logins” tab
    2.     Logins on the left correspond to actual database user id’s and password. Add a new Login with a database User ID and Password to access the new schema.
    3.     Associate or Set the new Login (right) to the BAM User on the left.
    Sarpbv Modification
    Use sarpbv utility to change references of the old schema name to a new schema name.
    General syntax for Oracle:
    sarpbv /R"username:pwd:Oracle:TNS Name::DB UserID:DBUser pwd” /B"BaseView name" /O"NewSchema"
    **Use Capital letters for New Schema name!
    **Notice 2 colons (::) after TNS Name (because you do not have a database name in Oracle).
    1.     Open DOS
    2.     Type your sarpbv command. Below is an example where I changed a Baseview called “scott” to use a new schema name called Jack.
    sarpbv /R"sa::ORACLE:baminst::sagent:sagent" /B"scott" /O"JACK"
    3.     Open Design Studio, locate the plan and check the SQL Query now reflects the new schema.
    4.     Test the plan to ensure it’s pulling data correctly from the new schema.

  • Any way to use a single application but point it to different schemas?

    From the searching I have done, it appears that when an end-user runs an application, it can only be associated with a pre-defined schema, which I guess I just need confirmation of. What I was hoping to be able to do was either dynamically change to a different schema at run-time, or create an end-user that is associated with a different schema than the one the application is associated to so the user could use the one application but access a given schema.
    The scenario is that in our production environment, we need to maintain a separate schema for each client we manage data for. But we'd like to maintain one application end users would use but could run against any one of the client schemas. However, it seems that we willneed to make a copy of the application within the production workspace for each client schema that would be the owner schema if I understand how this works. Thus, if we have 7 different schemas we would have to have 7 copies of the application, one associated with each application.
    Thanks in advance!
    Monte Malenke

    Thanks Scott for quick response.
    We will go with different workspace for each schema.
    Just to give you quick background of my requirement. We have a 3 oracle E-Business versions (11.5.8, 11.5.9 and R12 in future) and APEX installed on another 11g database. We don't want to installed APEX on EBS database because of DB patching issues, our EBS 11i database version is 9i DB, future oracle EBS supoort and at the same time we want to use APEX 3.1.2 with 11g. We want use APEX for custom EBS Web UI development.
    We are planning to create separate schema on APEX database for each EBS instance and DB link which points to EBS database. Under APEX schema we are planning to create a view (on our custom table which are same across all EBS instances) using DB link under each schema.
    We will develop APEX application under one of the workspace and they deploy to other workspaces. We have also looked into creating APEX pages based on pl/sql procedure and we can do dynamic sql to query data from EBS instances. But its lots of code (create pl/sql api for every table) and we can not take a advantages of some of the APEX build-in wizard like master-detail, APEX record locking etc
    Based on your APEX experience; Do you think this the way we should go? OR Is there any better way?.
    Thanks in advance
    RK

  • APEX Application accessing data from two different databases

    Hi All,
    Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
    I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
    Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
    Is it possible to configure this scenario?
    The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
    Thanks
    Nil

    1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
    2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
    3. I mean create synonyms on DB1 for reports VIEWS in DB2.
    Hope all is clear!

  • Dbms_sql  in a different schema from query table-error  ** ORA-00942

    Oracle Experts,
    I think I am having problems with using DBMS_SQL in which the function was created in one schema and the query table was created in a different schema.
    We have 2 schemas: S1, S2
    We have 2 tables:
    T1 in Schema S1
    T2 in Schema S2
    We have a function F1 created by DBA in schema S1 that uses the dbms_sql as:
    CREATE OR REPLACE FUNCTION S1.F1(v1 in VARCHAR2) return NUMBER IS
    cursor1 INTEGER;
    BEGIN
    cursor1 := dbms_sql.open_cursor;
    dbms_sql.parse(cursor1, v1, dbms_sql.NATIVE);
    dbms_sql.close_cursor(cursor1);
    return (0);
    EXCEPTION
    when others then
    dbms_sql.close_cursor(cursor1);
    return (1) ;
    END;
    I am using jdeveloper 11G. We have an Oracle DB 11g.
    We have a java program which uses jdbc to talk to our Oracle DB.
    Basically, in my java program, I call function F1 to check if the query is valid.
    If it is, it returns 0. Otherwise, returns 1:
    oracle.jdbc.OracleCallableStatement cstmt = (oracle.jdbc.OracleCallableStatement) connection.prepareCall ("begin ? := S1.F1 (?); end;");
    cstmt.registerOutParameter (1, java.sql.Types.INTEGER);
    cstmt.setString(2, "Select * from S2.T2");
    cstmt.execute ();
    Since the table that I run the query is T2, created in different schema than F1 was created in, I have the error:
    ** ORA-00942: table or view does not exist
    So my questions are these:
    - I am using Oracle DB 11g, if I run the query on a table that created in a different schema from the one that the function (which uses dbms_sql) was created in, I would get the error ORA-00942?
    - If I runs the query on table T1 in the same schema as the function F1, would I have the same problem(The reason I ask is I cannot create any table in schema S1 because the DBA has to do it; I am not a DBA)
    - This is not a problem, but a security feature because of SQL injection?
    - How to resolve this issue other than creating the table in the same schema as the function that utilizes DBMS_SQL?
    Regards,
    Binh

    Definer rights (default) stored objects run under owner's security domain and ignore role based privileges. So regardless what user you are logged in as, function S1.F1 always executes as user S1 and ignores user S1 roles. Therefore exeuting statement within S1.F1:
    Select * from S2.T2requires user S1 to have SELECT privilege on S2.T2 granted to S1 directly, not via role.
    SY.

  • How can i import tables from a different schema into the existing relational model... to add these tables in the existing model? plss help

    how can i import tables from a different schema into the existing relational model... to add these tables in the existing relational/logical model? plss help
    note; I already have the relational/logical model ready from one schema... and I need to add few more tables to this relational/logical model
    can I import the same way as I did previously??
    but even if I do the same how can I add it in the model?? as the logical model has already been engineered..
    please help ...
    thanks

    Hi,
    Before you start, you should probably take a backup copy of your design (the .dmd file and associated folder), in case the update does not work out as you had hoped.
    You need to use Import > Data Dictionary again, to start the Data Dictionary Import Wizard.
    In step 1 use a suitable database connection that can access the relevant table definitions.
    In step 2 select the schema (or schemas) to import.  The "Import to" field in the lower left part of the main panel allows you to select which existing Relational Model to import into (or to specify that a new Relational Model is to be created).
    In step 3 select the tables to import.  (Note that if there are an Foreign Key constraints between the new tables and any tables you had previously imported, you should also include the previous tables, otherwise the Foreign Key constraints will not be imported.)
    After the import itself has completed, the "Compare Models" dialog is displayed.  This shows the differences between the model being imported and the previous state of the model, and allows you to select which changes are to be applied.
    Just selecting the Merge button should apply all the additions and changes in the new import.
    Having updated your Relational Model, you can then update your Logical Model.  To do this you repeat the "Engineer to Logical Model".  This displays the "Engineer to Logical Model" dialog, which shows the changes which will be applied to the Logical Model, and allows you to select which changes are to be applied.
    Just selecting the Engineer button should apply all the additions and changes.
    I hope this helps you achieve what you want.
    David

  • Staging area and base are in different schema/tablespace

    Please can someone give me some advantages and disadvantages to keep staging tables and base tables in same schema. For eg we have staging area where we daily truncate staging table, load in the stg table and do transformation process. Once done we will move the staging table data to base tables. Base tables sizes are huge volume like 6 to 8 million rows as there is no purging done.
    I want to suggest to my team that we should keep them in separate schemas as I understand it will be good from I/O point.
    Is there any other reason to keep staging and base tables in separate schema/tablespace.

    Hi,
    Definitely I agree with previous answers. You wrote that staging area, transformation etc.. So I think it's a datawarehouse. Staging and base tables should be stored in different data files also in different harddrives. During the ETL task there can be high load on the Disk subsystem. Storing them in different schemas is another subject which is not related with the disk performance.
    When it comes to blocksize of the datafile, there is a approach like this:
    If the database is used for OLTP systems, it would be good idea to setup smaller size blocks. But when we're talking about a datawarehouse, it's highly recommended to use larger block sizes like 16KB or 32KB. This setting has an advantage related to reading, accessing data blocks.
    Regards,
    Cuneyt

Maybe you are looking for