Sun GlassFish Mobility Platform 1.1 Installation Guide

Appendix A Configuring Oracle Databases and Database Users for Use with the Sun GlassFish Mobility Platform Software

Before you can install and use the Sun GlassFish Mobility Platform software, you must complete the following tasks:

Creating Databases

You need to manually create the gwdb and musicdb databases before you can select Oracle as your database during the Sun GlassFish Mobility Platform installation.

    To create the gwdb and musicdb databases, complete the following steps:

  1. Start the Database Configuration Assistant (DBCA) utility.

  2. On the Operations screen, select the Create a Database radio button and click Next.

  3. On the Database Template screen, select the General Purpose radio button and click Next.

  4. On the Database Identification screen, specify “gwdb” in the Global Database Name field and accept the default SID setting, which is also “gwdb”. Click Next.

  5. On the Management Options screen, accept the default settings and click Next.

  6. On the Database Credentials screen, select the Use the Same Password for All Accounts radio button. Type any password, such as gwdb, in the Password and Confirm Password fields, then click Next.

  7. On the Storage Options screen, accept the default settings, then click Next.

  8. On the Database File Locations screen, accept the default settings, then click Next.

  9. On the Recovery Configuration screen, accept the default settings, then click Next.

  10. On the Database Content screen, accept the default settings, then click Next.

  11. On the Initialization Parameters screen, select the Character Sets tab.

  12. Select the radio button labeled “Choose from the list of character sets”, then select UTF8 from the menu. Click Next.

  13. On the Database Storage screen, click Next.

  14. On the Creation Options screen, accept the default setting of Create Database, then click Finish.

  15. On the Confirmation screen, click OK.

    DBCA creates and starts the Oracle database instance and completes the database creation.

  16. Repeat steps 1–15 for the musicdb database, replacing “gwdb” with “musicdb” in step 4 and step 6.

Creating Database Users

You must create a database user for each database.

    To create a user for the musicdb database instance, complete the following steps.

  1. Log in as the Oracle user.

  2. In a terminal window, type the following command:


    setenv ORACLE_SID musicdb
    
  3. In a terminal window, type the following command:


    sqlplus / as sysdba
    

    After some messages are displayed, the SQL prompt is displayed.

  4. Type the following command to create musicdbuser:


    SQL> create user musicdbuser identified by musicdbpass;
    
  5. Type the following command to grant privileges to musicdbuser:


    SQL> grant connect, resource to musicdbuser;
    
  6. Type the following command to log out of sqlplus:


    SQL> quit
    

    To create a user for the gwdb database instance, complete the following steps.

  1. In a terminal window, type the following command:


    setenv ORACLE_SID gwdb
    
  2. In a terminal window, type the following command:


    sqlplus / as sysdba
    

    After some messages are displayed, the SQL prompt is displayed.

  3. Type the following command to create gwdbuser:


    SQL> create user gwdbuser identified by gwdbpass;
    
  4. Type the following command to grant privileges to settingsdbuser:


    SQL> grant connect, resource to gwdbuser;
    
  5. Type the following command to log out of sqlplus:


    SQL> quit
    

Starting the Oracle Listener

    The lsnrctl utility manages the Oracle listener processes, which enable database applications to connect to specific Oracle database instances through SQLPlus. Refer to your Oracle documentation on how to configure and setup the listener.ora and tnsname.ora configuration files for the lsnrctl utility.

  1. Log in as the Oracle user.

  2. Type the following command to enter the lsnrctl shell:


    $ lsnrctl
    
  3. Type the following command to start up the listener:


    LNSRCTL> startup
    
  4. Type the following command to see the status of the listener process:


    LNSRCTL> status
    
  5. Type the following command to exit the lsnrctl shell:


    LSNRCTL> exit
    

Connecting to the Sun GlassFish Mobility Platform Databases

    To connect to the gwdb and musicdb databases as the database as gwdbuser and musicdbuser database users, complete the following steps after you start the Oracle listener.

  1. Log in as the Oracle user.

  2. In a terminal window, type the following command to connect to the gwdb database:


    $ sqlplus gwdbuser/gwdbpass@gwdb
    
  3. Type the following command to connect to the musicdb database:


    $ sqlplus musicdbuser/musicdbpass@musicdb