Reference to the other schema

Hello

I want to model the following situation in SQLD DM:
-Diagram 2
-1 schema, I define a view
-of the other schema I want to refer to this point of view in a view

Issues related to the:
-Create each drawing as a drawing or a relational model in a drawing?
-How can I refer to the other schema view in the query designer?

SQLD DM version 3.3.0.734

Thanks in advance,

Joop

Hi Joop,

Create each drawing as a drawing or a relational model in a drawing?

As a relationship in a drawing model.

How can I refer to the other schema view in the query designer

You have a set a display scheme that you create. If the objects used in the view definition belong to another scheme they are included with the schema name in a generated select statement. By default the objects in the same schema (such as the view) are not prefixed with schema name - if you want that the schema name to include, then check the box 'Schema to include in the query name' on the view dialog box.

Philippe

Tags: Database

Similar Questions

  • Data type of the other schema reference

    Hello

    I want to reference the data type on the other schema, inv.customer, 1st schema table, 2nd table tran.order.

    then, when I declare my package.


    Procedure p_insertOrder
    (
    p_empid in customer.customerid%type
    p_orderid in tran.order.orderid%type
    );


    However, it gives me this error message

    PLS-00201: identifier 'tran.orde' must be declared.

    the following package is located in inv schema. so when I make reference to the customer table, I do not have the diagram for it.

    So what is the cause of this?



    ~ vincent.

    what grants do you have enabled on the table?

    Log in as tran or a dba and try:

    grant select on tran.order to inv;
    

    You can also create a public synonym so you don't have to precede the table with the schema name. Beware of the tables of the same name in your current schema if you do it well.

  • ReadOnly user can access the other schema and change them

    Hello everyone,

    I created a readonly as this user in oracle 11g r2

    SQL > CREATE USER IDENTIFIED BY readonly readonly;
    SQL > GRANT CREATE SESSION, CREATE a SYNONYM to readonly.
    SQL > GRANT SELECT ON SA.vCustomerService TO readonly.

    But when I connect to the database and do a select like:
    SQL > SELECT * FROM ACC;
    I get the data in this table, even if I do an update on that table it works.

    What I am doing wrong that my readonly user always has full access to the other schema?

    Thank you in advance for your help!

    Best regards
    GIL GOMES Dany

    Dan_lu wrote:
    Hello everyone,

    I created a readonly as this user in oracle 11g r2

    SQL > CREATE USER IDENTIFIED BY readonly readonly;
    SQL > GRANT CREATE SESSION, CREATE a SYNONYM to readonly.
    SQL > GRANT SELECT ON SA.vCustomerService TO readonly.

    But when I connect to the database and do a select like:
    SQL > SELECT * FROM ACC;
    I get the data in this table, even if I do an update on that table it works.

    Check the permissions for this table - maybe some operations on this table are granted to the publc?

  • The sys user can not see tables belonging to the other schema

    Hello

    We have a database used to store the metadata of the soa suite, yesterday, we asked to grant select on certain tables of the prodsoa_bam schema, but we found this sys cannot see the tables of prodsoa_bam.

    If we question dba_tables we can list the tables of prodsoa_bam, but if we execute a query on the tables that we get an ORA-00942 error.

    Someone suggested a work around?

    Kind regards.

    try using double quotes. It seems that your table name is case-sensitive (which I do like):

    SELECT COUNT (*) FROM PRODSOA_ORABAM. SysIterPrivilege ';

  • Activities of track on the other schema

    I have a scheme (used by our application) accessible by many developers with this schema password.

    I want to create new patterns for each developer and also trace their changes to the schema of the application.

    Is it possible to audit changes made by each user on the application schema?

    You can use the audit

    http://docs.Oracle.com/CD/E11882_01/network.112/e16543/auditing.htm#DBSEG006
    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_4007.htm#SQLRF01107

  • the procedure call in the other schema with credentials of this scheme

    Hi, experts.

    I have this problem. I need to call a procedure of WORKSPACEOWNER1 schema SCHEMA1, but I need to do this as SCHEMA1 was WORKSPACEOWNER1.

    This is the procedure:

    CREATE OR REPLACE procedure WORKSPACEOWNER1.Test_stop_process is
    workspace varchar2(500);
    begin
    
    owbsys.wb_rt_script_util.set_workspace('WORKSPACE1');
    owbsys.wb_rt_script_util.deactivate_all();  
    end;
    

    Now, if I call the WORKSPACEOWNER1 procedure is not problem, but when I call to SCHEMA1

    begin
    workspaceowner1.test_stop_process;
    end;
    

    Throw this error:

    ORA-20008: the workspace with the name: WORKSPACE1 and owner: SCHEMA1 does not exist.

    You can find out the information of existing workspace from the ALL_IV_WORKSPACE view or view WORKSPACE_ASSIGNMENT.

    ORA-06512: at "OWBSYS. WB_WORKSPACE_MANAGEMENT', line 1602

    This is because WORKSPACE1 exist for WORKSPACEOWNER1 not for SCHEMA1.

    Is this possible?

    Thanks in advance.

    Concerning

    Hi, Ana GH.

    Thanks for the reply.

    I checked in Gobals and safety, and Yes, SCHEMA1 is registered as a user of WORKSPACE1.

    Finally, I can solve the problem using DBLinks. Looks like dblink executes the procedure next to WORKSPACEOWNER1.

    I have create a DBLink as:

    CREATE the LINK of DATABASE link_wks CONNECT TO workspaceowner1 IDENTIFIED BY pass USING "orcl".

    Then this:

    BEGIN

    WORKSPACEOWNER1. Test_stop_process@link_wks;

    END;

    Works.

    Thanks to you all. I learned a lot.

    Concerning

  • ORA - 12054:while trying to create mview based on table in the other schema

    Hi all
    show user 
    user is "NAAMA" 
    CREATE TABLE USERS
    (
      user_id               NUMBER,
       user_name             VARCHAR2(15 CHAR),
      user_password         VARCHAR2(50 CHAR),
    CONSTRAINT user_pk PRIMARY KEY (user_id));
    TABLE created.
    ---------------------------------------------------------------------
    show user 
    user is "TEST" 
    create materialized view log on NAAMA.USERS WITH ROWID
    create materialized view users_mv 
    build immediate 
    refresh fast on commit with rowid 
    as 
    select  user_name  ,
              user_password         
    from naama.users;
    --------------------------------------------------------------------------------------------------------------
    ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
      
    I suspect that this problem is all about privileges.
    Please help
    Thanks to advanced
    Naama

    Naamas wrote:
    I understand and granted.

    Then I have a feeling get_name function is more complex than what you posted:

    SQL> create user naama
      2    identified by naama
      3    default tablespace users
      4    quota unlimited on users
      5  / 
    
    User created.
    
    SQL> grant create session,
      2        create table,
      3        create procedure,
      4        create materialized view
      5    to naama
      6  / 
    
    Grant succeeded.
    
    SQL> create user test
      2    identified by test
      3    default tablespace users
      4    quota unlimited on users
      5  / 
    
    User created.
    
    SQL> grant create session,
      2        create table,
      3        create materialized view
      4    to test
      5  / 
    
    Grant succeeded.
    
    SQL> connect naama@orcl/naama
    Connected.
    SQL> create table users(
      2                     user_id               NUMBER,
      3                     user_name             VARCHAR2(15 CHAR),
      4                     user_password         VARCHAR2(50 CHAR),
      5                     CONSTRAINT user_pk PRIMARY KEY(user_id)
      6                    )
      7  / 
    
    Table created.
    
    SQL> grant select,
      2        on commit refresh
      3    on users
      4    to test
      5  / 
    
    Grant succeeded.
    
    SQL> create or replace
      2    function get_name(
      3                      user_name_in IN varchar2
      4                     )
      5      return varchar2
      6      is
      7          v_name varchar2(10);
      8      begin
      9          select  'NAAMA'
     10            into  v_name
     11            from  naama.users
     12            where rownum = 1;
     13          return v_name;
     14  end get_name;
     15  / 
    
    Function created.
    
    SQL> grant execute
      2    on get_name
      3    to test
      4  / 
    
    Grant succeeded.
    
    SQL> create materialized view log
      2    on users
      3    with rowid
      4  / 
    
    Materialized view log created.
    
    SQL> grant all
      2    on mlog$_users
      3    to test
      4  / 
    
    Grant succeeded.
    
    SQL> connect test@orcl/test
    Connected.
    SQL> create materialized view users_mv
      2    build immediate
      3    refresh fast
      4    on commit
      5    with rowid
      6    as
      7      select  user_name,
      8              user_password,
      9              naama.get_name(user_name) first_name
     10        from  naama.users
     11  /
                naama.get_name(user_name) first_name
                      *
    ERROR at line 9:
    ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
    
    SQL> 
    

    Next time you get MV create errors, you can login as the owner of the MV as question:

    SQL> @?\rdbms\admin\utlxmv.sql -- run it once per user only, it creates table MV_CAPABILITIES_TABLE
    
    Table created.
    

    Now comment ON offending COMMIT and the question:

    SQL> begin
      2      dbms_mview.explain_mview('create materialized view users_mv
      3    build immediate
      4    refresh fast
      5  --  on commit
      6    with rowid
      7    as
      8      select  user_name,
      9              user_password,
     10              naama.get_name(user_name) first_name
     11        from  naama.users','xxx');
     12  end;
     13  /
    
    PL/SQL procedure successfully completed.
    
    SQL> SELECT  CAPABILITY_NAME,
      2          POSSIBLE,
      3          RELATED_TEXT
      4          RELATED_NUM,
      5          MSGNO,
      6          MSGTXT
      7    FROM  MV_CAPABILITIES_TABLE
      8    WHERE STATEMENT_ID = 'xxx'
      9    ORDER BY SEQ
     10  /
    
    CAPABILITY_NAME                P RELATED_NUM                         MSGNO MSGTXT
    ------------------------------ - ------------------------------ ---------- --------------------------------------------------
    PCT                            N
    REFRESH_COMPLETE               Y
    REFRESH_FAST                   N
    REWRITE                        N
    PCT_TABLE                      N this PL/SQL function cannot be       2066 Oracle error: see RELATED_NUM and RELATED_TEXT for
                                      supported for query rewrite               details
    
    PCT_TABLE                      N NAAMA.USERS                          2068 relation is not a partitioned table
    REFRESH_FAST_AFTER_INSERT      N                                      2083 mv references PL/SQL function that maintains state
    REFRESH_FAST_AFTER_ONETAB_DML  N                                      2146 see the reason why REFRESH_FAST_AFTER_INSERT is di
                                                                               sabled
    
    REFRESH_FAST_AFTER_ANY_DML     N                                      2161 see the reason why REFRESH_FAST_AFTER_ONETAB_DML i
                                                                               s disabled
    
    REFRESH_FAST_PCT               N                                      2157 PCT is not possible on any of the detail tables in
                                                                                the materialized view
    
    REWRITE_FULL_TEXT_MATCH        N this PL/SQL function cannot be       2066 Oracle error: see RELATED_NUM and RELATED_TEXT for
                                      supported for query rewrite               details
    
    REWRITE_FULL_TEXT_MATCH        N                                      2159 query rewrite is disabled on the materialized view
    REWRITE_PARTIAL_TEXT_MATCH     N                                      2031 materialized view cannot support any type of query
                                                                                rewrite
    
    REWRITE_PARTIAL_TEXT_MATCH     N                                      2159 query rewrite is disabled on the materialized view
    REWRITE_GENERAL                N                                      2031 materialized view cannot support any type of query
                                                                                rewrite
    
    REWRITE_GENERAL                N                                      2159 query rewrite is disabled on the materialized view
    REWRITE_PCT                    N                                      2158 general rewrite is not possible or PCT is not poss
                                                                               ible on any of the detail tables
    
    PCT_TABLE_REWRITE              N this PL/SQL function cannot be       2066 Oracle error: see RELATED_NUM and RELATED_TEXT for
                                      supported for query rewrite               details
    
    PCT_TABLE_REWRITE              N NAAMA.USERS                          2068 relation is not a partitioned table
    
    19 rows selected.
    
    SQL> 
    

    As you can see REFRESH_FAST_AFTER_INSERT is not possible (POSSIBLE = N) and the reason is "mv reference function of PL/SQL that maintains state. Now the question is whether your function is deterministic (always returns a value even if the same parameters are passed). If it's really, use:

    SQL> create user naama
      2    identified by naama
      3    default tablespace users
      4    quota unlimited on users
      5  / 
    
    User created.
    
    SQL> grant create session,
      2        create table,
      3        create procedure,
      4        create materialized view
      5    to naama
      6  / 
    
    Grant succeeded.
    
    SQL> create user test
      2    identified by test
      3    default tablespace users
      4    quota unlimited on users
      5  / 
    
    User created.
    
    SQL> grant create session,
      2        create table,
      3        create materialized view
      4    to test
      5  / 
    
    Grant succeeded.
    
    SQL> connect naama@orcl/naama
    Connected.
    SQL> create table users(
      2                     user_id               NUMBER,
      3                     user_name             VARCHAR2(15 CHAR),
      4                     user_password         VARCHAR2(50 CHAR),
      5                     CONSTRAINT user_pk PRIMARY KEY(user_id)
      6                    )
      7  / 
    
    Table created.
    
    SQL> grant select,
      2        on commit refresh
      3    on users
      4    to test
      5  / 
    
    Grant succeeded.
    
    SQL> create or replace
      2    function get_name(
      3                      user_name_in IN varchar2
      4                     )
      5      return varchar2
      6      deterministic
      7      is
      8          v_name varchar2(10);
      9      begin
     10          select  'NAAMA'
     11            into  v_name
     12            from  naama.users
     13            where rownum = 1;
     14          return v_name;
     15  end get_name;
     16  / 
    
    Function created.
    
    SQL> grant execute
      2    on get_name
      3    to test
      4  / 
    
    Grant succeeded.
    
    SQL> create materialized view log
      2    on users
      3    with rowid
      4  / 
    
    Materialized view log created.
    
    SQL> grant all
      2    on mlog$_users
      3    to test
      4  / 
    
    Grant succeeded.
    
    SQL> connect test@orcl/test
    Connected.
    SQL> create materialized view users_mv
      2    build immediate
      3    refresh fast
      4    on commit
      5    with rowid
      6    as
      7      select  user_name,
      8              user_password,
      9              naama.get_name(user_name) first_name
     10        from  naama.users
     11  / 
    
    Materialized view created.
    
    SQL> 
    

    However, keep in mind, Oracle approves completely you declaring function as deterministic. If, in fact, your function is not deterministic (and most likely is not) MV will produce erroneous results.

    SY.

  • How to move a table to the other schema

    Salvation;

    Imagine that I have a scheme A and I create table in this scheme as a test. Now, I have a different schema, the name is B. I want to spend my A.test table to B.test2

    How can I do?

    Thank you

    If you create a new table in diagram B, the new table must be stored in tablespace default B. Unless you want the new table to be stored in a default tablespace, you need not specify a tablespace during the creation of the new table.

  • Problem to extract the value of the other schema

    Hi all the gurus of the database.

    I'm having a little problem could someone please help me out.

    Here's my problem:

    I'll have two distinct schemas in a database SCHEMA1 and SCHEMA2.

    And I'm having a table EMP to SCHEMA1, I had created a public synonym for this table and give grant SELECT, DELETE, INSERT and UPDATE to SCHEMA2.

    I am connected to SCHEMA2 and try to write a select statement to retrieve the emp_id of the EMP Table of SCHEMA1. My select statement is simple: select emp_id SCHEMA1. EMP where emp_name = "AAA". This select statement works very well since SCHEMA2.

    Now, I'm trying to create the SCHEMA2 procedure and try to get with the same select emp_id. But it is not allowing me to create the procedure. I tried with dynamic sql too but not able to read this value.

    Could someone help me please for this?

    Kind regards
    Paragraphs Mistry

    How is the privilege to select on the table SCHEMA1 granted to the user SCHEMA2? It is through a role? What the procedure defined, Summoner or the rights of the author?

    My guess is that the procedure has the author rights and the right to SELECT is granted to a role. In this case the procedure does not take into account roles and the select statement will fail.

    Try to grant privileges directly to the owner of the procedure.

    HTH!

  • How to access the table in the other schema?

    Hi all
    any body can help me on how to access table to another scheme to another scheme?

    Use the db link

  • Discovered using a function of package in the other schema gets 01031. 00000 - "insufficient privileges".

    Nice day.  I have a package to Schema1 that contains a function.  I created a view in Schema2 that uses arrays of Schema1 and function of this package of Schema1 - it works very well.  I created a schema3 view that uses only the display in Schema2.  When I try to compile, I get 01031. 00000 - "insufficient privileges".  When I try to run the query from the view as the user schema3 schema3, I get the data very well.  Anyone know how I can fix this, please?

    Note: If I delete the use of Schema1.sag_online_action.get_compcode (sag.sagseqnum), everything works fine.

    TIA.

    Schema1 Package:

    function get_compcode (p_iSagseqnum in number) return varchar2 AS

    VARCHAR2 (3) l_cCompcode: = ";

    BEGIN

    Select DECODE ('Y', sag.add_metal, "[1]",

    SAG.add_gc, "[2]."

    SAG.add_acid, "[3]."

    SAG.add_hplc, "[4]."

    SAG.add_icpms, "[5]."

    SAG.add_other, '[6]' ") 'compcode.

    in l_cCompcode

    SAG

    where sagseqnum = p_iSagseqnum;

    Return l_cCompcode;

    END get_compcode;

    View Schema2:

    CREATE OR REPLACE FORCE VIEW 'Schema2. "' OSAG_MICROBIALS ' ('id', 'micro-organisms', 'fees', 'addl_fee', 'icons', 'method', 'notes', 'technical', 'colMedium', 'shelf life', 'airVol', 'samplingRate', 'LD', 'orderNum', 'updated', 'online_update_action')

    AS

    SELECT sag.sagseqnum 'id,'

    trim (sag.substance |) » '|| Schema1.sag_online_action.get_compcode (SAG.sagseqnum)) "microorganisms"

    'Fresh,' Decode(SAG.subcontracted_flag,'Y','',SAG.fee_per_sample)

    Decode(SAG.subcontracted_flag,'Y','',additional_analyte_fee) "addl_fee"

    sag_symbols_key (sag.sagseqnum, sag_parameter.parmname, sag_parameter.prod) "icons."

    MethodDef.MethodDesc 'method ',.

    SAG.method_notes "notes."

    "Technical," SAG.technique

    SAG. Medium "colMedium."

    sag_shelf_life (SAG.sagseqnum) "shelf life."

    SAG.air_vol "airVol"

    SAG.sampling_rate 'samplingRate ',.

    Decode(SAG.subcontracted_flag,'Y','',sag_parameter.) LoQ) "LD",

    "OrderNum, SAG.orderby_seq

    (sag.osag_updated - to_date('01/01/1970','MM/DD/RRRR')) * 86400 "updated."

    SAG.online_update_action "online_update_action".

    SAG.

    sag_parameter,

    MethodDef

    WHERE sag.sagseqnum = sag_parameter.sagseqnum

    AND sag.methodref = methoddef.methodref (+)

    AND DECODE(sag.activeflag,,'N',sag.activeflag) = 'Y '.

    AND DECODE(sag.internalflag,,'Y',sag.internalflag) = n

    AND DECODE (sag.technique, NULL, 'XXX', sag.technique) = "microscopy".

    ORDER BY sag.substance,

    SAG. Medium;

    Schema3 notice:

    CREATE OR REPLACE VIEW "schema3. "' OSAG_MICROBIALS ' ('id', 'micro-organisms', 'fees', 'addl_fee', 'icons', 'method', 'notes', 'technical', 'colMedium', 'shelf life', 'airVol', 'samplingRate', 'LD', 'orderNum', 'updated', 'online_update_action')

    AS

    SELECT "id."

    "microorganisms"

    "charges."

    "addl_fee,"

    "icons."

    'method ',.

    "notes."

    "technique."

    "colMedium,"

    "shelf life."

    "airVol,"

    'samplingRate ',.

    "LD",

    "orderNum."

    "to date,"

    'online_update_action '.

    OF Schema2.osag_microbials;

    Try

    Grant execute on sag_online_action to schema2 with grant option

  • access the table of a database diagram othere scheme is same

    Hello

    I want to access a schema as JISPBILCORBILLING table in the other schema 'JISPREPCORBILLING '.


    second scheme use to display and store reports.and first schema will store transaction information.


    How can I use this table in the second diagram.


    Thanks in advance.

    Yes you can.

    CONNECT JISPBILCORBILLING/PW<---User in="" which="" tables="">
    left head;
    coil c:\synm.sql;
    SELECT "CREATE SYNONYM JISPBILCORBILLING_ | TABLE_NAME | "FOR JISPBILCORBILLING.' | TABLE_NAME FROM USER_TABLES;
    spool off;
    host edit c:\synm.sql;
    Remove first and last 2 lines. Save and exit.
    @c:\synm.sql

    HTH
    Girish Sharma

  • Create the form on table in the different schema

    Hi all

    in APEX I am logged in as long as user APEX_USER and the table, I'm trying to access the site with the creation on Table Wizard form belongs to the user. I have granted all privileges on a given user APEX_USER table, the wizard allows me to choose this table in the list, but when I press the next button, I get the following error message:

    You do not have access to the schema that you import. Import failed.

    Contact your administrator for the application.

    Seems to me that something similar had been already discussed here, but still no response.

    V4.1 assistants when you use a different schema

    Please, what are the rights must have my APEX_USER to be able to create forms tables belonging to someone else?

    Thank you very much

    Pavel

    Edit: I did the same thing on my laptop (APEX 4.2.6.00.03) here and it works as expected. This error I get to work with APEX 4.2.3.00.08 (of course you should not necessarily be the cause, very likely, I don't have all of the necessary privileges) :-).

    Hi Mike,.

    Thanks again for your response. If the schema was not related to my workspace, I would yet be able to choose the other schema of the selection list.

    In fact, there seems to be a bug in the link in my message original (for example it is still not fixed in version 4.2.3), but fortunately I was able to find a workaround - I created a view with the same name and the same structure as the original table, and then I was able to generate the form with the wizard , finally I gave up the display and modification of processes page manually. So the solution is I have to force the DBA APEX upgraded to the current version :-).

    Best regards

    Pavel

  • 30EA2 I see not synonymous in the scheme of the other user

    I can see the tables in the schema of the other user and can choose against the synonym that references the table, but I don't see the synonym itself in the scheme of the other user. I can using Toad.

    Again, fixed.

  • 'DAC reference ground connection' property causes the other channel to stop working

    Can I set allow connect DAC refers to a property on the ground on one channel and not the other?

    I have a channel of analog output of a card PCI-6251 set so the DAC reference can be set on the ground.

    I understand that this will work only if the reference of the DAC is the internal value. Since it's the default I him did not.

    I write out, then adjust the level to the ground.

    I try to write to each other on the same card and it will not work. Sometimes he changes temporarily but goes back to 0 volt. Most of the time it just does not change.

    If I remove the aforementioned property and action off the coast of the first string, the other channel works very well.

    Can't use this independent property? Or is it possible to fix this?

    The DAC reference connect to the ownership of the land can not be set for each channel.  In the LV help for this property (right click on the property in the property node and go to help for AO. DAC. Ref.ConnToGnd to go to the specific help page) it says:

    Grounding the internal DAC reference has the effect of grounding of all channels of analog output and stop the generation of waveform on all channels of analog output independently know if channels belong to the task at hand.

    If you can't limit what output channels will be grounded, it will be on the ground all channels that have the reference set inside.  If you try to change the property ' link DAC refers to the ground "to False for some channels and true for other channels, you will get the error 200106: property must have the same value for all channels on the device.

    A solution for this is instead set the DAC reference to the ground, put the source on the outside, and use APFI 0.  What you could do is outwardly wire GND AO for the APFI 0 (pin 20).  Then set the DAC reference outside.  The problem is that unlike the DAC reference connect to the ownership of land, which can be changed during execution of the task, the source of reference property is not editable during execution of the task.

Maybe you are looking for