ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Create the Oracle Database on Linux for Data Loss Prevention

book

Article ID: 172345

calendar_today

Updated On:

Products

Data Loss Prevention Endpoint Prevent Data Loss Prevention Network Prevent for Email Data Loss Prevention for Mobile Data Loss Prevention Enforce Data Loss Prevention Network Protect

Issue/Introduction

This article assumes you have already installed Oracle 12c per one the Symantec Data Loss Prevention (DLP) Oracle 12c Implementation Guides:

Detailed instructions on how to install Oracle 12c on Windows can be found in the Symantec Data Loss Prevention Oracle 12c Enterprise Implemenation Guide.

Resolution

To create the Symantec Data Loss Prevention database on Linux systems

  1. Set the ORACLE_HOME and ORACLE_SID environment variables for your new installation. Open a command prompt as the Oracle user and enter:
    • export ORACLE_HOME=/opt/oracle/product/12.1.0.2/db_1
    • export ORACLE_SID=protect
    • * If you installed Oracle 12c into a different location, substitute the correct directory in this command.
    • Note: You may want to add these commands to your user profile configuration so that the ORACLE_HOME and ORACLE_SID environment variables are defined each time you log in. See your Linux documentation for details about setting environment variables.
  2. Navigate to /tmp/oracle_install where you extracted the 12.1.0.2_64_bit_Installation_Tools.tar.gz file.
  3. Copy the database template file (Oracle_12.1.0.2_Template_for_DLP_v14.0_64_bit_Lnx.dbt) to the $ORACLE_HOME/assistants/dbca/templates directory.
  4.  At the command prompt, execute the following command:
    • $ORACLE_HOME/bin/dbca -progressOnly -responseFile /home/oracle/oracle_install/responsefiles/Oracle_12.1.0.2_DBCA_Linux.rsp
  5. You are prompted to enter the SYS password.
  6. You are prompted to enter the SYSTEM password.
    • Follow these guidelines to create acceptable passwords
    • Passwords cannot contain more than 30 characters.
    • Passwords cannot contain double quotation marks, commas, or backslashes.
    • Avoid using the & character.
    • Passwords are case-sensitive by default. You can change the case sensitivity through an Oracle configuration setting.
    • If your password uses special characters other than _, #, or $, or if your password begins with a number, you must enclose the password in double quotes when you configure it.
  7. The Database Configuration Assistant displays a Confirmation window with a summary of the database configuration.
    • Click OK on the Confirmation window to create the database.
    • The database creation can take up to 20 minutes to complete. If the database creation process fails or hangs, check the Oracle Database Configuration
    • Assistant logs (located in the $ORACLE_HOME/cfgtoollogs/dbca/SID directory) for errors (for example, /opt/oracle/product/12.1.0.2/db_1/cfgtoollogs/dbca/protect).
  8. Click OK.

Create the TNS Listener

*Note: To use the commands referenced in this procedure, ensure that your working directory is $ORACLE_HOME/bin. If SQL*Plus does not work while following this procedure, set your $PATH variable to point to $ORACLE_HOME/bin.

  1. As the Oracle user, start the Oracle Net Configuration Assistant:
    • $ORACLE_HOME/bin/netca
  2. On the Welcome panel, select Listener configuration and click Next.
  3. On the Listener Configuration, Listener panel, select Add and click Next.
  4. On the Listener Configuration, Listener Name panel, enter a listener name and click Next.
    • *Note: Use the default listener name, LISTENER, unless you must use a different name.
  5. On the Listener Configuration, Select Protocols panel, select the TCP protocol and click Next.
  6. On the Listener Configuration, TCP/IP Protocol panel, select Use the standard port number of 1521 and click Next.
  7. On the Listener Configuration, More Listeners? panel, select No and click Next.
  8. On the Listener Configuration Done panel, click Next.
  9. Configure the Local Net Service Name in the Oracle Net Configuration Assistant.
  10. Log into the Oracle host computer as the Oracle user.
    • su – oracle
  11. Run the following command:
    • lsnrctl stop
  12. Open the following file in a text editor:
    • $ORACLE_HOME/network/admin/listener.ora
  13. Locate the following line:
    • (ADDRESS = (PROTOCOL = IPC)(KEY = <key_value>))
  14. Change key_value to PROTECT.
  15. Add the following line to the end of the file:
    • SECURE_REGISTER_LISTENER = (IPC)
  16. Save the file and exit the text editor.
  17.  Run the following command:
    • lsnrctl start
    • *Note: If you see a message informing you that the listener has started but there are no services, run the following sequence of commands:
    • lsnrctl stop,
    • shutdown, startup, lsnrctl start.
  18. Run the following commands to connect to the database using SQL*Plus:
    • sqlplus /nolog
    • conn sys/<password> as sysdba
  19. Run the following command:
    • ALTER SYSTEM SET local_listener = '(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PROTECT)))' SCOPE=both;
  20. Run the following command to register the listener:
    • ALTER SYSTEM REGISTER;
  21. Exit SQL Plus by running the following command:
    • Exit
  22. Run the following command to verify the change:
    • lsnrctl services
    • The command output should display a message similar to the following:
    • Services Summary...
    • Service "protect" has 1 instance(s).
    • Instance "protect", status READY, has 1 handler(s) for this service...
    • Handler(s):
    • "DEDICATED" established:0 refused:0 state:ready
    • LOCAL SERVER
    • The command completed successfully

Configure the local net service name

  1. If the Oracle Net Configuration Assistant is not already running, log in as the Oracle user and start it:
    • $ORACLE_HOME/bin/netca
  2. On the Welcome panel, select Local Net Service Name configuration and click Next.
  3. On the Net Service Name Configuration panel, select Add and click Next.
  4. On the Net Service Name Configuration, Service Name panel, enter "protect" in the Service Name field and click Next.
  5. On the Net Service Name Configuration, Select Protocols panel, select TCP and click Next.
  6. On the Net Service Name Configuration, TCP/IP Protocol panel:
    • Enter the IP address of the Oracle server computer in the Host name field.
    • Select Use the standard port number of 1521 (the default value).
    • Click Next.
  7. On the Net Service Name Configuration, Test panel, select No, do not test and click Next.
    • Do not test the service configuration, because the listener has not yet started.
  8. On the Net Service Name Configuration, Net Service Name panel, select accept the default name of "protect" and click Next.
  9. On the Net Service Name Configuration, Another Net Service Name? panel, select No and click Next.
  10. On the Net Service Name Configuration Done panel, select Next.
  11. Click Finish to exit the Oracle Net Configuration Assistant.

Verifying tnsnames.ora contents

*Before you create the required Oracle user accounts, verify that the tnsnames.ora file contains entries for the protect database that you created.

  1. Using a text editor, open the tnsnames.ora file, located in the $ORACLE_HOME/network/admin directory.
  2. Verify that the following lines are present in the file:
    • PROTECT =
    • (DESCRIPTION =
    • (ADDRESS_LIST =
    • (ADDRESS = (PROTOCOL = TCP)(HOST = ip_address)(PORT = port_number))
    • )
    • (CONNECT_DATA =
    • (SERVICE_NAME = protect)
    • )
    • )
    • *If these lines do not exist, add them to the file, replacing ip_address and port_number with the correct values for your system. 
    • *Note: Do not copy and paste information to the tnsnames.ora file, as it canintroduce hidden characters that cannot be parsed.
  3. Save the tnsnames.ora file and exit the text editor.

After you create the Symantec Data Loss Prevention database, verify that it was created correctly

  1. Open a command prompt as the Oracle user and start SQL*Plus:
    • $ORACLE_HOME/bin/sqlplus /nolog
  2. Log on as the SYS user:
    • SQL> connect sys/[email protected] as sysdba
    • *Where password represents the SYS password.
  3. Run the following query:
    • SQL> SELECT * FROM v$version;
  4. Make sure that the output from the query contains the following information, which identifies the software components as version 12.1.0.2.
    • The output information should read:
    • BANNER
    • --------------------------------------------------------------------------------
    • Oracle Database 12c Release 12.1.0.2.0 - 64bit Production
    • PL/SQL Release 12.1.0.2.0 - Production
    • CORE 12.1.0.2.0 Production
    • TNS for Linux: Version 12.1.0.2.0 - Production
    • NLSRTL Version 12.1.0.2.0 – Production
  5. Exit SQL*Plus:
  6. SQL> exit

Perform the following procedure to create an Oracle user account and name it “protect”

  1. Copy the oracle_create_user.sql file from /tmp/oracle_install to a local directory.
  2. Open a command prompt as the Oracle user and go to the directory where you copied the oracle_create_user.sql file.
  3. Start SQL*Plus:
    • sqlplus /nolog
  4. Run the oracle_create_user.sql script:
    • SQL> @oracle_create_user.sql
  5. At the Please enter the password for sys user prompt, enter the password for the SYS user.
  6. At the Please enter sid prompt, enter protect.
  7. At the Please enter required username to be created prompt, enter protect.
  8. At the Please enter a password for the new username prompt, enter a new password.
    • Follow these guidelines to create acceptable passwords:
    • Passwords cannot contain more than 30 characters.
    • Passwords cannot contain double quotation marks, commas, or backslashes.
    • Avoid using the & character.
    • Passwords are case-sensitive by default. You can change the case sensitivity through an Oracle configuration setting.
    • If your password uses special characters other than _, #, or $, or if your password begins with a number, you must enclose the password in double quotes when you configure it.
    • Store the password in a secure location for future use. You will need this password to install Symantec Data Loss Prevention. 
    • If you need to change the password after you install Symantec Data Loss Prevention, see the Symantec Data Loss Prevention Administration Guide for instructions.

To configure automatic startup and shutdown of the database, follow this procedure

  1. Switch to the root xterm window.
  2. Go to the oracle_install directory.
    • cd /tmp/oracle_install
  3. Run the oracle_post.sh script from the oracle_install directory.
    • ./scripts/oracle_post.sh
  4. Verify that the script completed successfully by checking if the very last line ofthe output is:
    • dbora 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    • *You may see errors before the last line (for example, cannot access /var/log/dbora). You can ignore these errors.