Confused about the default schema

Hi,
I am a little bit confused about the schema concept.
I want to create a new schema called APP and then create several users and roles based on the schema APP. The default schema for the users should be APP achema.
How can I make the schema APP the default schema for the new users that I am creating?
I feel that there are some schema design concepts that I have to learn. Is there any resource on the internet that I can read and learn more about oracle schema design best practices?
Any help would be appreciated,
Ali

A schema holds object definitions, and in the case of table & index objects the schema also holds the data.
A user owns the schema.
Therefore the user 'owns the definitions (including any functions, procedures, sequences, tabels, etc.)
Other users may be granted access to some, or all, of the objects in a schema. This is done through the 'GRANT ...' command. For example, consider the following steps:
1) create user app_owner
2) create table object test owned by the app_owwner
3) create user app_user
4) grant select, update, insert and delete on app_owner's test table to app_user
5) add synonyms to avoid needing to qualify the table's schema name.
done as follows:
oracle@fuzzy:~> sqlplus system
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 3 20:07:32 2006
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Enter password:
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Create the app owner userid. Note there is no need to ever log in to that user, even to create tables.
SQL> create user app_owner
  2  identified by xyz
  3  account lock
  4  quota unlimited on users
  5  default tablespace users
  6  temporary tablespace temp;
User created.
Creating objects in a schema can be done by providing the schema name, or by switching schema in newer versions of Oracle
SQL> create table app_owner.test ( t number );
Table created.
Create a userid that will access the table. Set that userid up to access the database and (for future) give it the capability to create it's own synonyms
SQL> create user app_user
  2  identified by xyz
  3  temporary tablespace temp;
User created.
SQL> grant create session to app_user;
Grant succeeded.
SQL> grant create synonym to app_user;
Grant succeeded.
Now give the user access to the objects
SQL> grant select, update, insert, delete on app_owner.test to app_user;
Grant succeeded.
Let's test it out. Insert by qualifying the schema name on the object, then create a synonym to avoid using schema, and try it all using the synonym
SQL> connect app_user/xyz
Connected.
SQL> insert into app_owner.test values (4);
1 row created.
SQL> create synonym test for app_owner.test;
Synonym created.
SQL> insert into test values (3);
1 row created.
SQL> select * from test;
         T
         4
         3
SQL>  Note that some people want to use PUBLIC grants and PUBLIC synonyms. This is a real bad idea if you want to ensure long term security of the data and want to host several different applications in the same Oracle instance.
This, and a whole lot more, is in the 'Concepts' manual for your version of the database at http://docs.oracle.com

Similar Messages

  • I'm confused about the apple ID transition from my aol screen name. Does it continue to use my aol email as my apple ID, converting it somehow or do I need to provide a new email address or just create a new username for the apple ID?

    I'm confused about the transition to an apple ID that doesn't use my aol email to sign in. The instructions are vague and ambiguous. Any help would be appreciated.

    OK, so if your current Apple ID using your AOL Username (like johndoe), then you need to log onto Manage your Apple ID and EDIT that AOL Username to a valid email address: Apple - My Apple ID
    If you have an AOL email address (like [email protected]), and you are not using that as another Apple ID, you can change the AOL Username Apple ID to that. Otherwise, you can change it to any valid email address (which you will have to verify when you change to it).
    Hope that clears it up. Post back if it doesn't!
    Cheers,
    GB

  • Confuse about the document

    Hi,all . From the document ,i had confused about the following .
    Automatic Undo Management in Oracle RAC
    url >> http://docs.oracle.com/cd/B19306_01/rac.102/b28759/adminrac.htm#CHDGAIFJ
    Oracle automatically manages undo segments within a specific undo tablespace that is assigned to an instance. Only the instance assigned to the undo tablespace can modify the contents of that tablespace. However, each instance can read the undo data blocks created by any instance. Also, when performing transaction recovery, any instance can update any undo tablespace, as long as that undo tablespace is not currently being used by another instance for undo generation or transaction recovery
    what's the meaning of above that is bold ?

    Say you're running a 2-node RAC and node 2 dies. The services which were running on node 2 now get re-located to node 1. It is then possible that node 1 will perform transaction rollback/recovery and, when it does so, it will need to be able to read from node 2's undo tablespace (and maybe update the undo segment headers in node 2's undo tablespace, too).

  • Information about the default setup for the demo user

    Hi,
    Can anyone guide me the properties which we have to set for the below
    # Information about the default setup for the demo user.
    db.adminUser=system
    db.demoUser=FOD
    db.demoUser.password=fusion
    db.demoUser.tablespace=USERS
    db.demoUser.tempTablespace=TEMP
    And what exactly they represent
    Regards,
    Krishna

    Krishna,
    It's pretty obvious...
    db.adminUser = the username of a dba user in your database
    db.demoUser = the username of the demo user that will get created
    db.demoUser.password = the password that will be used for the demo user
    db.demoUser.tablespace = the default tablespace for the demo user
    db.demoUser.tempTablespace = the default temporary tablespace for the demo user
    You don't have to change any of them.
    John

  • Example storing data in the default schema with a Web Dynpro application

    Hi,
    is there any example or tutorial for storing data in the default schema with a Web Dynpro application via SQLJ or Hibernate by using the default DataSource?
    Thanks for Help,
    Dirk

    Hi,
    When you create the TAB-Strip object you should be able to set the default displayed TAB against the properties of the TAB-Strip.
    Gareth.

  • Hesitations about the Default Layouts

    Hi everyone,
    I have some hesitations about the Default Layouts for the High Level Containers.
    Panel : FlowLayout
    Dialog: BorderLayout
    Frame: FlowLayout
    Is this all true ??

    I have some hesitations about the Default Layouts for the High Level ContainersA JPanel is not a high level container. Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/components.html]A Visual Index to Swing Components.
    Create a JPanel then use getLayout() and see what is returned.
    Create a JDialog and a JFrame. Then use getContentPane().getLayout() and see what it returned.
    In other words become familiar with the API. As a general rule whenever there is a setXXX() method you will have a related getXXX() method to query the property that was set.

  • Confused about the battery...

    Hello everyone,
    I'm from Pakistan and I just switched to Mac almost 2-3 weeks ago. Since, they have proper apple authorized dealers here so I finally decided to get one for myself. I had some confusion about the battery and my system and now I'm getting very much concerned and worried as a matter of fact.
    I installed coconut battery (as few people suggested me) to check my battery status. First of all, it shows the age of my Mac as 5 months, which is pretty surprising since I got a brand new one and even the condition is of a brand new one so I have no clue why did it say that.
    Secondly, I would like to tell the condition of my battery:
    Current Battery Charge: 3591 mAh (I'm using on battery power right now)
    Maximum Battery charge: 4068 mAh
    88%
    Current Battery Capacity: 4068 mAh
    Original Battery Capacity: 4100 mAh
    99%
    Additional info:
    Battery-Loadcycles : 12
    Age of your Mac: 5 months
    Charger connected: No
    Battery is charging: No
    I am just concerned that my battery current capacity decreased to 99% after just 12 load cycles. Why is that? Some people tell that they have a 100% even after using it for a long time and other than that does anyone have any idea why is the age being shown as 5 months when I have only used it for 2 weeks.
    I'm really confused.
    Another suggestion that I want is that in Pakistan, we are having major electricity load shedding so I can't keep it on AC power most of the time so if my computer is shut-down and being charged. If the electricity goes and when it comes back and it starts charging to the point from where it left, will that waste the load-cycle or will it continue to charge it from there without wasting cycle? Does that affect the battery life? (Assuming that the computer is shut-down while being charged)
    Last thing, should I use it mostly on AC power or is it better to charge it and then drain the battery and then charge it and then use. Till how much percent should I keep using on the battery power and then connect the Magsafe connector?
    Please help people
    I'd highly appreciate if you could answer my questions.
    Thank you.

    I was told that it is best to keep it plugged in and connected to the charger when you can, but if you are not able to do that then just use battery power. I just know you don't want too many cycles, which means you don't want to drain the battery completely then fully recharge it. You should calibrate the battery, which is pretty much just draining battery then recharging it, every couple of months if you keep it plugged into the charger and don't use just the battery often.

  • Confused about the meaning of  Time Quota Types

    I am learning SAP-HCM on IDES 6.0. I am confused about the meaning of Time Quota Type. I have gone thru the SAP documentation, but still not clear about it. Please help me with a few examples. How is it different from Absence Type?

    Hi Gopal ,
    Absences are very generic ones that we create which needs to be reflected in IT2001 and dedcution can happen.
    Absence Quotas are the limited entitlement that is fixed say ur eligible for 10 days sick leave so here this is a Quota for each year  and so becomes a Quota say Sick leave Quota =10 and will be seen in IT2006.
    Now an absence needs to be linked to this Quota for dedcution.
    An absence can be or may not be linked to a Quota.This depends on business Requirement.
    Let me know if u have further Questions.
    Thanks
    Swati

  • Confused about the 'cpu fsb clock frequency' setting, etc., in cell in bios

    just got a new k8n neo2-f nforce3 board with an a64 3500+ venice chip.  It is properly recognized in the bios and windows as an a64 3500+ at 2.2ghz, but I'm confused about the cell menu settings in the bios. I see a 'cpu fsb clock frequency' which was automatically set at 200mhz, but the fsb runs at 1Ghz (1000mhz), so what is the 'fsb clock frequency' if not equal to the cpu fsb?  Is 200 the correct setting for that?  Should I need to change any of the other settings in here?  I wonder, because my 3dmark03 score only went up 200 points from the same system with a AthlonXP 2500+ chip and kt4avl mobo, which seems like a low increase to me.....

    I would set that to Manual in BIOS, so that you can incremently increase the CPU speed without causing a sudden crash. Each system is different and operates within the specs of not only the CPU, but system memory and PCI-E add-ins as well. Your video card is the primary driver behgind your 3DMark scores...but you haven't listed that?!

  • Oracle designer 6i. Info about the current schema. Can't get tablespace inf

    Oracle designer 6i. I am running sql against the views to get info about the current schema.
    I can't get the tablespace names for the tables used in the latest version of a schema.
    eg the below sql return far too many rows.
    select distinct (lower(ti.GLOBAL_SYNONYM_NAME)||'*'||ts.name )
    from
    ci_application_systems app,
    ci_table_implementations ti,
    ci_tablespaces ts,
    ci_storage_definitions sd
    ,sdd_folder_members mem      
    ,ci_table_definitions td
    where
         app.OWNING_USER = '$OWNER' and
         app.NAME = '$APP_NAME''' and
    app.ivid = (select MAX(ivid) from ci_application_systems app2 where app2.name = '$APP_NAME'') and
    mem.PARENT_IVID = app.IVID and
    mem.MEMBER_OBJECT = td.ID
    and ti.GLOBAL_SYNONYM_NAME IS NOT NULL
         and ti.STORAGE_DEFINITION_REFERENCE = ts.STORAGE_DEFINITION_REFERENCE
    and ts.STORAGE_DEFINITION_REFERENCE = sd.ID

    Hi Neil,
    Thanks for your suggestion. I thought I tried all combinations of database, catalog and schema names and all different orders to connect, associate the connection and generate entities, but it seems I did not try this one. I did exactly what you suggest, except for the fact that I connected to the database before associating the connection to the project.
    It partially works now. I can generate Entities. Once I have generated an entity, all generated private member variables become red underlined, because table "null" for columns "xyz" could not be resolved. And the drop down box for columns in the JPA Details pane still doesn't get populated. The latter can be fixed by selecting the proper schema for the entity, which results in a @Table(schema="xyz") annotation. However, I expected this to be done automatically when the Entity was generated.
    The error about not being able to resolve the columns still exists. I tried to add a @Column(name="ASDF") annotation (because the columns names are all capital, while the member variables are lowercase), but that doesn't resolve the problem.
    I hope this gives you a clue to solve the problem!
    Bart

  • So confused about the size.... how exactly should i set them?

    i've written codes like:
    JFrame fr = new JFrame ("FR");
    JTabbedPane tp = new JTabbedPane();
    JPanel pa = new JPanel();
    JTextArea ta = new JTextArea;
    fr.add(tp.add(pa.add(ta)));
    Questions:
    1. How do I set the SIZE (dimension) of the GUI (the whole thing)
    2. How do I set the size of the TextArea
    I was thinking:
    setSize = set the default size of a panel/compent
    setMaximumSize = set the maxium area of that panel/compent (that'll allow you to drag to )
    setMinimumSzie = set the smallest window/pan/comp that you can drag to
    i tried fr.setSize or whatever... nothing just work.....!!
    Sorry... im really a beginner and i don't know where can I have a good read about all these Java.awt objects... JPanel/Frame/tabbedPanel/TextArea/button/watever.... sooo many and so easy to be confused....
    sorry i about the poor english... hope someone can help me out....
    thanks!

    Some helpful resources in the tutorial:
    Trail: Creating a GUI with JFC/Swing
    1 - Lesson: Using Swing Components
    a) - A Visual Index to the Swing Components
    b) - Using Top-Level Containers
    2 - Lesson: Laying Out Components Within a Container
    For the JFrame or other top-level container we use the "setSize" method.
    For JTextArea the api recommends we set the rows and columns to provide size information for the parent layout manager. For example - "new JTextArea(6, 18)"
    Some layout managers, such as FlowLayout and GridBagLayout will use the preferredSize for sizing components so you can use the "setPreferredSize" method (in Swing and in j2se 1.5+ AWT).

  • Confuse about the injecting entity in EJB 3.0?

    Hi all,
    I have an customersBean which is inherit from customersRemote and my problem is i' am little confuse about injecting the entity(customer).
    Where can you apply the EntityManagerFactory is it outside on EJB or Inside the EJB? means outside EJB is use the web application or java application. i have and example.
    this is inside on EJB...............
    public class CustomersBean implements com.savingsaccount.session.CustomersRemote {
    @PersistenceContext(unitName="SavingAccounts")
    EntityManagerFactory emf;
    EntityManager em;
    /** Creates a new instance of CustomersBean */
    public CustomersBean() {
    public void create(int id, String name, String address, String telno, String mobileno)
    try{
    //This is the entity.
    Customer _customer = new Customer();
    _customer.setId(id);
    _customer.setName(name.toString());
    _customer.setAddress(address.toString());
    _customer.setTelno(telno.toString());
    _customer.setMobileno(mobileno.toString());
    em = emf.createEntityManager();
    em.persist(_customer);
    emf.close();
    }catch(Exception ex){
    throw new EJBException(ex.toString());
    in web application, i'm using the @EJB in customer servlets.
    public class CustomerProcessServlet extends HttpServlet {
    @EJB
    private CustomersRemote customerBean;
    blah blah inject directly coming request field from jsp.
    }

    Hi all,
    I have an customersBean which is inherit from customersRemote and my problem is i' am little confuse about injecting the entity(customer).
    Where can you apply the EntityManagerFactory is it outside on EJB or Inside the EJB? means outside EJB is use the web application or java application. i have and example.
    this is inside on EJB...............
    public class CustomersBean implements com.savingsaccount.session.CustomersRemote {
    @PersistenceContext(unitName="SavingAccounts")
    EntityManagerFactory emf;
    EntityManager em;
    /** Creates a new instance of CustomersBean */
    public CustomersBean() {
    public void create(int id, String name, String address, String telno, String mobileno)
    try{
    //This is the entity.
    Customer _customer = new Customer();
    _customer.setId(id);
    _customer.setName(name.toString());
    _customer.setAddress(address.toString());
    _customer.setTelno(telno.toString());
    _customer.setMobileno(mobileno.toString());
    em = emf.createEntityManager();
    em.persist(_customer);
    emf.close();
    }catch(Exception ex){
    throw new EJBException(ex.toString());
    in web application, i'm using the @EJB in customer servlets.
    public class CustomerProcessServlet extends HttpServlet {
    @EJB
    private CustomersRemote customerBean;
    blah blah inject directly coming request field from jsp.
    }

  • Confused about the use of TONE and AUTO buttons

    After moving an image from Library module to Develop moddule (in LR4) , I open the basic panel.  In the basic panel, I see two text buttons: TONE and AUTO.  The AUTO button seems to be the default setting. I could re-adjusst the tones  as it requires.  I have no problem with the ATTO button.
    When I press the AUTO button, the TONE button is activated.  Then, colors and tones changed immediately.    When I move one of the tonal sliders (e.g., Exposrure), it activates the AUTO button.  I thought that the TONE button was intended to use for manual tonal change. I am  confused.  What is the TONE button for?

    hummer,
    Tone isn't a button, it's just a label.
    When you push the Auto button, it becomes de-activated because the tone sliders have been moved to where Auto thinks they ought to be. When you then move one of the sliders, the button becomes activated again because the sliders are no longer where Auto wants them, and you can push it again to take the sliders back to where it put them the first time.
    Hal

  • Confused about the Business Component Developer Certification

    Excuse me, I´m confused...
    How many certifications are about the Business Component Certification? Three??
    I thought there was just one, the Business Component Developer, which is the 1Z0-860 code...
    but I also have seen these:
    Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam - 1Z0-895
    Java EE 6 Java Persistence API Developer Certified Expert Exam - 1Z0-898
    and now I don´t know which one to study for...
    Are these better? Or just different? Or are the last ones just the new ones and the 1Z0-860 is obsolete?
    Thanks in advance!

    938334 wrote:
    Excuse me, I´m confused...
    How many certifications are about the Business Component Certification? Three??
    I thought there was just one, the Business Component Developer, which is the 1Z0-860 code...
    but I also have seen these:
    Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam - 1Z0-895
    Java EE 6 Java Persistence API Developer Certified Expert Exam - 1Z0-898
    and now I don´t know which one to study for...
    Are these better? Or just different? Or are the last ones just the new ones and the 1Z0-860 is obsolete?
    Thanks in advance!The basic answer to look at the question topics for each exam and and see what fits you. The question topcis should yield insight.
    Additionally the following exam is an OCP
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=&lang=&p_exam_id=1Z0_860
    The other two are OCE, as far as I can tell. Typically more of an area in depth, but OCE's can vary.
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=&lang=&p_exam_id=1Z0_895
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=&lang=&p_exam_id=1Z0_898
    I also notice the earlier exam is J2EE5; the later exams are J2EE6
    Hope this helps a little, but this java stuff is too hard for me and i must stackdump.

  • Confused about the role of ejbc in Weblogic 7

    Howdy All
    Here is my understanding of the role of ejbc in Weblogic 7:
    * Let's assume I have a JAR containing an EJB (let's say a stateless session bean).
    Let's call this the no-ejbc-JAR.
    1. I run the no-ejbc-JAR through ejbc to create the container-ejbc-JAR which can
    now be deployed in Weblogic.
    2. I can run ejbc against the no-ejbc-JAR to create a client-ejbc-JAR for use
    by clients wishing to access and use the EJB.
    Questions...
    MUST I run the no-ejbc-JAR through ejbc (to create the container-ejbc-JAR) before
    it can be deployed in Weblogic 7?
    If so, why?
    I can sort of see why this may be necessary from the containers perspective, although
    I would have thought the ejbc process could have been automatically applied by
    Weblogic to no-ejbc-JARs being deployed.
    But I am confused as to why ejbc would need to be used to create a client-ejbc-JAR.
    From the client's perspective, isn't it simply enough to have the no-ejbc-JAR
    (or a subset of the no-ejb-JAR) containing the EJB home and remote interfaces
    (along with any non-ejbc generated support classes)? For use by the client, why
    would it be necessary to run the no-ejbc-JAR through ejbc to create a client-ejbc-JAR?
    Or do I have an incorrect understanding of the role of ejbc?
    Thanks,
    Rob

    Hello Rob,
    I will try to clarify a couple of your concerns. First of all, if your EJB jar
    contains CMP 2.0 entity beans, the underlying JDBC implementations must be generated
    for your respective abstract classes of the entity beans. EJBC will generate this
    for you automatically. Also, the EJBC utility generates all of the other necessary
    server classes that WebLogic requires for deploying your EJBs (such as custom
    code for handling transactions, security, and other EJB services). When your EJB
    utilizes remote home/component interfaces, the utility will also generate all
    of the necessary client-side proxy and server-side byte code by running the RMI
    compiler on your EJBs. In addition to the above code generation that takes place,
    EJBC also checks all of your EJBs and makes sure that they are written according
    to the EJB specification. This way you will always be sure that your EJBs will
    be deployable on BEA WebLogic if EJBC returns with no error messages. You also
    asked if EJBC must be run manually before deploying the EJBs. If you run your
    application in exploded directory format, WebLogic will automatically invoke the
    EJBC utility prior to deploying your EJBs. Please refer to the links below for
    more information about the EJBC utility as well as deploying your application
    in exploded directory format:
    http://edocs.bea.com/wls/docs70/ejb/EJB_utilities.html#1075296
    http://edocs.bea.com/wls/docs70/programming/deploying.html#1125152
    Also, feel free to examine the code that EJBC generates to gain a better feel
    for what's happening behind the scenes. Also, please be aware that ejbc has been
    deprecated in WebLogic 8.1, in favor of the appc utility:
    http://edocs.bea.com/wls/docs81/ejb/EJB_tools.html#1096936
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Rob Young" <[email protected]> wrote:
    >
    Howdy All
    Here is my understanding of the role of ejbc in Weblogic 7:
    * Let's assume I have a JAR containing an EJB (let's say a stateless
    session bean).
    Let's call this the no-ejbc-JAR.
    1. I run the no-ejbc-JAR through ejbc to create the container-ejbc-JAR
    which can
    now be deployed in Weblogic.
    2. I can run ejbc against the no-ejbc-JAR to create a client-ejbc-JAR
    for use
    by clients wishing to access and use the EJB.
    Questions...
    MUST I run the no-ejbc-JAR through ejbc (to create the container-ejbc-JAR)
    before
    it can be deployed in Weblogic 7?
    If so, why?
    I can sort of see why this may be necessary from the containers perspective,
    although
    I would have thought the ejbc process could have been automatically applied
    by
    Weblogic to no-ejbc-JARs being deployed.
    But I am confused as to why ejbc would need to be used to create a client-ejbc-JAR.
    From the client's perspective, isn't it simply enough to have the no-ejbc-JAR
    (or a subset of the no-ejb-JAR) containing the EJB home and remote interfaces
    (along with any non-ejbc generated support classes)? For use by the client,
    why
    would it be necessary to run the no-ejbc-JAR through ejbc to create a
    client-ejbc-JAR?
    Or do I have an incorrect understanding of the role of ejbc?
    Thanks,
    Rob

Maybe you are looking for

  • Error Message in MDM Server Log

    Hi Experts, Can anybody tell me what could be the problems if we have the following scenario ? For an example: Our MDM Server is based on 5.5 SP06, MDM Server name is DFM and our repository name is MDMQ110. 1) Checking the Reports from this Repositor

  • Can an iMac be used as a monitor for a Mac Pro?

    Hi all, I'm getting nowhere looking in the search, so I'm hoping someone can clear something up for me: is it possible to use an iMac as a display for a Mac Pro? I am beginning to think I'd better get a Mac Pro, but I already have an iMac, for which

  • Cinema Display Preview Lost?

    I recently rebuilt my OS (10.4.8) and reinstalled FCP Suite (FCP 5.04 on a Dual 2.7gz G5). Everything appears to be fine, and nothing else has changed; except now I can't get FCP to recognize my second monitor as a display preview. It was working fin

  • Please dont erase music

    i posted a bulliten earlier about itunes not openeing and about updating and all...well it updated but to update it it's going to have to erase all of my data and it says my music will be erased to.....i payed for all of this...how can it erase it??

  • How to accout unplanned depreciation for group assets

    Friends, Unplanned depreciation is accounted for group assets few years ago.This is for special depreciation areas. Now i would like to reverse this amount as write up unpalnned depreciation,  but system is throwing eror message that: This  function