Walkthrough: Creating the TrueSight Server Automation Database for Oracle
This topic walks you through the process of setting up an Oracle database to be used while installing TrueSight Server Automation on Linux.
This topic includes the following sections:
Introduction
This topic is intended for system and database administrators preparing to install TrueSight Server Automation. You must have access to a database before running the BSA unified product installer or when manually installing TrueSight Server Automation.
You have two distinct choices. Use the script to create the tablespaces and user, or create them manually, but do not combine them.
- You can use the create_oracle_instance.sql to create the database user (typically BLADELOGIC) and the BLADELOGIC and BLADELOGIC_INDEX tablespaces and grant privileges to the database user. For more information, see .
- You can manually set up a database table spaces and database user with the required permissions. Your Oracle environment might require special permissions. You can modify these steps accordingly. For more information, see .
What does this walkthrough show?
In this walk through, we primarily perform the following tasks:
- Create a table space to hold the the TrueSight Server Automation schema
- Create a database user
- Grant the database permissions required to create the TrueSight Server Automation schema
When installing TrueSight Server Automation 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 TrueSight Server Automation 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 TrueSight Server Automation (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. Your Oracle environment must be 100% clean, with no existing TrueSight Server Automation installations.
How to use a script to create the Oracle tablespaces and user
Run the create_oracle_instance.sql script if you do not want to manually create the tablespaces and user. BMC recommends this approach because it is less prone to error.
Log on to the Linux server you want to use as a database server and perform the following steps:
| Step | Commands with examples |
---|---|---|
1 | Create a bsa directory with the correct permissions to store the table spaces. | mkdir -p /u01/app/oracle/oradata/bsa chown oracle:dba /u01/app/oracle/oradata/bsa |
2 | Copy the create_oracle_instance.sql script into the directory that you created for the tablespaces. |
|
3 | Change directory to the new bsa directory. where you copied the create_oracle_instance.sql script. | Change directory to the new bsa directory where you copied the create_oracle_instance.sql script. cd /u01/app/oracle/oradata/bsa |
4 | Modify the create_oracle_instance.sql script and change the path for data files to match the directory you created for the tablespace for the new schema. Modify the BLADELOGIC user password as needed. | Modify both the CREATE TABLESPACE and ALTER DATABASE commands. You must change the path in four places. As an option, modify the user password, for example, from PROFILE DEFAULT IDENTIFIED BY sa (sa is the default) to PROFILE DEFAULT IDENTIFIED BY <password>. |
5 | (Optional) If required by your company policy, modify the tablespace privileges. | If required by your company policy, you can modify the create_oracle_instance.sql script to revoke the RESOURCE and UNLIMITED TABLE SPACE privileges, and replace them with more granular privileges.
|
6 | Use the command shown on the right to log on to SQL *Plus and connect to the Oracle database. | su - oracle sqlplus /nolog connect sys/<password>@<database_SID> as SYSDBA Replace the following variables appropriate values, as described below:
You are now connected to your database instance using SQL *Plus. |
7 | Run the script. | Run the create_oracle_instance.sql script by using the following commands: SQL> @/u01/app/oracle/oradata/bsa/create_oracle_instance.sql; |
How to manually set up an Oracle database server and user
If your company policy requires special privileges or you want more granular control, you can manually create the Oracle tablespaces and user.
Log on to the Linux server you want to use as a database server and perform the following steps:
| Step | Commands with examples |
---|---|---|
1 | Create a TrueSight Server Automation directory with the correct permissions to store the table space. | mkdir -p /u01/app/oracle/oradata/bsa chown oracle:dba /u01/app/oracle/oradata/bsa |
2 | Use the command shown on the right to log on to SQL *Plus and connect to the Oracle database. | su - oracle sqlplus /nolog connect sys/<password>@<database_SID> as SYSDBA Replace the following variables appropriate values, as described below:
You are now connected to your database instance using SQL *Plus. |
3 | Create a table space, which can be used by the unified product installer to set up the TrueSight Server Automation 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:
|
4 | Create a table space to index your TrueSight Server Automation 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:
|
5 | 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>; GRANT CREATE SESSION TO <DB_User>; Replace the following variables with appropriate values, as described below:
For more information about the privileges, see List-of-required-database-permissions. |
6 | Alter the data files of the TrueSight Server Automation 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:
|
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