Create a user and use  the objects of another Shema

Hi all oracle`s gurus
i need a little help .....
i, create a shema named "a" that the owner is user_dba and here there are all objects of the aplication but i want all other users of the app can use those objects; the users are created in the database ,
Thanks

I would be very leary about granting privileges to PUBLIC, particularly privileges other than SELECT, because most systems end up getting a few special-purpose accounts that shouldn't see everything.
The standard approach is
- Create a role
CREATE ROLE my_application_role;- Grant appropriate privileges to that role. This generally takes the form of a PL/SQL block initially
BEGIN
  FOR x IN (SELECT * FROM dba_tables WHERE owner = <<schema owner>>)
  LOOP
    EXECUTE IMMEDIATE
      'GRANT select, insert, update, delete ' ||
      '    ON <<schema owner>>.' || x.table_name ||
      '    TO my_application_role';
  END LOOP;
END'- Grant that role to the user(s) that will be connecting to the database,
GRANT my_application_role TO some_user- Create appropriate public synonyms for the various objects. Again, this can be a PL/SQL block and can be combined with the block that grants privileges
BEGIN
  FOR x IN (SELECT * FROM dba_tables WHERE owner = <<schema owner>>)
  LOOP
    EXECUTE IMMEDIATE
      'CREATE PUBLIC SYNONYM ' || x.table_name ||
      '    FOR <<schema owner>>.' || x.table_name;
  END LOOP;
END'As an alternative to public synonyms, you can set the CURRENT_SCHEMA attribute (potentially in a login trigger) to SCHEMA_OWNER when the users you want to access these objects log in.
Justin

Similar Messages

  • Can i access my account and use the programs on another computer?

    can i access my account and use the programs on another computer? i would like to be able to use both my laptop and my desktop

    yes, you are allowed concurrent installations and activations on, up to, two computers.
    by signing out of one, you can activate on a third etc.

  • I would like cut out an object using the quick select tool and drop the object into another picture. Can anyone help

    I am using background pictures and want to cut out objects from other jpegs using the quick select tool and drop them into the background picture. So if i have a banana and select the object i need to copy the banana into the other background.
    Hope this makes sense.
    Gary

    Select banana. Right click>layer via copy. Move tool. Click and drag to other file. Drop on image.
    OR: load the background and banana in one stack (File>Scripts>Load File Into Stack). Select banana and layer via copy or create layer mask.
    Benjamin

  • Creating a view and use the view in a model

    Hi All,
    I am new to OBIEE and i have a requirement that i have two fields to be added to a subject area. Since we can't add queries directly to a model, i have to create a view and then put the query in it and then use the view in that model.
    I couldn't understand this much, if anybody could help me explaining in detail about the views and adding a query in it?
    Thanks
    Gohan

    Hi,
    Please refer the screen short below link
    http://imgur.com/b9sXS
    Right click any of one physial table(RPD physical layer) -> Select Properties -> from the properties windows choose 'Select' as Table type ->
    Please enable feature 'CREATE_VIEW_SUPPORTED' view just go to 'Features' tab and from the available option select 'CREATE_VIEW_SUPPORTED' is checked or not. If it is not checked then check the option.
    can you explain your current model and scenario?
    for example to you can use to fetch two fields from Subqueries,all trypes of joins(inner,left outer,right outer etc..,) its upto you case
    e.x:fetching two tables columns mapping subquery:
    SELECT column1, column2 FROM table1 WHERE column1 IN (SELECT column1 FROM table1
    INTERSECT SELECT column1 FROM table2 )
    SELECT column1, column2 FROM table1,table2 WHERE table1.column1 = table2.column1
    Alternative there is feature call "mulitple subject area" method will work (Union,Union all etc..,)
    Thanks
    Deva
    Edited by: Devarasu on Jun 6, 2012 4:40 PM

  • Oracle Ignores hint in One Instance and uses the hint in another instance

    Hi Oracle World,
    I am experiencing a strange problem in Oracle.
    We have two oracle servers: one for Test and one for Production.
    We have exactly the same code for a view in both the systems:
    The code is as follows:
    CREATE OR REPLACE FORCE VIEW V_FT(...................)
    AS
    SELECT /*+ star_transformation fact (FT) */
    FT.*, AH.ACCT_1, LH.REGION, FH.FNCT_1
    FROM
    LOCATION_HIERARCHY LH,
    ACCOUNT_HIERARCHY AH,
    FUNCTIONAL_HIERARCHY FH,
    FACT_TABLE FT
    WHERE
    LH.COMPANY = FT.COMPANY
    AND AH.ACCOUNT = FT.ACCOUNT
    AND FH.FUNCTIONR = FT.FUNCTION;
    When I see the execution path:
    In Test box the Explain plan is as expected: It takes the Star_transformation hint into account, converts all three reference table joins to bitmap and performance is good.
    But In Production, It tatally ignores the table name from the hint.
    Also it converts all the tables names to lower case: though it shouldn't impact, I have also tried to give the table names in lower case and then tried. Same issue.
    Tried with NO_MERGE hint. It was pretty good in Test but same issue in Production: it ignoes the table name from hint.
    I have taken out the table name from test and then tested. Now both the explain plans match. That proves oracle ignores the table name in Production.
    We have compared all the parameters in both. They are 100% same. All indexes are analyzed. Can anyone please help what could be the fundamental difference that causes this difference?
    Production takes 8 minutes for a specific query whereas Test returns the same query in 45 secs. Data volume is also not very much different except few hundreds.
    Any pointers please?
    Thanks & Regards
    Saswati

    It is enabled. As I have mentioned we have compared all the parameters in both.
    All v$parameter, init.ora settings everything is same.

  • How to create portal user and integrate with external appl login

    How to create portal user and integrate the user with external application for single sign-on ?
    I want to access my external application thru portal user ..?
    Shyam

    Hi Jithin,
    The link that you've shared talks about a different scenario.
    In my case, I want to pass the portal user id when the user clicks on the Help Link present in the header area.
    I am trying to pass it along with the Help Link Url property of a masthead iview but it is not getting passed to the target Url.
    I would like to know if it is possible to pass the Portal User Id in this way or not.
    Though if we create a appintegrator iview and pass the user id <User.UserID> along with the target Url, it reaches there.
    Thanks & Regards,
    Anurag

  • I have a WD 2 tb hard drive that I want to use to back up my Mac Pro quad core.  How do I create a back up startup disk?  Also, when I used Time macine, it only backed up users and not the system or library folders.  Ideas?

    I have a WD 2 tb hard drive that I want to use to back up my Mac Pro quad core.  How do I create a back up startup disk?  Also, when I used Time macine, it only backed up users and not the system or library folders.  Ideas?

    Welcome to Apple Support Communities
    Time Machine should be enough to make a backup of your files. Also, it should back up all folders, so open System Preferences > Time Machine > Options, and make sure that there are no folders included in the excluded items list.
    If you want to create a bootable clone of your hard drive, you need to use an app like Carbon Copy Cloner or the Disk Utility's Restore feature > http://pondini.org/OSX/DU7.html

  • Selecting an object fails when creating a new dashboard using the 'New Dashboard and Widget Wizard'

    Hi,
    I am using SCOM 2012 SP1
    I have recently been experiencing an issue when trying to create a new dashboard using the wizard. I get to the step where you select a group or object to add to the  Scope and Counters section. When I try to search for a particular object such as a
    port or interface it times out and returns an error. The error is shown below:
    Please provide the following information to the support engineer if you have to contact Microsoft Help and Support :
    Microsoft.EnterpriseManagement.Presentation.DataAccess.DataAccessDataNotFoundException: Exception reading objects ---> Microsoft.EnterpriseManagement.Common.UnknownDatabaseException: The query processor ran out of internal resources and could not
    produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer
    Support Services for more information.
       at Microsoft.EnterpriseManagement.Common.Internal.ServiceProxy.HandleFault(String methodName, Message message)
       at Microsoft.EnterpriseManagement.Common.Internal.EntityObjectsServiceProxy.GetManagedEntitiesByManagedEntityTypesAndCriteriaWithInstanceQueryOptions(IList`1 managedEntityTypeIds, IList`1 managedEntityBaseTypeIds, IList`1 criterias, String
    languageCode, InstanceQueryOptions instanceQueryOptions)
       at Microsoft.EnterpriseManagement.InstancesManagement.GetObjectsReaderInternal[T](ICollection`1 criteriaCollection, ObjectQueryOptions queryOptions)
       at Microsoft.EnterpriseManagement.Management.DataProviders.ManagedEntityProvider.GetManagedEntitiesByClass(ICollection`1 baseTypeNames, String criteriaString, List`1 valueDefinitions, List`1 sortValueDefinitions, Int32 maxEntities, String typePropertyName,
    String typeWithIconPropertyName, Boolean propertyCollectionRequested)
       --- End of inner exception stack trace ---
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethodInvoker.Invoke()
       at Microsoft.EnterpriseManagement.Monitoring.DataProviders.RetryCommandExecutionStrategy.Invoke(IDataProviderCommandMethodInvoker invoker)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.DataProviderCommandMethod.Invoke(CoreDataGateway gateWay, DataCommand command)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.ExecuteInternal[TResult](DataCommand command)
       at Microsoft.EnterpriseManagement.Presentation.DataAccess.CoreDataGateway.<ExecuteAsync>b__0[TResult](<>f__AnonymousType0`1 data)
    It appears to be complaining about internal resources, but we have not experienced this issue before and both the management and SQL servers have plenty of resource. The databases are held on a seperate dedicated sql server and I have noticed that when I
    try to search for the object, the sqlservr.exe process immediately consumes 50% CPU while the query is running. As soon as it ends (errors) the sqlservr process drops back to a reasonable number.
    No changes have been made to either the management server or sql server. We were able to create dashboards one day, but then recieved this error the next.
    Has anyone else seen this issue? or can anyone explain what is happening?
    Many thanks

    Hi,
    Asposted earlier,hadt he same problem
    when creating a Dashboard widget type
    State.
    Ones olution I found for this was as follows:
    When creating the State widget,the option
    to specify the criterion I left blank
    and finished the creation of the dashboard.
    With that managed to solve the problem.Of course this
    is not the solution, or the root cause
    of the problem.
    I will examine more about this issue, and sohave
    the ultimate solution and why such behavior,I post
    here.
    thank you
    Wilsterman Fernandes

  • I don't have a question so much as a comment for APPLE. I am a new iPhone 5s user and it has many things I like but It is too small and I can only talk on the phone and use the internet if i am in a position to use a wifi connection and that is not good

    I am a new iPhone 5s user. I like many of the features it offers. I don't like that I cannot talk and use the internet (if I am away from WI-FI) and this phone is too small. I am actually thinking of returning it and going back to an Android. After all the hassle it took to get all my stuff working on this phone , it may be worth the switch. This phone needs to be able to multitask freely in this day and age. Also Safari is not the best search engine but I could work with it if I could talk and use it at the same time. I use my phone for business and this is a feature that is needed in my line of work.

    TJBUSMC1973 wrote:
    The iPhone is working, as designed and advertised.  In this case, the user failed to educate themselves properly, either by proper research or asking the right questions, before purchasing the device.
    I understand that the OP failed to do research. But then, I wasn't replying to the OP. I was replying to Chris. I have Verizon. I can talk and use data at the same time with my Droid Maxx. Therefore, the problem is not just with the network. It would be technically possible for an iPhone to do that on Verizon/Sprint if Apple had chosen to use a different chip, such as the kind other phone manufacturers have elected to use.
    Of course, this is probably all irrelevant to the OP's issue. It was merely a point of clarification, especially for those people who are used to being able to use both voice and data at the same time on Verizon. When they switch to an iPhone, they are often surprized at the limitation.
    Best of luck.

  • Creating a Master virtual hard disk and using the same for all other VM's

    Hi,
    We would like to create a master virtual hard disk and use the same for all other VM's. Can we do that ?
    my requirements :
    1) create 10 VM's
    2) first create a master virtual hard disk with win OS and use the same to create the 10 VM's.
    3) After creating the VM's change the HDD size.
                  -- if i have created master virtual disk with 500GB , and use the same for creating a virtual machine. can we change the HDD size to 1TB ?
    After creating the VM's ,i will change the system names and activate the windows accordingly.
    Will there be any implications ,if we can/will do like this.
    Thanks.

    Hi Suren424,
    I think Using Differencing Disks may cover your needs .
    Please refer to following setps:
       "Create the Parent Virtual Machine Configuration and Virtual Hard Disk
        Install the Operating System, updates, and common software
        Generalize the installation
        Prepare the parent virtual hard disk
        Create the differencing disks
        Create virtual machines that use the differencing disks
    For details please refer to follwing link:
    http://social.technet.microsoft.com/wiki/contents/articles/1393.hyper-v-virtual-machine-vm-parent-child-configuration-using-differencing-disks.aspx
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • I have Pages 09 and I have  created a business card using the template but can't figure out how to duplicate it to the other 9 on the page Am and sure I am going to look daft coz its only the click of a button but I can't work it out Thanks

    I have Pages 09 and I have  created a business card using the template but can't figure out how to duplicate it to the other 9 spaces on the page. I am and sure I am going to look daft coz its only the click of a button but I can't work it out Thanks

    I do the following: Hold down the command key and highlight all the items to be reproduced. Then hold down option and drag the items from the first to each subsequent card.

  • What is the best practice to create IDM user and target accts via recon

    usecase:
    LDAP<--->idm---->AD.
    User exists in LDAP. IDM and AD are empty. Need to create IDM user and AD acct from LDAP data.
    I can recon against LDAP and create the IDM user. But I cannot create AD acct in the same recon process. What is the best practice to do the above.

    i think you have to have a "Per-account Workflow" set which creates the user in AD.

  • How to create RFQ s and use them to complete the program

    hi,
    how to create RFQ s and use them to complete the program
    thanks in advance

    Hi Santosh,
    RFQ is created through transaction ME41.
    You need to write down BDC for mass update of RFQ, because BAPI is not available.
    Regards,
    Tutun

  • I just reinstalled and this is the question that show "You have made changes to your photo library using a newer version of iPhoto. Do you want to quit and use the latest version of iPhoto, or do you want to create a new photo library?"  what do i do next

    I just reinstalled and this is the pop up that shows "You have made changes to your photo library using a newer version of iPhoto. Do you want to quit and use the latest version of iPhoto, or do you want to create a new photo library?"  what do i do next? it just keeps popping up and loading but only gives a quit button?

    Update it.
    How old is your Mac? If it's very recent you need to update via the App Store
    If you purchased at the App Store you need to update via the App Store
    Otherwise you update via Softare Update
    Regards
    TD

  • You have made changes to your photo library using a newer version of iPhoto. Do you want to quit and use the latest version of iPhoto, or do you want to create a new photo library?

    Long story short, I made a backup using TimeMachine of my iMac.  I got my MBA which was being repaired and i restored from backup.  Everything works fine, except for iPhoto which is not saying:
    "You have made changes to your photo library using a newer version of iPhoto. Do you want to quit and use the latest version of iPhoto, or do you want to create a new photo library?"
    I have OS X 10.7.2 and iPhoto 9.1.4.  I've tried:
    Repairing permissions
    Deleting iPhoto, installing agaian, and updating
    Repaired iPhoto Library (stays stuck at 98% when rebuilding database)
    I've also tried iPhoto Library manager which cannot even see the library
    Tried restoring from backup from iPhoto and it messed up library (I still had my backup)
    Quite frustrating - any ideas on how to get iPhoto back to life?

    Dunno why Software update was not displaying the latest version of iPhoto (9.2.1 as of January 27, 2012)...updating to this has fixed the issue

Maybe you are looking for

  • BlackBerry Z10, so many frustrating issues

    I have been using my Blackberry Z10 for 4 months.  I still have so many issues that don't work like I would like, and I know if there is something that can fix them.  There is a list, for sure there are more that I don't remember right now.  Battery:

  • CCKM with 802.1x authentication

    Hi, Can we use CCKM authentication with 802.1x layer 2 authentication method. I read it one cisco article that we can't use CCKM with 802.1x authentication.  Please find the url below, its says that is you choose layer 2 authentication method is 802.

  • Any opinions?

    Wow..so I had my RAM (corrupted it seems) upped to the highest it can go...3 gigs and my IMac pretty much died on Sunday night. Took it in (thank goodness still under warranty) and after a new logic board was ordered and installed..it still wouldn't

  • 3rd party apps stopped working on 3gs

    This is similar in nature to other threads but the difference appears to be that I started from a 3gs phone with 3.0 installed. After changing the home page the screen stopped responding to touch input. I resetted the phone and all 3rd party apps. ce

  • Cannot upgrade to the latest version.

    rying to run an automatic update and the message that an older version (5.5) cannot be removed and to contact your technical support group. The error message then generated is that installing Skype failed – error code 1603. A fatal error occurred dur