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.

Tags: Database

Similar Questions

  • Extraction of the privileges assigned to a user schema

    Hi all

    I would like to know how to model the old user against another user-new by extracting the privileges of the old user. With the help of dba_role_privs, this will be useful.

    Your help is appreciated

    Thank you.

    I understand, see if that helps,
    http://wiki.Oracle.com/page/determine+roles+and+privileges+granted+to+users

    Aman...

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

  • view script that creates a view of another user

    How can I see the script for a view?

    Thank you

    From sqlplus do following:
    set pages 0
    the value of 10000 long
    Select dbms_metadata.get_ddl ('SEE', 'Nom_de_vue') of double;

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

  • How to allow a user to save a form completed (and now unmodifiable) created in Adobe Acrobat DC?

    How to allow a user to save their form to fill out (that I created in Adobe Acrobat DC) so that the fields are more editable when they return the form by e-mail?

    If you submit a script, ASP.net server (see example below), you can merge and/or "Flatten" the form of PDF with iTextSharp for .NET platforms. You can also flatten the PDF with iText JAVA platform. You can also create Adobe's JavaScript action button validate before submitting it to an email that goes through the fields, making them 'read-only '; but, the ReadOnly property can easily be retroconcu.

    Note: Submission to a script on the server also side bypasses software email client side and send the request using an SMTP account.

    See the #3 example:

    www.pdfemail.NET/examples/

  • How to create a button that allows the user to check their form to find errors?

    Hello

    I use LiveCycle ES3.  I would like to add, at the end of my form (independent, NOT on a web form), a button that allows the user to check their form for errors, and then display a list of errors and highlight areas with errors.  Finally, he must turn off highlight these fields when the errors have been corrected.

    Also, in the form, if the user makes selections, they must include an attachment with their form.  I want to make sure when they make selections that requires an attachment, a field is generated at the end of the form that lists all required attachments.  Is this possible?

    Thank you.

    The button validate calls a Script called "controller" object If you look at the hierarchy of the form Variables example there are two Script objects: controller and validation. Script objects are used to maintain the reusable script functions.

    You have to re-create those for validation to work. If you right click on 'form1' (or whatever your node in the foreground is called in the hierarchy), you can select "insert a Script object. You will need to do it twice.

    In the hierarchy, there is then a node Variables with two Script objects. Name them even as the form of the sample and copy and paste the sample form scripts in them.

  • Allow administrative users to update applications

    I have several new computers running Win7 Pro using the CAD and the standard name of user/login prompt.  Users run in standard user with no administrative privileges accounts.  Users get pop ups of various applications that want to run updates to day, but when the user selects the he is prompted for an administrative password.  Of course, they cannot continue.  The two main offenders are currently Java and adobe Acrobat.  Is there a way to allow administrative users to run software updates to the machine?

    I tried to add users to the power users group, but that did not help.

    My current idea is to create an admin user and set it so that the user can not connect interactively, but can be used to authenticate the update.

    You can't do that. If find you a hack to allow them to you have given the same level of access as an administrator and undermined all chances to avoid to install malicious software or dirt otherwise upward from their computers. If they can install the software in ProgramFiles or % of windows that they own the computer.

    Instead, set up an automated system to deploy software and updates. System Center Configuration Manager is probably overkill for your network, but there are several affordable tools of the 3 parties who could help with deployment and maintain applications. Http://www.kurtdillard.com Kurt Dillard

  • Allowing a user to connect through SSH

    I need to allow a user (not root) to connect to a server ESXi 4.1 via SSH.

    The ESXi server is not a member of Active Directory.

    I have read the article on the http://kb.vmware.com/kb/1024235 page and created a new user.

    Then I opened the inventory, choose 'Add Permission' and adds the new user with the role of administrator on all of the inventory.

    When I try to access it via SSH using the user name and the password of the user I get "access denied".

    I think I missed a relevant step because if I open the inventory again and select ' add permission "the list of users with the privileges granted is empty and I don'tI do not see the user in the list of users with permissions."

    However, if I use the vSphere client I locon as a new user and perform all the administrative tasks of ther.

    • What step am I missing?
    • As my user should only use SSH to perform actions on a given virtual machine, I can great administrative rights only for the virtual machine without rights to granding to all inventory?
    • Is there a more detailed documentation for referred to?

    Concerning

    Marius

    Why not use powercli to create a snapshot of the vm? http://tech.mikeal.com/Blog1.php/2011/01/21/VMware-PowerCLI-scripts-delete-all-snapshots-create-new-snapshots

  • the simple contact form widget does not allow the user to submit. the lunch box turns red. What should I do?

    the simple contact form widget does not allow the user to submit. the lunch box turns red. What should I do?

    Hello

    You have used a form of e-mail field to create 'Appetite' section. This is the reason for which form registers an error as its not able to recognize an e-mail here entry.

    email form field is a required field for form of Muse. Please rename back to e-mail and also to create another field in form in the widget forum (go to the Option to form and enter a single-line text field) and it should work properly.

    Concerning

    Vivek

  • How can I allow the user to take a quiz in the middle of it in Captivate 7?

    Hello Captivaters,

    I want to the learner of a test until he could continue on the training of the force.  If it does not pass the test, he will have to go back and resume. "Recovery" button allows him to do this, but I really want to have 4-5 of these checkpoints 'quiz' in e-Learning - separated with presentation material - so the user proves that he understands the material before moving forward.

    This is why I would create my own button "recovery" at the end of every "checkpoint quiz" that leads the learner to the first issue of this checkpoint (not to the first issue of training).  So far, I was able to create a button that appears after it receives a correct quantity to allow him to continue, and I want to create a button that appears and brings it to the first control point question if is nott get the correct amount and return to these questions.  The first part is easy, but I also need to add the function or reassign a variable to allow the user to resume the quiz. I hope I'm making sense... Any help would be appreciated!

    -Ryan

    Your recovery button (s) will have an advanced standard action at least these two statements and in the following order:

    • Go to slide to score
    • Go to the question slide

    Jumping to the slide of score and so that there are attempts to Quiz on the left, the next attempt will be launched (you can check if you put the system variable I was talking in a text container timed for the rest of the project). Then you jump to the slide where you want the user to return to the questions.

    You may have to make it a conditional action advanced, if you want to first test the result?

    Lieve

  • Get the list of roles/privileges that allow access to an object

    Hi friends,
    Sometimes I'm not able to find the exact reason why a user has access to a particular object. There are so many roles that are granted to a user who I get confused by reaching the correct role via the TOAD schema browser which allows this user to make a select or any other operation on a particular operation on a given object.

    Can you please me guide in writing a simple query that will tell me why a particular user has special access to a particular object?

    I tried to use the script but no success in obtaining my goal below:
     SELECT DBMS_METADATA.GET_DDL('USER', '&&a')|| '/' DDL  FROM DBA_USERS WHERE ROWNUM <2
     UNION ALL
     SELECT DBMS_METADATA.GET_GRANTED_DDL('ROLE_GRANT','&&a' )|| '/' DDL FROM DBA_USERS where rownum <2
     UNION ALL
     SELECT DBMS_METADATA.GET_GRANTED_DDL('SYSTEM_GRANT', '&&a') || '/' DDL FROM DBA_USERS where rownum <2
    I'm using oracle 11.1.0.7.0.

    regds,
    Malika

    Normally, you can use the three following points of view to discover the privileges of users or roles with recipient =''

    DBA_SYS_PRIVS - Access Privileges

    DBA_ROLE_PRIVS - User Roles

    DBA_TAB_PRIVS - Object Privileges

    References: http://docs.oracle.com/cd/B28359_01/network.111/b28531/authorization.htm#BABCHEJB

  • create a view with subquery generating insufficient privileges!

    Hello
    I want to create a view by a DB user with DBA role, the view is based on a query that extracts data from 2 users, next to the query contains the subquery. When I run the query itself - without clause CREATE VIEW - it works and gets the data, but when I try to create a view based on this request, it generates ORA-01031: insufficient privileges pointing to the subquery.
    Any suggestion.

    Saad,

    Hello

    To use the table in a view, privileges must be granted directly to the owner of the view (or public). Privileges granted to a role are not enough to use the table in a view.

  • How to tune all the privilege of a specific to a user schema?

    How to tune all the privilege of a specific to a user schema?
    I have already create a new schema and import the data necessary for this scheme.
    Now I want to affect all the privilege for this schema to user HR (let the user HR become owner of this schema). How to deal?

    Published by: qkc May 13, 2011 10:45

    qkc wrote:
    How to tune all the privilege of a specific to a user schema?
    I have already create a new schema and import the data necessary for this scheme.
    Now I want to affect all the privilege for this schema to user HR (let the user HR become owner of this schema). How to deal?

    Published by: qkc May 13, 2011 10:45

    It is no way - by definition - that a user can 'ownership' of another schema. A schema is, by definition, the collection of objects that belong to one owner.

    but it's maybe just semantics in the context of what you really want.

    Use sql to generate the sql:

    spool doit.sql
    select 'grant select on someuser.' || table_name || ' to someotheruser;'
    from dba_tables
    where owner = 'SOMEUSER';
    spool off
    
  • copy the select value in the textfield of LOV, and allow the user to modify

    Hello
    I have a datablock with 20 records and each record has a comment (say field_comments) fields. I would like to allow the user to choose LOV populated predefined comments (say lov_comments) and add a few additional comments after they choose the value of LOV.

    I created a LOV and added the return type 'field_comments' in column mapping properties. When the user clicks a button, LOV opens. They choose the value of the LOV and the value goes to the field 'field_comment '. The problem with this approach, the user cannot add their comments after selecting in LOV.

    I tried this too much. I created another area of non-visible text (i.e. fake). In the LOV, I added "dummy" field as returntype. In the dummy field, I created the trigger 'After the CHANGE', which basically says: block. field_comments =: block. Mannequin.

    But, the user must click another field to display the value selected from the LOV. The values of the 'field_comments' is not being updated as soon as the user click on the 'OK' button in the LOV.

    I'd appreciate if someone could give me feedback and help to solve my problem. Thank you for your help.

    I thank.

    Well, I tried exactly what you posted and it allowed me to SELECT from LOV, then CHANGE/ADD new text in front of returned value in the field. He recorded in the database and questioned without any problem.

    Your article is allowed to INSERT/update? If this isn't the case, then set yes "Update/Insert allowed" and attach your LOV to the element and set "post to list" No.

    You can also see if you have any validation done on WHEN-VALIDATE-ITEM trigger or after CHANGE which will fail because you change LOV populated values.

    I hope that helps!

Maybe you are looking for

  • 9.3.1 iOS updated Wifi problem

    After the update to iOS 9.3 on my iPhone 6s, I am facing problem connecting wifi, iphone is not able to find and connect to a wifi have been the signal strength is low, earlier it used to connect. I also checked with an Android device gets connected

  • Satellite Pro A200 cannot connect to the wireless network

    Hello I have a Satellite Pro A200 and Tuesday night I was able to connect to a wireless network. I received an update, rebooted and now it doesn t seem to work. I can see the wireless networks available via the Toshiba Radar but cannot connect to my

  • Smart printing

    I've installed Smart Print on my Windows laptop. When I click the icon print smart, it evokes a nice area for printing with formatting of grand and everything.  But when I go to print it is overlapping text and it does not the nice area print own it

  • WIFI adapter does not work and can not be detected

    Hi guys,. I use HP Pavilion Dv4 3106tx. I don't know what happened, but out of no where my wifi sort adapter stopped working. whenever I have activate my wifi button, bluetooth doesn't work and does not display the icon of wifi which usually shows at

  • Keyboard shortcut for Calculator

    Hello everyone, could someone please tell me how to create a keyboard shortcut for the calculator? Rgds Roona