Get DDL of objects in another schema without access to their content

Hi,
is there any object privilege which could be granted to a user A so that he can get only the user's B object definitions (DDL) but without accessing their content or executing them (in case of packages/procedures/functions)? E.g. to get the user B's tables DDL, user A should have at least the SELECT privilege on them (at least I think so), so he has access also to the table's data. To get stored procedure DDL, I don't want to give user A the ability to also run them with EXECUTE privileges, etc.
I checked the Security Model section of DBMS_METADATA http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_metada.htm#i1016867. The SELECT_CATALOG_ROLE role is mentioned there, which would allow me to to what I need, but it would also give a user access to all dba_* views which I don't think is ok.
Any thoughts?
Thanks in advance and regards,
Jure

If you want userA to be able to see the dictionary information for userB and no others other than him or her-self then there is another potential option. Create a sys owned view based on the Oracle user_source code that changes the filter condition to allow seeing UserB. Now if your developer is using Toad or some other tool this will likely not be suitable since the tool makes use of specific dictionary views, but for access via SQLPlus it works fine. My developers have a view that provides the same information as DBA_SOURCE but do not have access to any other dicitonary views outside the expected all_ views which work as normal.
This may also not be practical if you want to provide access to all the views but if you actually only need a few such as tables, indexes, and _source then this is another option for you to consider.
HTH -- Mark D Powell --

Similar Messages

  • I lost my iPhone device, how can I get my data back on another one without using an iCloud backup just back up on i Tunes, Please Help.

    I lost my iPhone device, how can I get my data back on another one without using an iCloud backup just back up on i Tunes, Please Help.??

    You can find the backup files and then copy them to a safe place if you are worrying about this.
    iTunes places the backup files in these places:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    The "~" represents your Home folder. If you don't see Library in your Home folder, hold Option and click the Go menu.
    Windows Vista, Windows 7, and Windows 8: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    To quickly access the AppData folder, click Start. In the search bar, type %appdata%, then press Return.
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    To quickly access the Application Data folder, click Start, then choose Run. In the search bar, type %appdata%, then click OK.

  • HT1338 why did i get a window that says another device is accessing my ip adress?

    why did i get a window that says another device is accessing my ip address?

    It may be that you have security turned on to prohibit this. You can register your drive by going to the website through your browser more easily.

  • 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

  • Help in writing  query few schema objects  from another schema.

    Hi Gurus,
    Could some one help in writing an sql which will give list of all the object of a schema "genp" visible in another schema "genp_v" and "gen_con" there is an dblink and few grants on those schemas .
    i dont have the password of any of those users i have connected as sys and i can not change the password of any of those users..
    Any help on this is highly apprciated.
    Thanks in advance .

    could you please update me for all the objects apart from just the tables .
    thank you so much .. it was just out of my head at that moment .
    cheers

  • Export/import with objects in another schema

    In 9.2
    I created two users: `live` and `world`
    `live`> create type nam as object (txt varchar2) not final;
    `system`> grant under any type to world;
    `world`> create type nam_world under live.nam (txt2 varchar2);
    and
    create table nams of nam_world;
    and new row
    insert into nams values ('qwerty', 'ytrewq');
    I build dump file:
    exp system/manager FILE=live_world.dmp OWNER=live,world
    All this successfully!!!
    At another server (also 9.2) this export session terminated with errors:
    imp SYSTEM/manager FILE=live_world.dmp FROMUSER=live,world TOUSER=live,world
    Not help parameter IGNORE=Y
    Not help parameter TOID_NOVALIDATE=(live.nam)
    In any case: "Skipping table "WORLD"."NAMS" because object type "LIVE"."NAM" cannot be created or has different identifier"
    General effect, what import simply not visible type live.nam
    How import tables with objects in another users schema?
    Please, help me.

    Hi Vishwanath,
    You can export the objects as TPZ's
    go to Tools---> Export configuration objects, to export them, and import configuration objects to reimport them.
    cheers
    Prashanth

  • 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

  • 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

  • Accessing objects without access rights

    Hi,
    does anybody know if is possible to set object's attributes with no matter on its ACL?
    Describe of situation:
    I have an object SeqNum defining form of sequence number for instances of other objects. For example, documents of class Document can have automatically set attribute with sequence numbers "DOC001", "DOC002", "DOC003", etc. on their insert to iFS.
    Each SeqNum object have its ACL, by what I want to say that only admins can manage (change) definition of sequence numbers.
    SeqNum object has also an attribute, containing last used sequence number. The problem is that I need to increment (in background, with setAttribute method) this attribute every time some user inserts document with created sequence number. In order to do that, every SeqNum object must have Public ACL, else I get error message with insufficient access rights. Any idea to solve this?
    Thanks in advance
    Radek Zeman
    [email protected]

    >
    I get "table or view does not exist" error. Is there a way I can wirte refer to objects in this schema without having to indicate the owner. So instead of writing SCOT.EMPLOYEES I want to write just EMPLOYEES.
    >
    Create a public synonym for the object.
    CREATE PUBLIC SYNONYM EMP32 FOR SCOTT.EMP;Then you do not need to specify the schema.
    --- edited to add doc reference
    See CREATE SYNONYM in the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_7001.htm
    >
    CREATE SYNONYM Purpose
    Use the CREATE SYNONYM statement to create a synonym, which is an alternative name for a table, view, sequence, operator, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym. A synonym places a dependency on its target object and becomes invalid if the target object is changed or dropped.
    >
    Edited by: rp0428 on Apr 5, 2012 10:56 PM

  • View objects from different Schema from Web Object Browser

    I am logged in as dba and try to view the tables of another schema.
    However in the object browser I can only select my own schema.
    This happens with whatever user I use.
    From sqlplus I can access or create tables for another schema without any problems.
    Is this not supported or am I doing something wrong?
    Thanks for the help.

    Can you assign multiple schemas to a workspace in the XE version of HTML DB?
    I haven't found where to do it.
    Is it not possible because there aren't really workspaces in this version?

  • Need a way to pass object to another application

    Hello Everyone,
    I need to pass an object from one application to another. I wanted to do that using request.setAttribute(Object) but this works only on RequestDispatcher.forward(URL) method and can be used only within the application you are currently in. It does not work for absolute URLs therefore I cannot go to another application. I also tried response.sendRedirect(URL) but then request object is lost when redirected to another application.
    Any help will be greatly appreciated,
    Thanks in advance,
    Y.M.

    if your two application servers are on the same box,
    then you can get the RequestDispatcher object from
    another ServletContext and then use the
    request.setAttribute() call.
    ServletContext newContext =
    getServletContext().getContext(webApp);
         if( newContext == null )
    throw new IllegalArgumentException("Invalid webApp
    p '"+webApp+"' does not exist.");
    request.setAttribute("myobject", objToPass) ;
    RequestDispatcher dispatcher =
    newContext.getRequestDispatcher(urlToGoTo) ;
    dispatcher.forward(request, response);
    Unfortunately those apps are on different servers ...

  • Programatically controlling objects in another VM

    I need to programatically get and modify objects in another VM.
    How can I do this? I already use JDI, but until now I only get references, not the real things.
    And I am not sure, if JDI allows me to modify objects in another VM, invoke methods etc.
    But it must work somehow, because all this is possible when debugging in an IDE like in Eclipse. But its too hard to understand all their large implementation.
    Are there any small code pieces which simply show me exactly how I can access objects in another VM (no references) and modify them inside the other VM from another VM?
    Until now I have something like this:
    Class clazz = Class.forName("com.sun.tools.jdi.SocketTransportService");
    TransportService ts = (TransportService) clazz.newInstance();
    Connection connection = ts.attach("localhost:8000", 0, 0);
    VirtualMachineManager vmm = Bootstrap.virtualMachineManager();
    VirtualMachine vm = vmm.createVirtualMachine(connection);
    List allThreads = vm.allThreads();
    The elements in the collection are actuall of type ThreadReferenceImpl. I already discovered that I need to suspend the thread and walk the stack trace in order to get the object I want and then to resume the thread (but I found only references). Thats the basic idea. I wonder if that works, and if yes, how. Please no guesses.

    Check out the jdb source code in <jdk>/demo/jpda/examples.jar. You can find calls to ObjectReference.setValue(value) and invokeMethod(...).

  • Is there a way to access object from other schema?

    1. Is there a way to access object from other schema
    Without using synonym/public synonym without prefixing schema owner?
    2. If you do not see any object in all_objects by same name owned by connected user or public, can there still be objects hidden from this view? for instance synonyms created by SYSTEM
    TIA for help

    Well, you missed something somewhere. If there is no
    ALTER SESSION SET CURRENT_SCHEMA=whoeverthen there must be either public synonym for the object as this shows:
    SQL> CREATE USER a identified by a;
    User created.
    SQL> GRANT CREATE SESSION to a;
    Grant succeeded.
    SQL> CREATE USER b identified by b;
    User created.
    SQL> GRANT CREATE SESSION, CREATE PROCEDURE, CREATE PUBLIC SYNONYM to b;
    Grant succeeded.
    SQL> connect b/b
    Connected.
    SQL> CREATE PACKAGE test AS
      2     PROCEDURE testit;
      3  END;
      4  /
    Package created.
    SQL> CREATE PACKAGE BODY test AS
      2  PROCEDURE testit IS
      3  BEGIN
      4     NULL;
      5  END;
      6  END;
      7  /
    Package body created.
    SQL> connect a/a
    Connected.
    SQL> desc b.test
    ERROR:
    ORA-04043: object b.test does not exist
    SQL> connect b/b
    Connected.
    SQL> GRANT EXECUTE ON test TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc b.test;
    PROCEDURE TESTIT
    SQL> desc test;
    ERROR:
    ORA-04043: object test does not exist
    SQL> connect b/b
    Connected.
    SQL> CREATE PUBLIC SYNONYM test FOR TEST;
    Synonym created.
    SQL> connect a/a
    Connected.
    SQL> desc test
    PROCEDURE TESTITAnother possibility without public synonyms is that crv had granted the other user privileges on some object, and the other user creates a private synonym for that. When crv granted privileges on a different object with the same name, the private synonym became valid again. Something like:
    SQL> connect /
    Connected.
    SQL> drop public synonym test;
    Synonym dropped.
    SQL> GRANT CREATE SYNONYM TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    ERROR:
    ORA-04043: object test does not exist
    SQL> desc b.test
    PROCEDURE TESTIT
    SQL> CREATE SYNONYM test FOR b.test;
    Synonym created.
    SQL> desc test;
    PROCEDURE TESTIT
    SQL> connect b/b
    Connected.
    SQL> REVOKE EXECUTE ON test FROM a;
    Revoke succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    ERROR:
    ORA-04043: object "B"."TEST" does not exist
    SQL> desc b.test
    ERROR:
    ORA-04043: object b.test does not exist
    SQL> connect b/b
    Connected.
    SQL> DROP PACKAGE test;
    Package dropped.
    SQL> CREATE FUNCTION test (p_num IN NUMBER) RETURN NUMBER AS
      2  BEGIN
      3     RETURN p_num * 10;
      4  END;
      5  /
    Function created.
    SQL> GRANT EXECUTE ON test TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    FUNCTION test RETURNS NUMBER
    Argument Name                  Type                    In/Out Default?
    P_NUM                          NUMBER                  INSo, I would go looking for the synonyms.
    TTFN
    John

  • Creating views in a new schema to access certain rows of tables in source schema

    Hi,
    Oracle 10.2.0.4
    We are trying to mask certain data from some users. My suggestion is that we create a new schema view_schema on the same instance where we have source tables say 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 new users that role to be able to see the viewed data.
    So the questions below.
    We can create views to look at data in another schema WITHOUT giving SELECT permissions directluy on source_schema.tanle?
    This will work and there is no need to create synonyms etc
    WE can manage users and views much easilier
    Does this make sense and would that be better than selecting views with say table_name_view in source schema for this purpose and even creating synonyms for these views with the same tanle names in sourece_schema?
    Thanks

    905989 wrote:
    Hi,
    Oracle 10.2.0.4
    We are trying to mask certain data from some users. My suggestion is that we create a new schema view_schema on the same instance where we have source tables say 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 new users that role to be able to see the viewed data.
    So the questions below.
    We can create views to look at data in another schema WITHOUT giving SELECT permissions directluy on source_schema.tanle?
    This will work and there is no need to create synonyms etc
    WE can manage users and views much easilier
    Does this make sense and would that be better than selecting views with say table_name_view in source schema for this purpose and even creating synonyms for these views with the same tanle names in sourece_schema?
    Thanks
    1. You can create the view in another schema (first granting privileges to the view schema) without granting privileges from the source schema
    2. You probably want to create public synonyms for the view(s).  You can refer to the view as schema.view but this is cumbersome
    3. I am not sure about management being easier but added complexity should not be too bad.  Write documentation describing how everything works and the object involved.
    Another, more complicated but more powerful possibility is to use row level security also known as virtual private database - if you have the license.  You create a profile for a table and a procedure to generate WHERE clauses to filter any query against the table and columns defined in the profile.  Again, you need the license to do this.

  • Pre-Order Tom Clancy's The Division Online Now to get BETA access and bonus content!

    Ubisoft is once again set to bring another Tom Clancy game to the masses. This time they are poised to bring gamers something fresh and are going to push the boundaries of what we consider gaming. Tom Clancy’s The Division is the upcoming massively multiplayer online, open world, third-person shooter-role playing hybrid, which is set to release on March 8th 2016. By pre-ordering your copy online now you can get yourself a code for the BETA and access to bonus content upon the games release.

    Store>Check for Purchases tells me "All purchases have been downloaded for this account." I thought I'd mentioned that in my post, but I guess not.
    Thanks Dave! I emailed them using the form at that link. Someone else suggested that as well. hopefully I'll be able to figure out what's going on. Even if they fix it I might not bother to get the album from iTunes. I have the CD on the way!
    The other day I searched for Raine Maida music in the store, and the pre-order version still showed up, but it said it had a release date in 2038 or something. Now the store doesn't even list the pre-order version...
    I'm probably out of luck.

Maybe you are looking for

  • "always open in icon view" is ALWAYS on.I've

    I've just reinstalled leopard on my imac as i felt it had built up with rubbish and was slowing things down, anyway..... When i now open my Macintosh HD, it always appears in icon view. I click show view options, deselect "always open in icon view" w

  • Scanner not saving or mailing correctly after recent OSX update

    I have a photosmart D110a.  Since my last Apple OSX update to 10.9.2, When I scan pics or documents, the scan shows up correctly on the screen, but when I save it or email it, it comes up a black screen.  How do I fix this?

  • Required BAPI's for creating travel request

    Hi , Can you please help on below issue. I need to know what are the BAPI'S are supporting for creating travel request. Thanks, Kumar.V

  • HEX timestamp in AS/400 QHST

    I wrote the following page against the QHST History Log files on the AS/400. When I don't have a WHERE clause the extraction of the timestamp ends up in the 1870s but the calculation in ColdFusion seems right. When I limit the records selected as bel

  • Join Two Internet Connection

    Hi Everybody and thanks for your time. At home i have two internet connections, the first one is an airport extreme (802.11g), wich sends the signal to another airpot extreme also 802.11g, in a WDS network, the reason is that the 1st internet connect