Report on a table from another schema

hi,
i have a table PROJECTS in schema CSALE when i create a report in APPEXP application (persing via user TESTER2) it gives me the error table does not found while TESTER2 has full writes on PROJECTS table.
select project_id ID, Project_name DESC from SCALE.PROJECTS;
when i run this query from SQL PLUS it works fine.
I have used synonym it giving me the error
ORA-04045: errors during recompilation/revalidation of TESTER2.PROJECTS
ORA-00980: synonym translation is no longer valid
Please help me how can i create a report on the table of other schema.
Thanks

In your schema CSALE (SCALE you stated as well)
GRANT SELECT ON projects TO tester2In your schema TESTER2
CREATE OR REPLACE SYNONYM projects FOR csale.projectsnow
SELECT project_id ID, project_name description
  FROM projects;should work for you.
Please note:
You were using a reserved word in your query (DESC) for column alias for Project_name.
Denes Kubicek

Similar Messages

  • Create stored procedure with table from another schema throws PLS-00201

    Oracle 10g. I'm new to procedures, so maybe I'm missing something obvious.
    Schema owner ABC has table T2001_WRITEOFF. The SYSDBAs granted SIUD to Some_Update_Role, and granted that role to developer user IJK. User IJK then created a private synonym T2001_WRITEOFF for ABC.T2001_WRITEOFF. This worked with normal SQL DML commands. 
    When I try to create a simple procedure as follows, it throws PLS-00201 identifier 'T2001_WRITEOFF' must be declared, and points to the 2nd line.
    create or replace procedure woof1(
      fooname in T2001_WRITEOFF.territory%TYPE,  <=== error points here
      bardesc IN T2001_WRITEOFF.ind_batch_submit%TYPE) IS
    BEGIN
       INSERT into T2001_WRITEOFF
       VALUES ( fooname, bardesc);
    END woof1;
    What am I doing wrong?
    Thanks
    JimR

    Hi,
    The reason I've heard has to do with knowing when a procedure becomes invalid due to privileges being revoked.  Any time a grant to a role is revoked, you would have to check all procedures that depended on that role to know if they were still valid.  Even worse, since roles can be granted to other roles, every time a role is revoked from another role, you would have to check all procedures that depended on anything to see if they were still valid.
    Oracle 11 behaves the same as earlier versions in this regard, and I don't expect this to change.
    This whole thread applies only to AUTHID DEFINER stored procedures (which is the default).  If you can make the procedure AUTHID CURRENT_USER, then you can run it with privileges granted through roles.  Usually, however, you really want AUTHID DEFINER, and granting the necessary privileges directly to the procedure owner (or to PUBLIC)  isn't too hard.

  • SQL Report From Another  Schema

    Is there anyway to select a table from another schema?I have a default schema for my application but i want each user to use their own schema.
    I'm looking for something like #OWNER#.table_name but replacing #OWNER# with the name of another schema in the workspace.
    Kind Regards,
    BgUrsea
    APEX 4.0 10g XE

    Hello BgUrsea,
    you could achieve this by granting the needed privileges (e.g. select, insert, update, delete) on each table in the #OWNER#-schema to your applications parsing schema.
    If you can't use a direct mapping (e.g., you can't assign the schema name of a user as usernames for his application user), you probably need a mapping table in your parsing schema. Define an application item (e.g. "F_OWNER") and create a application computation that executes "On New Instance" and does something like
    SELECT schema
      FROM mapping_table
    WHERE owner=v('APP_USER');If you aren't sure you always have a mapping, you might think about an application process that not only computes the value but also handles the action to be performed in case there is no mapping for a user.
    But I suppose it could be easier to have a copy of you application for each user and assign the appropriate schema to each copy. That way, you don't need the mapping, you don't need to care about always using the #OWNER# when developing your application, and of course, no user can (not even accidently) access another users (or your default) schema.
    -Udo

  • Cant view objects from another schemas

    Hi everybody!
    I have a 10.1.2 Jdeveloper and a 9.2.4 Oracle database.
    I successfully created a database connection.
    With provided login I can access to tables from another schemas in SQL Worksheet, but I cant see any objects from those schemas in the connection tree.
    What's wrong?

    The Schemas are being filtered so that you only automatically see the schema for the connection that you logged on with. To change the schemas that are visible you need to :
    1) Select the connection name in the Navigator (you should see that it has a filter icon overlaid showing that it is being filtered)
    2) Invoke the context menu and select 'Apply filters'
    3) Shuttle over the other Schemas you wish to see and press OK
    Regards,
    Lisa Sherriff
    JDev QA

  • Selecting from another schema

    If I want to select table from another schema, I have to type
    select * from [username].table_name.
    What can I do inorder not to write shema name all the time.
    for instance:
    instead of writing
    select * from [username].table_name.
    select * from table_name.

    create synonym for the object in other schema:
    create synonym <syn-name> for schema.tablename;
    then use syn-name in place of schema.tablename in ur query
    like
    select * from syn-name;

  • 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

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

  • Copying  tables from one schema to another

    hi all,
    i have two schema where a has master tables.
    b schema is empty.. i want to copy all the tables from a schema to b with indexes and constraints
    I dont have import facility since i am using a client.
    thanks
    Hariharan M K

    Hi,
    Try this
    insert into table_name (select * from schema_name.table_name);if you have not permission to call by other schema then
    COPY FROM schema1/schema1@host_string -
    TO schema1/schema1@host_string-
    CREATE|INSERT|REPLACE  table_name [(column, column, column, ...)]
    USING select col1,col2,... from table_namehb venki

  • How can i access all the objects of one schema from another schema

    Dear All,
    How can i access all the objects(Tables,Views,Triggers,Procedures,Functions,Packages etc..) and do the modifications of one schema from another schema (Without using synonyms concept).
    Thanks in advance,
    Mahi

    First of all, synonyms only help you easy reference the object. It doesn't have any implication of object privilege.
    As long as you have proper privilege on target object. You can access it with or without synonyms.
    Assuming you have proper privilege of objects, you can use following command to assume schema owner.
    ALTER SESSION SET CURRENT_SCHEMA = Schema_owner

  • How to share data in "User_*" tables with another schema

    I would like to share the data in the USER_SEGMENTS table with another schema. If I create a view and grant select on the view, when the other schema queries the view the data is identical to themselves querying the SYS.user_segments table directly.
    create view sys_user_segments as select * from sys.user_segments;
    grant select on sys_user_segments to A;My guess is that the SYS.user_segments table is a view based on the current user.
    Is there a way to share this data without creating a copy of the table?
    Oracle: 10g
    Thanks

    Hi,
    All the data dictionary "tables" whose names start with user_ (or all_ or dba_) are actually views, and what results they bring back depend on what schema you logged in to. I don't think there's any way to allow user A to directly see what's in user B's version of user_segments.
    Why do you need this? Can you use the all_ views instead, by giving A some privileges on B's objects?
    Failing that, you can replicate the data into a regular table. Inside a AUTHID DEFINER stored procedure, the data dictionary views (such as user_segments) are the versions of the procedure owner, so B can write a stored procedure (let's call it populate_my_segments) that populates a regular table (let's call it my_segements), and then grant EXECUTE privilges on populat_my_segments and SELECT privileges on my_segements to user A. A can then refresh the table and look at it whenever he wants to.
    If A only needs to see a little information, e.g. the total number of bytes, from B's user_segments, then B can write a function just to return that information.

  • How to create table in another schema of same database

    Hi..
    I've a database DB1
    and has 2 schemas / USers in that..
    Usr1 and Usr2...
    And i created a TEMP table in Usr1 schema... and created
    Then tried the following statement in Usr2 schema...
    CREATE TABLE TEMP AS SELECT * FROM Usr1.TEMP;
    Then it's giving error that ...
    :00942 TABLE OR VIEW DOESN'T EXIST..
    What is the reason for that...
    Thank you

    josh1612 wrote:
    What other grants do i need to give so as to replicate the Primary Keys also...????That's not a matter of grants. It's the way the CREATE TABLE AS SELECT statement works. It does not copy over indexes, primary key constraints, unique constraints, foreign key constraints, etc.
    If you want to copy all that over, you would probably want to get the DDL from the original table (using the DBMS_METADATA package if you're in a recent version), modify the DDL with the new schema name, create the table, indexes, and constraints, and then do an INSERT ... SELECT to populate the data. Or do an export & import of the table from one schema to another.
    Justin

  • Selection from Another schema by default without schema name qualifier.

    Hi
    Oracle10g release 2, LinuxOS
    i want my schema (User_1) to always select,insert, update, delete the objects from another schema (User_2) without passing full schema qualifier every time whenever i don't pass any schema name explicitly.
    i.e. if i pass the following guerry
    select * from table_a;
    the table of user User_2.table_a (User_2.table_a) will be queried by default instead of table (User_1.table_a)
    and the same implementation is also required in Functions , procedures, sequences etc.
    Wishes

    Three relatively easy options
    1) Create private synonyms in User_1's schema for each object in User_2's schema, i.e.
    CREATE SYNONYM table_a
       FOR user_2.table_a2) Create public synonyms for each object in User_2's schema. This will make it possible for all users to query user_2's objects without specifying the schema name
    CREATE PUBLIC SYNONYM table_a
       FOR user_2.table_a3) Change the current schema for the session (potentially in a login trigger)
    ALTER SESSION SET current_schema = USER_2There are other options that are a bit more complicated like using enterprise users with shared schemas. But most people are perfectly happy with one of these three.
    Justin

  • Connect role allows user to update/delete row of a table of another schema

    I am using oracle 9i r2, I created a user and only give him CONNECT role. Then I opened the sqlplus and found that he could query table of another schema which doesn't belong to the new user, but the thing which scares me most is that when I tried to update/delete a row from a table of another schema, it succeeded. Also, I created a new role with system priviledges CREATE_SESSION and SELECT_ANY_TABLE then granted to new user and revoked the CONNECT role but the same thing happened like before. What I am doing wrong? By the way, I am trying to create a read only user. Any help is greatly appreciated.

    Thanks guys for the tips. I have forgotten to mention that this situation happened only in a new created schema which has only a table and the table was exported from another oracle db( I pre-created the user with connect role and assign the tablespace etc), the import worked fine. Then I used a read only user(in different schema) to update/delete row to the imported table.The read only user can't update/delete other schemas besides from the new one. Is that I missed something when importing the table or pre-create user, tablespace, etc? Thanks in advance.

  • Create a new table from another table that exists ussing a stored procedure

    Hi,
    I want to know if is posibble to create a new table from another table that exists ussing a stored procedure. This new table is created from other table that exists in the DB.
    (in the next code the table tbl1 exist into the schema of the DB, but temp_tbl1 does not exist, it must be created by the procedure)
    create or replace procedute temp is
    temp_tbl1 tbl1%TYPE; //the temp_tbl1 will have the same type of tbl1
    begin
    create table temp_tbl1 as (select * from tbl1);
    end temp;
    thanks very much

    cat wrote:
    Hello,
    I think my problem is not about this grant, because if I execute this as an "anonymous procedure":
    DECLARE
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE Abonus (id NUMBER, amt NUMBER)';
    END;
    It runs ok
    But if I do:
    CREATE OR REPLACE procedure temp as
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE Abonus (id NUMBER, amt NUMBER)';
    END;
    I have the error
    ORA-01031: Insufficient privileges
    ORA-06512: at "temp", line 3Anonymous blocks are treated as "Invoker's Rights" from a privilege perspective whereas stored programs by default are treated as "Definer's Rights". Therefore using anonymous blocks is not a valid test to check this.
    The simplest form of checking this issue is by executing
    SET ROLE NONE;and then to run your statement/code block in question interactively. Using this approach you get in your session the effective rights of a "Definer's Rights" stored program, i.e. only privileges that you got granted directly to your user.
    You can revert to the default setting by issuing
    SET ROLE ALL;For more information regarding this topic, read e.g. the documentation:
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/subprograms.htm#LNPLS00809
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • 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

Maybe you are looking for

  • VGA to S-video or composite video adapter

    I need some way to get the video output of my computer to my T.V. The computer has no S-video or anything other outputs for video besides the VGA one. And I don't have a T.V. with VGA input. Has anyone ever seen an adapter for something like this? I

  • My iPod Touch 4th Gen won't charge?

    Well I've had my iPod Touch 4th Gen since it came out it will be 2 years old in October. Yesterday I charged my iPod while listening to music. I took it of when it was charged and used a little it became half dead so I put it on my charger. I realize

  • Can I backup to an external hard drive that has been formatted with windows?

    Hi, I am fairly new to mac.  I was wondering if I can backup my mac book pro using time machine to an external hard drive that has been formatted with windows.  Time machine is saying it must erase to the hard drive in order to do a backup? Please he

  • Why did my email auto fill quit working with Yahoo mail?

    This week my e-mail address auto-fill quit working with AT&T Yahoo, but still works when using the Safari browser on my Mac. Actually found 22 posts dating back to a year ago for people having the same problem, so guess this is ongoing and happening

  • IDoc error in posting salaried headcount IDoc type is ACC_STAT_KEY_FIG

    Hello Experts, We created an Idoc for uploading headcount from peoplesoft to SAP. When we tried to post the statistical key figures, it gave a message "XXXX doesnt exist in the controlling are ABC". we edited the document and mapped it to existing SK