Creating a view in a new schema

I use the Oracle SQL Developer 10g client.  I want to know how to create a view in the diagram. I have a schema that has all of my table and the views. I want to create a view in a pattern that has no data. It is only to look at a goal only of the view I want to create.

Thank you

Kevin

As I said.

Connection to the schema where the table exists

Grant select on to

Connect to the new schema

Create view select * from .;.

What you want?

Tags: Database

Similar Questions

  • Privilege to allow a user to create a view of another user schema

    Hello

    I need allow a user create a view of another user schema.
    Say, log in as the latter and run the statement: "create view USER_B_SCHEMA.myview as select...". »

    Is there a way to achieve this without the agreement of this last privilege to CREATE ANY VIEW? I want to keep it on the profile as low as possible.


    Thank you!

    You can create a stored procedure, here's a test case (not optimized, no free bug):

    SYS@orcl > create user sp_owner identified by sp_owner;
    
    SYS@orcl > grant create any view to sp_owner;
    
    SYS@orcl> create procedure sp_owner.create_view (
      2  view_name varchar2, view_sql varchar2 ) is
      3  begin
      4    execute immediate 'create view '||view_name||' as '||view_sql;
      5  end;
      6  /
    Procedure created.
    
    SYS@orcl > create user test identified by test;
    
    SYS@orcl > grant create session to test;
    
    SYS@orcl > grant execute on sp_owner.create_view to test;
    
    TEST@orcl> execute sp_owner.create_view('scott.emp_vw','select * from scott.emp')
    PL/SQL procedure successfully completed.
    

    HTH

    Enrique

    PS. If your problem has been resolved, consider marking the question as answered.

  • creating views in a new scheme to access some rows of the tables in the source schema

    Hello

    Oracle 10.2.0.4

    We try to hide some data from some users. My suggestion is that we create a new view_schema scheme on the same instance where we said the source tables in source_schema.

    We then create views in view_schema as below

    CREATE VIEW AS SELECT * FROM source_schema.table where COLUMN_n = "XYZ";

    We then grant SELECT on these views to a role and assign this role new users to be able to consult the data consulted.

    If the questions below.

    1. We can create views to view the data in another schema WITHOUT giving SELECT permissions on source_schema.tanle directluy?
    2. It works and there is no need to create synonyms etc.
    3. YOU can manage users and much easilier view (s)

    Is there a sense and who better than the selection seen with say table_name_view in the source schema to this effect and even the creation of synonyms for these points of view with the same name, yasmina in sourece_schema?

    Thank you

    905989 wrote:

    Hello

    Oracle 10.2.0.4

    We try to hide some data from some users. My suggestion is that we create a new view_schema scheme on the same instance where we said the source tables in source_schema.

    We then create views in view_schema as below

    CREATE VIEW AS SELECT * FROM source_schema.table where COLUMN_n = "XYZ";

    We then grant SELECT on these views to a role and assign this role new users to be able to consult the data consulted.

    If the questions below.

    1. We can create views to view the data in another schema WITHOUT giving SELECT permissions on source_schema.tanle directluy?
    2. It works and there is no need to create synonyms etc.
    3. YOU can manage users and much easilier view (s)

    Is there a sense and who better than the selection seen with say table_name_view in the source schema to this effect and even the creation of synonyms for these points of view with the same name, yasmina in sourece_schema?

    Thank you

    1. you can create the view in another schema (first granting of privileges to the schema of the view) without granting privileges of the schema of the source

    2. you probably want to create public synonyms for the view (s).  You can refer to the view as schema.view, but it's bulky

    3. I'm not sure management is easy, but the extra complexity shouldn't be too bad.  Write the documentation describing how everything works and the object involved.

    Another, more complicated, but more powerful option is to use row-level security also known as the virtual private database - if you have the license.  You create a profile for a table and a procedure to generate the WHERE clause to filter a query against the table and the columns defined in the profile.  Yet once, you need license to do this.

  • The scheme < SOA > _OPSS is already used for the safety of the point of sale. Please create a new scheme

    All,

    version: 12.1.3

    I am trying to create a new area where I wanted to use the same scheme used in the existing domain.  It failed with the below error

    com.oracle.cie.domain.security.external.ConfigSecurityException: oracle.security.opss.tools.lifecycle.LifecycleException: security of the store DB configuration error. Oracle.security.opss.tools.lifecycle.LifecycleException of exception: the SOA12C_OPSS schema is already used for the safety of the point of sale. Please create a new schema.

    Is it mandatory that the scheme (creating the UCR) used in a field cannot be used for the new domain?  or am I missing something? Please notify.

    Thank you

    Sen

    That's the point... So actually you were never more than one domain using the same patterns, you have never shared patterns on different fields... You had a domain which would sometimes... Not possible in 12 c but because of OPSS more... Maybe you could just the OPSS schema duplicated, but you would always use the platform so that it was not intended to...

  • create a synonym private to another schema

    Hello

    Oracle 10.2.0.4

    We have a number of base < table_name > tables in source schema. I have created hace views on certain tables as table_view < TABLE_NAME_VIEW >

    DBA has created a new user called view_user and a role called view_user_role.

    SELECT on these points of view permissions are granted to the view_user_role as GRANT SELECT ON < TABLE_NAME_VIEW > to view_user_role

    If I connect as long as user view_user I can do SELECT in source.table_view and it works SELECT * from source. < TABLE_NAME_VIEW >

    I can also create (as the owner of the source schema) public synonym with the same name as the name of the table for easy selection

    CREATE PUBLIC SYNONYM < table_name > FOR < table_name > _VIEW

    It works and view_user can select < table_name >

    However, I like to create views for this user only. When I try to do (as the owner of the source schema)

    CREATE or REPLACE the view_user SYSNONYM. < table_name > FOR source. < TABLE_NAME_VIEW >

    I get insufficient privileges!

    No idea how I can fix this problem? What advantage is there to create private views as a public view will work like no one else has view_user_role

    Thank you

    Some people like not synonymous public but we use them.  If end users have their own unique Oracle user names and where you have a couple asks a thousand items, create a synonym private for each user is impractical.  If a new object is created back and in defining a synonym private for each user who needs access to the object is not very practical.  Create a public synonym for each object and be done with it.  A user should always select or privilege of running on the underlying to see object that it so all the public synonym is to provide access once the privilege of the object has been obtained (if all goes well through a role).

    HTH - Mark D Powell.

  • New data or a new schema?

    Hi guys,.

    I don't know if I post my question in the correct forum and if not please bare with me.

    I am trying to add a new extension to an existing application. The end before two applications programming language are different, but they will need to use a common set of basic data stored in an oracle database. Existing application has a set of database objects assigned to a set of sachems. My new module will be also multiple database objects (tables, views, ect...) and these items must be assigned to a new schema. However, same set of user accounts should be able to access these two applications.

    I was wondering what would be the right way to implement this new module...

    First option is to create a new database and a schema for the new module in the same server and to set up my new application extension he... So our client will be put the Dev duplicated, test and Prod ultimately databases in their server.

    Another option is to create a new scheme in instances of data that exists for the objects in my new module.

    What would be the best option to implement this? Are there other ways to create my extension in the same server?

    Any help is appreciated...
    / Napster

    Napster says:
    Any recommendations?

    It is a problem of design and as a matter of personal taste.

    Personally, I am a big fan of patterns and would always plump for a separate diagram of s for each subsystem. It is a useful way to define the data and the application code and promotes clear interfaces between the subsystems. In a large organization, subsystems often represent different parts of the company and therefore have different owners; hanece the need for clarity in rules and corporate data access.

    Any recommendations? And any other matter that I could cope if I decide to create a new scheme.

    The main reason why people (i.e. developers) hate schemas is that they impose a management fee: granting of privileges on objects and data, in two directions and perhaps the development of additional such views as code or API packages with limited interfaces. In my opninon these are false grievances, born of neglect, but would it be disineguos to deny that several schemes should not be entered additional.

    Cheers, APC

  • Instance settings - require new schema - does not

    I have a newly installed (4.2.1.00.08) Apex instnace.  I can't seem to get the setting for 'Require a new scheme' to work.  If I choose Yes or no, the workspace application process always invites to a new or existing schema.  Is this a bug, or maybe I'm missing some other parameter that would do this job correctly?

    Hi "user721299"

    First, is there a reason why you are creating a new APEX instance based on APEX 4.2.1?  APEX 4.2.5 is available and highly recommended.

    All that being said, I don't think it was a problem even in the APEX 4.2.1.  That's exactly what we use on apex.oracle.com (requires a new schema = Yes).

    1. Are you sure that you are establishing a new session of the APEX to try the new workspace application process, after setting this instance setting?
    2. You set this parameter with the APEX_INSTANCE_ADMIN API or the First-Instance administrative Web interface?
    3. What is the instance parameter 'Provisioning' status?

    Joel

  • Creating a view using causes error ORA-00600

    Hello ladies and gentlemen,

    I tried to deploy a recursive query, as a point of view in Oracle XE and Standard Edition, nor a lot of success.

    The query is in this issue here: http://stackoverflow.com/questions/17358109/how-to-retrieve-all-recursive-children-of-parent-row-in-oracle-sq

    with recursion_view(base, parent_id, child_id, qty) as (
       -- first step, get rows to start with
       select 
      parent_id base, 
      parent_id, 
      child_id, 
      qty
      from 
      md_boms
    
      union all
    
      -- subsequent steps
      select
       -- retain base value from previous level
      previous_level.base,
       -- get information from current level
      current_level.parent_id,
      current_level.child_id,
       -- accumulate sum 
       (previous_level.qty + current_level.qty) as qty 
      from
      recursion_view previous_level,
      md_boms current_level
      where
      current_level.parent_id = previous_level.child_id
    
    )
    select 
      base, parent_id, child_id, qty
    from 
      recursion_view
    order by 
      base, parent_id, child_id

    The query itself works and returns the results. However, when I try to create a view with this query, I get errors.

    I posted two screenshots: http://www.williverstravels.com/JDev/Forums/StackOverflow/17358109/ViewError.jpg and http://www.williverstravels.com/JDev/Forums/StackOverflow/17358109/InternalError.jpg one with the! and * is when I am using JDeveloper 11g, using the navigation database, right-click on the view and select "New View". I get the error when I click on OK. I can indeed create the view through a sql script, but when I try to view the data, I get the error ORA_00600.

    I tried it work on my machine the two premises for XE (version 11.2.0.2.0) and 11g Standard Edition (11.2.0.2.v6) via Amazon Web Services. The result is the same.

    Does anyone know how to get around this problem?

    Not 5 minutes after I have this post, I decide not to use the graphical editor of JDev and simply write

    SELECT * FROM BOMS_VIEW;

    And it works like a charm.  I can not just use data tab to display records in the editor.  Wish I'd known that there is 5 hours.

  • 'Invalid metadata objects' when creating materialized views

    Hi experts,

    I ran into some trouble. I had an analytic workspace that has grown too quickly (see 11.2.0.2 size AW grows regularly with each generation of cube so I deleted and created a new.)

    He seemed to do very well with the tip David Greenfield, gave us in the mentioned forum post, but when I try to activate materialized views (that I had activated in the previous workspace) I am gettig the following error:

    -----
    Your metadata changes have been saved, with the following errors
    Invalid metadata objects:
    Invalid object "TABLESPACE. LECTURAS': 'CREATE A MATERIALIZED VIEW 'TABLESPACE' '. "CB$ LECTURAS.
    ORGANIZATION OF CUBE ON THE TABLESPACE. () TABLESPACE_AW
    MADE "LECTURAS_STORED"("LECTURAS_MEASURE_DIM" "LECTURA") IS "LECTURA"
    DIMENSION "TIEMPO" IS "TIEMPO", WITH THE HELP OF "TIEMPO_TIEMPO_HOUR_ID_UNIQUE_KEY."
    DIMENSION 'GEOGRAPHY' IS 'GEOGRAPHY' WITH THE HELP OF 'GEOGRAFIA_GEOGRAFIA_CONTADOR_ID_UNIQUE_KEY')
    POSTPONED BUILD
    UPDATE ON REQUEST
    FORCE
    WITH THE HELP OF CONSTRAINTS OF TRUST
    AS
    (
    SELECT
    TO_CHAR (T1." FEC_LECTURA', "dd/mm/yyyy hh24:mi:ss") "TIEMPO"
    T1. "" COD_METERID ""GEOGRAPHY. "
    SUM (T1." VAL_AI_HOR') "LECTURA".
    Of
    TABLESPACE. "' LECTURA_HORARIA_FINAL ' T1
    GROUP BY
    (TO_CHAR (T1." (FEC_LECTURA"," hh24:mi:ss dd/mm/yyyy '), T1. ("' COD_METERID")
    )
    ORA-00942: table or view does not exist
    "
    -----

    This same script running in SQLDeveloper gives the same error in line 17, which is the FROM clause. BUT I can run the select by itself and returns the expected result. If the table exists in the correct storage space.

    I must be missing something big...

    Thanks in advance.

    Joan

    P.S.: In the above code I use 'SPACE' to replace the real name from username and a tablespace (which is the same) for reasons of confidentiality.

    When you run the select statement, you connect to the same user you are trying to activate the VM?

    You can create a standard (No cube) MV with the same select statement? (Connected to the same user that you used in AWM).

    "CREATE MATERIALIZED VIEW "TABLESPACE"."MV_TEST"
      BUILD DEFERRED
      REFRESH ON DEMAND
      FORCE
      USING TRUSTED CONSTRAINTS
    AS
    (
      SELECT
       TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') "TIEMPO",
       T1."COD_METERID" "GEOGRAFIA",
       SUM(T1."VAL_AI_HOR") "LECTURA"
      FROM
       TABLESPACE."LECTURA_HORARIA_FINAL" T1
      GROUP BY
       (TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') , T1."COD_METERID")
    )
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    
  • creating a view and use the view in a model

    Hi all

    I'm new to OBIEE, and I have a requirement that I have two fields to be added to a domain. Because we cannot add queries directly to a model, I have to create a view and then put the request in it, and then use the view in this model.
    I did not understand this well, if someone could help me, explaining in detail the view and adding a query in it?

    Thank you
    Gohan

    Hello

    (a) If you want to use your existing DB view please tick box import meta option data - RPD--> file menu
    (b) If you want to create the new view in RPD itself just right click anyof a physical table--> properties--> click the genral--> change the type of array as "Select" then you create/update your sql query, and then click ok that's all
    Once created, you can deploy advice on the database (right mouse button) or you can leave the view cancelled (worst performance).

    Ref steps more to create views
    http://gerardnico.com/wiki/dat/OBIEE/opaque_view
    http://allaboutobiee.blogspot.com/2012/05/OBIEE-11g-deployundeploy-view-in.html

    Thank you
    Deva

  • How to create the view in OBIEE

    I have "table 1" with columns, Attr1, Attr2, action 1, measure 2.I need to create the view in the table repository Attr1, Measure1 and new attribute with values like a flag 3 'Y' in it. ". What will be the SQL code of the new view. Please provide the exact syntax for the view.

    Thanks in advance

    Hi Hsekar,

    You are right, it is called a SELECT type.

    Regarding your second question I don't know what you mean. You are using an SQL Select statement in this area. The Alias of the columns must match the columns will place you in the RPD exactly. But in this process, you create a physical view DB object, so there is not need to name it. You just create the select statement that you would use to create a view and OBIEE refers to the statement.

    If you have found the correct answer please give points!

    Best regards

    -Joe

  • Creating a view of mast bearing the same name with the name of the table

    Hello world

    After having dropped the name of view mast QQ. "" TRDLN_DIM_MV ", I try to recreate by having the same name as the table, but I got an error message stating that"the name is already used by an existing object. How to create a matte view to resemble the object possessed by schema 'GQ', with a name identical to the name of the table, drop the table?

    OWNER_O CREATED LAST_DDL_ TIMESTAMP STATUS OBJECT_NAME OBJECT_TYPE
    ===
    GQ MATERIALIZED VIEW 5 NOVEMBER 08 2008 13 DECEMBER 08-11 - 05:06:31:46 TRDLN_DIM_MV VALID
    GQ TABLE 5 NOVEMBER 08 2008 15 DECEMBER 08-11 - 05:06:31:00 TRDLN_DIM_MV VALID
    QQ TABLE 17 AUGUST 07 16 MARCH 09 2007-08 - 17:17:05:21 TRDLN_DIM_MV VALID

    SQL & gt; CREATE THE QQ MATERIALIZED VIEW. TRDLN_DIM_MV
    2 TABLESPACE FPLC01S
    3 NOCACHE
    4 NOLOGGING
    5 PACK
    6 PARALLEL (DEGREE 1 2 INSTANCES)
    7 BUILD IMMEDIATE
    8 REFRESH FORCE ON REQUEST
    9 WITH PRIMARY KEY
    10 AS
    11 Select / * + NO_REWRITE * / trdln_id,.
    trdln_skid 12,
    trdln_end_date 13,
    FIRST_VALUE (trdln_end_date) 14 over (partition by order of trdln_id trdln_end_date DESC) as MaxDate
    15 QQ.trdln_dim;
    of QQ.trdln_dim
    *
    ERROR on line 15:
    ORA-00955: name is already used by an existing object

    I appreciate your help. Thanks in advance!

    Kind regards
    Radic

    You must rename the table (using ALTER TABLE TableName RENAME to othername ;) before creating the MV.
    You cannot have both existing with the same name in the same schema.

    What you see in the scheme of GQ, is that the 'picture' is the underlying table for the materialized view.
    When you do a MY_MV CREATE MATERIALIZED VIEW AS...
    Oracle creates two objects with the same name, we the MY_MV materialized view, and the other being the MY_MV table, which is the physical storage. {Don't forget that a materialized view is a way to get a physical representation of views.}

    In the schema QQ is what you
    a. a real Table
    or
    b. a MV incorrectly deleted, resulting in the underlying Table always presents.

  • How to create/add sites to the "new tab" page?

    I followed the link to help you guys already created. He asks to go to the window "Show all bookmarks" and drag a bookmark already created a vacancy in the "new tab" page. This does not work for my PC as once I drag the desired bookmark, just open this page on the new tab page. Please help with adding new tiles to the new blank tab page.

    I thought about it.

    I can't find anywhere in the manual where it says that Firefox must be set on remember the story so that it works. But he does.

    I put the tools-> Options-> life private Firefox Will: do not forget history

    and it works very well.

    I can understand why remember the story must be about to have FF build this list automatically. But why must it be to build this list manually?

    Well.

    I recommend FF to update their documentation.

  • You can create a view that filters (ESX host) Linux machines on the view of the Infrastructure?

    Hello

    We have recently implemented Foglight and VMware plugin. As part of the VMware plugin, Foglight pulls in all the Linux VM machines including the ESX host. Our team of Linux only manages the running redhat Linux hosts. They fail the ESX VM guest. That said, is there a way to create a view that shows only the hosts running redhat Linux?

    For example the view of rail infrastructure below contains 88 Linux machines, but nearly half of them are ESX hosts for our Linux team would not see all these. Is it possible to filter these?

    Any help is appreciated.

    Thank you

    Tony

    The easiest way would be to create a personalized, pair it with Infrastructure and then create a dynamic management component.  This will help create you a rule for "All hosts" where you can find just the hosts that are not of the ESX host and run Linux.

    The query would be:

    detail.topologyTypeName! = "VMWESXServer" & os.longName like «% Linux»

  • Create a view of RDF in Oracle 12 c of tables in an Oracle 11 g Server

    Hello!

    I have a relational database in Oracle 11 g server, but I need to create the view of RDF model in Oracle 12 c in the base tables.

    I created a database connection to connect to the server of Oracle 11 g Oracle 12 c, using the statement:

    CREATE DATABASE LINK myDBLink

    CONNECT to user_test

    IDENTIFIED BY test123

    WITH THE HELP OF '(DESCRIPTION=)

    (ADDRESS = (PROTOCOL = TCP)(HOST=192.0.56.158) (PORT = 1521))

    (CONNECT_DATA = (SID = orcl)))';

    The works of the SELECT statement:

    Select * from EMP@myDBLink;

    I also created a SYNONYM:

    CREATE the SYNONYM MY_EMP FOR EMP@myDBLink;

    The SELECT statement with the synonym also works:

    Select * from EMP@MY_EMP;

    Well, to create the view of RDF, I use a sem_apis.create_rdfview_model function. Now, I wrote the statement of the following two ways:

    BEGIN

    () sem_apis.create_rdfview_model

    Model_name = > "test_linked"

    tables = > SYS. ODCIVarchar2List ('MY_EMP', 'MY_DEPT'),

    prefix = > ' http://GrDF/ ',

    Options = > ' COMPLIANCE = you

    );

    END;

    BEGIN

    () sem_apis.create_rdfview_model

    Model_name = > "test_linked"

    tables = > SYS. ODCIVarchar2List('EMP@myDBLink','DEPT@myDBLink'),

    prefix = > ' http://GrDF/ ',

    Options = > ' COMPLIANCE = you

    );

    END;

    And I get the following error:

    ORA-13199: fetchTabIDList: not found in tables:

    ORA-06512: at the 'MDSYS. SDO_RDF_INTERNAL', line 14308

    ORA-06512: at the 'MDSYS. SDO_RDF', line 3616

    ORA-06512: at the 'MDSYS. RDF_APIS', line 1253

    ORA-06512: at line 2


    I use examples of book of the Oracle tables.


    Thank you


    Yenier

    Yenier,

    Could you please try creating a view rather than a synonym? Here is an example:

    SQL >-create dblink

    SQL > create public database link

    2 mylink

    3 connect to

    Scott 4

    5 identified by

    6 Tiger

    using a 7 ':/';

    Database link created.

    SQL >

    SQL >-create view local using queries involving remote database objects

    SQL > create view dblink_scott_EMP in select * from EMP@mylink;

    Created view.

    SQL >

    SQL >-add the primary key (help requests on Direct mapping according to models RDFView to have shorter SubjectMaps)

    SQL > alter view dblink_scott_EMP add constraint pk_EMPNO primary key (EMPNO) disable;

    Altered view.

    SQL >

    SQL > - create model DM - based RDFview

    SQL > exec sem_apis.create_rdfview_model ('dblink_test_rv', sys.odcivarchar2list ('DBLINK_SCOTT_EMP'), "http://dm/");

    PL/SQL procedure successfully completed.

    SQL >

    Thank you

    -Smiled.

Maybe you are looking for

  • Adding a 3rd HARD drive to my Pavilion elite m9150f

    I have a Pavilion Elite m9150f with a motherboard Asus IPIBL-LB. I have 6 sata ports, but only 4 are currently used. It has Vista Home Premium 32-bit running 2 HARD sata drive seagate 360 with a partion recovery and 2 CD/DVD players. I would add a Se

  • Stop the loop in the process

    Hello Once, I am for another question, desire to learn more about labview and these countless obscure secrets. Well my problem seem is a common problem, but I have not found the answer in other topics.Here are the levels of my (simpler if you look di

  • Writing text on a slope

    I want to draw some text slants on a custom button thingie, tilt isn't really that big, just a few degrees, maximum of 20. I looked and I saw a class TextMetrics for OS 6, which is not actually descriptive, and on top of that, it's just OS 6 and abov

  • Number of send/receive bytes

    Hi all Is there a way to know the number of bytes send/receive through networks GPRS/EDGE etc in byte? Kind regards Shekhar.

  • Blackberry curve Smartphones blackBerry 9320 doesn't scroll properly

    My fone stopped scroll correctly for most in the mail, but sometimes other things nobody knows how to solve this problem.