Page tree

This topic walks you through the process of setting up an Oracle database to be used while installing BMC Server Automation (BSA) on Linux.

Warning

These tasks should be performed by a database administrator (DBA). Perform the steps in the exact order in which they are described.

This topic includes the following sections:

Introduction

This topic is intended for system and database administrators preparing to install BSA. The goal of this topic is to demonstrate how to use SQL *Plus to set up a database table space and database user with required permissions. You must have access to a database before running the BSA unified product installer or when manually installing BSA.

Note

For information about using the create_oracle_instance.sql script to create the database user and the BLADELOGIC and BLADELOGIC_INDEX tablespaces, see Setting up an Oracle database for BMC Server Automation.

What does this walkthrough show?

In this walk through, we primarily perform the following tasks:

  • Create a table space to hold the the BSA schema
  • Create a database user
  • Grant the database permissions required to create the BSA schema

When installing BSA using the unified product installer, the installation program automatically populates a database schema. The installer accesses that database using the connection information that is defined in this walkthrough.

If you are installing BSA and its database manually (rather than by using the unified product installer), you can use this procedure to set up a database and then later run the script that populates the database schema for BSA (as described in To manually populate the Oracle database schema (not required if you using the unified product installer).

What do I need to do before I get started?

For this walkthrough, you must have Oracle database and SQL *Plus installed on the Linux machine you want to use as a database server.

The BMC Server Automation product supports the following database types and versions:

Database typeSupported versions
Oracle

Enterprise Edition (EE) and Standard Edition (SE):

  • 11g R2
  • 11g R2 RAC
  • 12c
  • 12c RAC
  • (not recommended for production setup) Express Edition (XE)

Note

Microsoft SQL Server
  • 2008 (EE, SE)
  • 2008 Cluster (EE, SE)
  • 2008 R2 (EE, SE)
  • 2008 R2 Cluster (EE, SE)
  • 2012 (EE, SE)
  • 2012 Cluster (EE,SE)
  • 2012 R2 (EE, SE)
  • 2014 (EE, SE)

How to set up an Oracle database server and user

Log on to the Linux server you want to use as a database server and perform the following steps:

 StepCommands with examples
1

Use the command shown on the right to log on to SQL *Plus and connect to the Oracle database.

sqlplus /nolog

connect sys/<password>@<database_SID> as SYSDBA

 

Replace the following variables appropriate values, as described below:

  • <password> is the password of the sys account of your database instance
  • <database_SID> is the SID of your database instance running on the Linux machine.

You are now connected to your database instance using SQL *Plus.

sqlplus /nolog

connect sys/password@ORA121DB as SYSDBA

2

Create a table space, which can be used by the unified product installer to set up the BSA Schema.

CREATE TABLESPACE <Table_Space_Name> LOGGING

DATAFILE '<Path_To_Table_Space>'

SIZE 200M DEFAULT STORAGE (INITIAL 500M NEXT 100M MAXEXTENTS UNLIMITED PCTINCREASE 0);

 

Replace the following variables with appropriate values, as described below, as described below:

  • <Table_Space_Name> is the name of the table space you want to create.
  • <Path_To_Table_Space> is the path to the directory where you want to save the BSA schema file (<Table_Space_Name>.dbf)

CREATE TABLESPACE BLADELOGIC LOGGING

DATAFILE '/u01/app/oracle/oradata/bsa/BLADELOGIC.dbf'

SIZE 200M DEFAULT STORAGE (INITIAL 500M NEXT 100M MAXEXTENTS UNLIMITED PCTINCREASE 0);

3

Create a table space to index your BSA schema.

Run the command shown on the right in SQL *Plus.

CREATE TABLESPACE <Index_Table_Space_Name> LOGGING

DATAFILE '<Path_To_Index_Table_Space>'

SIZE 50M DEFAULT STORAGE ( INITIAL 500M NEXT 100M MAXEXTENTS UNLIMITED PCTINCREASE 0);

 

Replace the following variables with appropriate values, as described below:

  • <Index_Table_Space_Name> is the name of the table space for the BSA schema index you want to create
  • <Path_To_Index_Table_Space> is the path to the directory where you want to save the BSA Index schema file (<Index_Table_Space_Name>.ora)

CREATE TABLESPACE BLADELOGIC_INDEX LOGGING

DATAFILE '/u01/app/oracle/oradata/bsa/BLADELOGIC_INDEX.dbf'

SIZE 50M DEFAULT STORAGE ( INITIAL 500M NEXT 100M MAXEXTENTS UNLIMITED PCTINCREASE 0);

4

Create a database user and grant required permissions to the user.

Run the commands shown on the right in SQL *Plus, to create the database user and grant required permissions.

CREATE USER <DB_User>

PROFILE DEFAULT IDENTIFIED BY <DB_User_Password>

DEFAULT TABLESPACE <Table_Space_Name>

TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;

GRANT CONNECT TO <DB_User>;

GRANT RESOURCE TO <DB_User>;

GRANT CREATE VIEW TO <DB_User>;

GRANT SELECT ANY DICTIONARY TO <DB_User>;

GRANT EXECUTE ON dbms_lock TO <DB_User>;

GRANT UNLIMITED TABLESPACE TO <DB_User>;

GRANT EXECUTE ON DBMS_LOB TO <DB_User>;

GRANT EXECUTE ON DBMS_SQL TO <DB_User>;

GRANT CREATE TABLE TO <DB_User>;

GRANT CREATE SEQUENCE TO <DB_User>;

GRANT CREATE TRIGGER TO <DB_User>;

GRANT CREATE PROCEDURE TO <DB_User>;

GRANT UNLIMITED TABLESPACE TO <DB_User>;

Replace the following variables with appropriate values, as described below:

  • <DB_User> is the name of the user you want to create to access the BSA database
  • <DB_User_Password> is the password for the database user you want to create
  • <Table_Space_Name> is the name of the table space you want to create for the BSA schema

CREATE USER BLADELOGIC

PROFILE DEFAULT IDENTIFIED BY sa

DEFAULT TABLESPACE BLADELOGIC

TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;

GRANT CONNECT TO BLADELOGIC;

GRANT RESOURCE TO BLADELOGIC;

GRANT CREATE VIEW TO BLADELOGIC;

GRANT SELECT ANY DICTIONARY TO BLADELOGIC;

GRANT EXECUTE ON dbms_lock TO BLADELOGIC;

GRANT UNLIMITED TABLESPACE TO BLADELOGIC;

GRANT EXECUTE ON DBMS_LOB TO BLADELOGIC;

GRANT EXECUTE ON DBMS_SQL TO BLADELOGIC;

GRANT CREATE TABLE TO BLADELOGIC;

GRANT CREATE SEQUENCE TO BLADELOGIC;

GRANT CREATE TRIGGER TO BLADELOGIC;

GRANT CREATE PROCEDURE TO BLADELOGIC;

GRANT UNLIMITED TABLESPACE TO BLADELOGIC;

5

Alter the data files of the BSA schema table space and the Index table space to auto extend.

Run the command shown on the right in SQL *Plus.

ALTER DATABASE

DATAFILE '<Path_To_Table_Space>'

AUTOEXTEND ON NEXT 250M;

ALTER DATABASE

DATAFILE '<Path_To_Index_Table_Space>'

AUTOEXTEND ON NEXT 50M;

 

Replace the following variables with appropriate values, as described below:

  • <Path_To_Table_Space> is the path to the directory where you want to save the BSA schema, that is, <Table_Space_Name>.dbf
  • <Path_To_Index_Table_Space> is the path to the directory where you want to save the Index for the BSA schema, that is, <Index_Table_Space_Name>.dbf

ALTER DATABASE

DATAFILE '/u01/app/oracle/oradata/bsa/BLADELOGIC.dbf'

AUTOEXTEND ON NEXT 250M;

ALTER DATABASE

DATAFILE '/u01/app/oracle/oradata/bsa/BLADELOGIC_INDEX.dbf'

AUTOEXTEND ON NEXT 50M;

Wrapping it up

Congratulations. You have successfully set up an Oracle database server. You are now ready to run the unified product installer.

Where to go from here

Preparing for installation.