Go to primary content
Oracle Agile Engineering Data Management Server Installation Guide on Windows and UNIX
Release e6.2.1.0
E69109-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

9 Post-Installation Modifications for the Oracle Database

9.1 Creating the Database


Note:

This chapter describes the manual creation of the Database schema. Keep in mind that on UNIX, only the manual creation can be performed. For the automatic creation on a Windows operating system see chapter Installation with the Agile e6 Installer.

Before creating the database instance, the database listener needs to be configured.

9.1.1 Configure the Listener

  1. Start the Oracle Net Configuration Assistant.

    • Windows

      1. Start the Oracle Net Configuration Assistant.

      2. Click Start > All Programs > Oracle - OraDb12c_home1 > Configuration and Migration Tools > Net Configuration Assistant.

    • UNIX

      1. Open a new terminal and start the Oracle Net Services Configuration Tool with the following command:

      $ORACLE_HOME/bin/netca
      

    The Oracle Net configuration Assistant - Welcome screen is opened.

    Surrounding text describes ch9_1.png.
  2. Select the Listener configuration and click Next.

    The Oracle Net configuration Assistant - Listener Configuration, Listener screen is opened.

    Surrounding text describes ch9_2.png.
  3. Select Add and click Next.

    The Oracle Net configuration Assistant - Listener Configuration, Listener Name screen is opened.

    Surrounding text describes ch9_3.png.
  4. Enter the Listener name to be created and click Next.

    If you created the Oracle home user with non-Windows-Built-In Account while installing oracle database server, the password for the Oracle home user is here required.

  5. Click Next.

    The Oracle Net configuration Assistant - Listener Configuration, Select Protocols screen is opened.

    Surrounding text describes ch9_4.png.
  6. Make sure TCP is listed in the Selected Protocols list and click Next.

    TCP is the default selection.

    The Oracle Net configuration Assistant - Listener Configuration, TCP/IP Protocol screen is opened.

    Surrounding text describes ch9_5.png.
  7. Select the standard port number of 1521.

    You may choose any port number that has not been used yet.

  8. Click Next.

    The Oracle Net configuration Assistant - Listener Configuration, More Listeners? screen is opened.

    Surrounding text describes ch9_6.png.
  9. Select No and click Next.

    The Oracle Net configuration Assistant - Listener Configuration Done screen is opened.

    Surrounding text describes net-7.png.
  10. Click Next and finish to close the Listener Configuration.

    Your database listener is now created and started.

9.1.2 Configuring the Database Net Service Name

This section describes the manual configuration of the Database Net Service Name.


Note:

The following instruction is only necessary for the database!


Note:

On UNIX, only the manual configuration can be performed. For the configuration on a Windows operating system see chapter Installation with the Agile e6 Installer.

  1. Start the Oracle Net Services Configuration Assistant.

    • Windows

      Click Start > All Programs > Oracle - OraClient12Home1_32bit > Configuration and Migration Tools > Net Configuration Assistant.

    • UNIX

      Enter the command: $ORACLE_HOME/bin/netca

    The Welcome to the Oracle Net Configuration Assistant screen is opened.

    Surrounding text describes netca-1.png.
  2. Select the Local Net Service Name configuration and click Next.

    Surrounding text describes netca-2.png.
  3. Select Add and click Next.

    Surrounding text describes netca-3.png.
  4. Enter the Service Name.

    This is the global database name you provided by the database creation. In the example it is plm62.example.com.

  5. Click Next.

    Surrounding text describes netca-4.png.
  6. Select the TCP protocol and click Next.

    Surrounding text describes netca-5.png.
  7. Enter the fully qualified host name - where the Oracle database is located and click Next.

    Surrounding text describes netca-6.png.
  8. Select No, do not test and click Next.

    Surrounding text describes netca-7.png.
  9. Enter the Net Service Name and click Next.

    This is the same name as entered above.

    Surrounding text describes netca-8.png.
  10. Select No and click Next.

    Surrounding text describes netca-9.png.

    The Net service name configuration is completed.

  11. Click Next.

  12. Click Finish to quit.

9.1.3 Create the Database

The database is created by using the Database Configuration Assistant (DBCA) templates. DBCA templates include database options, initialization parameters, and storage information for data files, table spaces, control files and redo logs.

Five different templates are predefined to meet different requirements according to the purpose, size, and number of users of the Agile e6.2.1.0 database installation.

For additional information on significant database parameters and settings of each template, refer to the Hardware Sizing Guide for Agile e6.2.1.0.


Note:

In all the examples given in this chapter, the name of the Oracle Home for Oracle Database installation is OraDb12c_home1. You may use a different name in your installation.

  1. Refer to the downloaded media pack - Oracle Agile Engineering Data Management Application (Release e6.2.1.0).

    • Windows

      1. All the templates are in the db_addon\axalant\db_util\oracle\windows\templates directory.

      2. Copy the required DBCA template file (e.g. plm_prod_medium.dbt) to the %ORACLE_HOME%\assistants\dbca\templates directory.

      3. Start the Oracle Database Configuration Assistant from the Windows Start menu.

      Search for application Database Configuration Assistant and start it.

    • UNIX

      1. All the templates are in the addon/db/unix/templates directory.

      2. Copy the required DBCA template file (e.g. plm_prod_medium.dbt) to the $ORACLE_HOME/assistants/dbca/templates directory.

      3. Start the Oracle Database Configuration Assistant

      $ORACLE_HOME/bin/dbca
      

      The Database Configuration Assistant: Welcome screen is opened.

    Surrounding text describes dbca-1.png.
  2. Select Create a Database and click Next.

    The Database Configuration Assistant - Creation Mode screen is opened.

    Surrounding text describes dbca-2.png.
  3. Select Advanced Mode and click Next.

    The Database Configuration Assistant - Database Template screen is opened.

    Surrounding text describes dbca-3.png.

    The template that you have chosen and copied is available in this list.

  4. Select the template you want to use and click Next.

    The Database Configuration Assistant - Database Identification screen is opened.

    Surrounding text describes dbca-4.png.
  5. Enter the Global database name and database SID.

    The default SID is plm62. It is recommended to set the global database name to SID.<domain name>; for example, plm62.example.com. But it can also be left with the same name as the database SID.


    Note:

    Do not leave this field blank.

  6. Click Next.

    The Database Configuration Assistant - Management Options screen is opened.

    Surrounding text describes dbca-5.png.

    With Oracle Database 12c the Enterprise Manager (EM) Database Express can be installed in two ways:

    • EM Database Express

      Oracle Enterprise Manager Database Express is a web-based database management tool that is built inside each Oracle database. All the SQL commands you normally type have been translated into a graphical point-and-click interface. EM Database Express even supports RAC database management.

      EM Express is not a direct replacement for DB Control. EM Express is built inside the database server and there are limitations as to what it can do. EM Express is also focused on providing performance management and monitoring functionality, and is not meant to be an all around database administration tool.

    • EM Cloud Control

      Cloud Control provides Web-based management tools for managing individual database instances, as well as central management tools for managing your entire Oracle environment, including multiple databases, hosts, application servers, and other components of your network. It can even be used to manage non-Oracle databases.

      For more information about centrally managing the databases, application servers, hosts, and other components of your network, see Oracle Enterprise Manager Administration Guide.

  7. Select the option Configure Enterprise Manager (EM) Database Express.

    The Oracle Configuration Assistant - Database Credentials screen is opened.

    Surrounding text describes dbca-6.png.
  8. Enter passwords for SYS, SYSTEM and click Next.


    Note:

    It is highly recommended to use different passwords for these accounts.


    Note:

    Each password needs to meet the Oracle recommended standards. A password should have a minimum of 8 characters. In addition, the password must contain at least one upper and one lower case character, and one digit.


    Note:

    If your Oracle home user is not the Windows built-in account, please use the password of the Oracle home user for the Windows service configuration.

    The Database Configuration Assistant - Network Configuration screen is opened.

    Surrounding text describes dbca-7.png.
  9. Now you can see the listener you created and configured before in the list with the status up. Select it and click Next.

    The Database Configuration Assistant - Storage Locations screen is opened.

    Surrounding text describes dbca-8.png.
  10. Select Use Database File Locations from Template.

  11. Click the File Location Variables… button.

    The File Location Variables screen is opened.

    Surrounding text describes dbca-9.png.
  12. Enter the value for the variables.

    The values that you have to provide are the directories created, as described in chapter Oracle Database Prerequisites (example E:, F:, H:). DBCA will create the subdirectory plm62 in the directories where the database data files will be created.


    Note:

    If missing, please add File Creation Variables as described below.

    Example: Depending on the selected template, the following table provides information on predefined file destination variables.

    Variable Description
    ORADATA1 Directory for data files of tablespaces EDB, EDB_LOB, EDB_TMPIDX
    ORADATA2 Directory for data files of tablespaces EDB_IDX, EDB_TMP
    ORADATA3 Directory for data files of temporary tablespace TEMP
    ORADATA4 Directory for data files of undo tablespace
    ORADATA5 Directory for data files of tablespaces SYSTEM, TOOLS, USERS
    ORAARCH Directory for Archive log files
    REDO1 Directory for redo log files
    REDO2 Directory for redo log files

    The following listing gives values that you can set for the variables when you have different number of disks:

    Number of Disks Contents
    1 There is only one directory - e.g. /data1)

    Disk1: ORADATA1, ORADATA2, ORADATA3, ORADATA4, ORADATA5, REDO1, REDO2, ORAARCH - all variables will be set to /disk1

    2 There are two directories - e.g. /data1, /data2

    Disk1: ORADATA1, ORADATA4, ORADATA5, REDO1 - they get the value of /data1

    Disk2: ORADATA2, ORADATA3, ORAARCH, REDO2 - they get the value of /data2

    3 Disk1: ORADATA1, ORADATA5

    Disk2: ORADATA2, ORADATA4, REDO1

    Disk3: ORADATA3, ORAARCH, REDO2

    4 Disk1: ORADATA1, REDO1

    Disk2: ORADATA2, REDO2

    Disk3: ORADATA3, ORAARCH

    Disk4: ORADATA4, ORADATA5

    5 Disk1: ORADATA1, REDO1

    Disk2: ORADATA2, ORAARCH

    Disk3: ORADATA3, ORADATA5

    Disk4: ORADATA4

    Disk5: REDO2

    6 Disk1: ORADATA1

    Disk2: ORADATA2, ORAARCH

    Disk3: ORADATA3

    Disk4: ORADATA4

    Disk5: ORADATA5, REDO1

    Disk6: REDO2

    7 Disk1: ORADATA1

    Disk2: ORADATA2

    Disk3: ORADATA3

    Disk4: ORADATA4

    Disk5: ORADATA5, ORAARCH

    Disk6: REDO1

    Disk7: REDO2

    8 Disk1: ORADATA1

    Disk2: ORADATA2

    Disk3: ORADATA3

    Disk4: ORADATA4

    Disk5: ORADATA5

    Disk6: ORAARCH

    Disk7: REDO1

    Disk8: REDO2


  13. Click OK.

  14. Deselect the option Specify Flash Recovery Area.

    Depending on your backup strategy and used template, archiving can be enabled.


    Note:

    For a productive database it is highly recommended to archive the database. To specify the destination of the archive directory, click the button Edit Archive Mode Parameters button (predefined by the variable ORAARCH).

    Surrounding text describes dbca-10.png.

    After editing this screen, click OK to return to the Storage Location screen.

  15. Click Next.

    The Database Configuration Assistant - Database Options screen is opened.

    Surrounding text describes dbca-11.png.

    This screen provides database features as well as the possibility to run custom scripts after the database creation.

    We do not recommend changing the settings provided by the template.


    Note:

    If you have selected Oracle Application Express for customer specific installation, you have to change the initialization parameter max_string_size to standard.

    After the initial creation of the database, the parameter needs to be changed back to extended.

    Please follow the guideline in the Oracle Database documentation


  16. Click Next.

    The next screen provides different database parameters. You can navigate to the setting of memory, character sets, database sizing, and connection mode. Usually all parameters are set by the selected template and you don't need to change them. Experienced users can modify some parameters, depending on the database size and number of users.

    For complete information on additional parameters, e.g. memory, refer to the Hardware Sizing guide for Agile e6.2.1.0.

    Surrounding text describes dbca-12.png.
  17. Click All Initialization Parameters button to review all server parameters.

    The All Initialization Parameters screen is opened.

    Click Show Advanced Parameters.

    Surrounding text describes dbca-12-1.png.

    Note:

    Ensure that the value of memory_max_target is greater than the value of memory_target.

  18. Click Close and then click Next.

    The Database Configuration Assistant - Creation Options screen is opened.

    Surrounding text describes dbca-13.png.
  19. Click the Customize Storage Locations button to review the storage parameters for database creation.

    The Customize Storage screen is opened.

    Surrounding text describes dbca-14.png.
  20. Click Close to return to the Database Configuration Assistant - Creation Options screen.

  21. Select Create Database, Save as a Database Template, and Generate Database Creation Scripts.

  22. Click Next.

    The Database Configuration Assistant - Summary screen is opened.

    Surrounding text describes dbca-15.png.

    A summary of the database parameters is shown.

  23. Click Finish.

    The database creation process is started.

  24. When the database creation is done, the summary screen is shown.

    The EM database Express URL is listed for your access.

    Click Close to finish the process.

    Surrounding text describes dbca-16.png.
  25. Test the database connection with the following command:

    sqlplus system@plm62/<SYSTEM password>
    

9.1.4 Configuring tnsnames.ora and sqlnet.ora

  1. Start the Oracle Net Manager.

    • Windows:

      Click Start > All Programs > Oracle - OraDb12c_home1 > Configuration and Migration Tools > Net Manager.

    • UNIX

      Enter the command: $ORACLE_HOME/bin/netmgr

  2. Expand the view for Local and click on Profile.

    Surrounding text describes netm_1.png.
  3. On the tab Methods, enter your domain name in the field Default Domain.

  4. In the main menu, click File > Save Network Configuration.

  5. Click File > Exit.

    The sqlnet.ora and tnsnames.ora under $ORACLE_HOME/network/admin/ will be created or updated.

9.2 Modifying the Oracle Database


Note:

This section describes the manual modification of the Database. Keep in mind that on UNIX only the manual modification can be performed.

9.2.1 Create Directories for the Oracle Data Pump Utility

  1. Create a directory which will be used for the Oracle Data Pump Export/Import Utility with two subdirectories - system and user (for instance D:\ora_dmp\system; D:\ora_dmp\user).

  2. Open an SQLplus session and connect as user 'system'.

    sqlplus system/<system password>

  3. Run the script ddl_pump_dir.sql.

    It is located in the addon/db/sql directory of the downloaded Oracle Agile Engineering Data Management Application (Release e6.2.1.0) package.

    SQL>@<full path to the file ddl_pump_dir.sql>

  4. Enter the path to the main directory created under step 1 (for instance d:\ora_dmp).

    The script will create two directory objects - one for system users, and one for normal users and will give rights for the second directory to user PLM.

9.2.2 Create a Database User and Role

You will need to create the Agile e6.2.1.0 database user and role and provide the necessary privileges and quotas. You can do this by using the following commands, or by using the Oracle Enterprise Manager Database Control as described in the section below.

You can create AGILE_E_ROLE role and plm schema also by executing the script cre_plm_usr.sql in the directory …/addon/db/sql.

SQL>@<full path to the file cre_plm_usr.sql>

Username (e.g. PLM) and password have to be provided.

9.2.2.1 Using SQL to Create a Role

  1. Check if the plm role exists.

    1. Open an SQLplus session

    2. Connect as SYS or SYSTEM.

    3. Execute the following command:

      select role from dba_roles where role='AGILE_E_ROLE';
      
  2. If string 'AGILE_E_ROLE' is returned, the role exists.

    If it exists, skip the role creation and continue with Using SQL to Create a User.

    Otherwise, the role has to be created.

  3. Use the SQL code below to create the role AGILE_E_ROLE:

    CREATE ROLE AGILE_E_ROLE;
    GRANT CONNECT TO AGILE_E_ROLE;
    GRANT CREATE TABLE TO AGILE_E_ROLE;
    GRANT CREATE VIEW TO AGILE_E_ROLE;
    GRANT CREATE SYNONYM TO AGILE_E_ROLE;
    GRANT CREATE DATABASE LINK TO AGILE_E_ROLE;
    GRANT CREATE SEQUENCE TO AGILE_E_ROLE;
    GRANT ALTER SESSION TO AGILE_E_ROLE;
    GRANT CREATE PROCEDURE TO AGILE_E_ROLE;
    GRANT CREATE TRIGGER TO AGILE_E_ROLE;
    GRANT ALL ON DIRECTORY ORA_DMP TO AGILE_E_ROLE;
    

9.2.2.2 Using SQL to Create a User

  1. Use the SQL code below to create the plm schema (e.g. PLM):

    CREATE USER PLM
    IDENTIFIED BY <PASSWORD>
    DEFAULT TABLESPACE "EDB"
    TEMPORARY TABLESPACE "TEMP"
    PROFILE DEFAULT
    QUOTA UNLIMITED ON "EDB"
    QUOTA UNLIMITED ON "EDB_IDX"
    QUOTA UNLIMITED ON "EDB_TMP"
    QUOTA UNLIMITED ON "EDB_TMPIDX"
    QUOTA UNLIMITED ON "EDB_LOB"
    ACCOUNT UNLOCK;
    GRANT "AGILE_E_ROLE" TO PLM;
    ALTER USER PLM DEFAULT ROLE AGILE_E_ROLE;
    

9.2.2.3 Using Enterprise Manager Database Express to Create a User

How to find the port on which EM Express is configured:

  • When dbca completes, it indicates the port on which EM Express is configured.

  • If that information is no longer available, there are two ways to find the HTTP/HTTPS port for EM Express:

    > lsnrctl status | grep HTTP (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=xxx.us.oracle.com)(PORT=5500))(Security=(my_wallet directory=/u01/oracle/app/oracle/admin/plm62/xdb_wallet))(Presentation=HTTP)(Session=RAW))
    

    or from SQL*Plus:

    SQL> select dbms_xdb.getHttpPort() from dual; 
    GETHTTPPORT 
    ----------- 
    8080 
    SQL> select dbms_xdb_config.getHttpsPort() from dual; 
    GETHTTPSPORT 
    ------------ 
    5500
    

You can access the Oracle Enterprise Manager Database Express as follows:

  1. Open your browser and enter the following URL:

    https://<hostname>:<port>/em

  2. Enter your user credentials and click Login.

  3. In the top menu bar, click Security and then select Users.

    Enterpris Manager user list
  4. Click Create User on the user list.

  5. Insert a user name and password in the pop-up dialog.

    EM create user pop-up dialot
  6. Assign default and temporary table space for this user.

  7. From the list with Available Roles, select the role AGILE_E_ROLE.

    The role AGILE_E_ROLE was created in the previous section("Create a Database User and Role").

    EM Create User select role
  8. Click Move.

    The role is moved to the Selected Roles list.

    Click OK.

  9. Click the newly created user and open the tab Quotas.

    EM Create User Quotas tab
  10. Assign unlimited quota to EDB, EDB_IDX, EDB_LOB, EDB_TMP, and EDB_TMPIDX.

    Surrounding text describes express-6.png.

    The user creation is finished.

9.2.3 Import the Database Dump

Import the Agile e6.2.1.0 dump, using the following commands, and then check the log file for errors.

  • Windows

    Make sure that the variable NLS_LANG is set to AMERICAN_ AMERICA.AL32UTF8.

    Check the registry for the value of the variable NLS_LANG - HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<12c installation>

  • UNIX

    Make sure that the correct value is set for the environment variable NLS_LANG (value from the file csh_ORA12.1.0 - AMERICAN_AMERICA.WE8MSWIN1252).

  1. Start the import.

    imp username/pass@plm61 file=plm62.dmp log=plm61.log buffer=500000 commit=y statistics=none full=y


    Note:

    username/ pass are the name and the password of the user you created in the database.

commit=y Rollback segments cannot get too small
statistics=n No statistics will be created
buffer=500000 Necessary for lobs, better performance
full=y Imports full dump, even if the dump was exported by different users


Note:

You can import only your own e6 dmp files which were created in a database in which the initialization parameter max_string_size =standard. Be aware that the e6 database has set this parameter to extended. Please use data pump utilities (expdp, impdp) instead. For more details, see Oracle 12c Database documentation.

All standard dmp files delivered on Oracle edelivery for e6.2.1.0 can be imported with imp/exp utility.


9.2.4 Compile All Invalid Objects in Schema PLM

After importing the Agile e6.2.1.0 dump, some objects might be invalid. This can be verified by the following way:

  1. Open an SQLplus session and connect as 'sys' - as sysdba.

    sqlplus sys/<sys password> as sysdba
    SQL> select count(*) from dba_objects where status <> 'VALID' and owner='PLM';
    

    If the returned message is 'no rows selected', then you have no invalid objects.

  2. 2. Otherwise, execute the script utlrp.sql.

    The script will compile all invalid objects in the database.

    SQL> @?/rdbms/admin/utlrp.sql
    
  3. Verify that there are no invalid objects:

    SQL> select count(*) from dba_objects where status <> 'VALID' and owner='PLM';
    

9.2.5 Gather Statistics

In Oracle 12c, the default value for the OPTIMIZER_MODE initialization parameter is ALL_ROWS, which means that a cost-based approach will be used for all SQL statements. Oracle highly recommends creating statistics in order to avoid performance losses. This should be done after the dump import and has to be repeated periodically.

  1. Calculate statistics of all tables and indexes in db schema PLM:

    SQL> EXECUTE DBMS_STATS.GATHER_SCHEMA_STATS('PLM',CASCADE =>true);
    

    Note:

    Statistic information can be viewed, e.g. in user_tables and user_indexes. These views provide information about average width of the row and number of rows.

    For more information about statistics management please refer to the Oracle Database manuals.

9.2.6 Problems During Database Creation

When having problems with the database creation, perform the following checks:

  • Database creation logs: ${ORACLE_BASE}/cfgtools/dbca/<db name>

  • Instance Parameter file: ${ORACLE_BASE}/admin/<db name>/pfile/init.ora

  • Instance SPFILE: ${ORACLE_HOME}/dbs/spfile<db name>.ora

  • Database Diagnostics: ${ORACLE_BASE}/diag/rdbms/<db name>/<db name>

  • Network configuration: ${ORACLE_HOME}/network/admin/*.ora