Вы находитесь на странице: 1из 9

Birst Appliance - Oracle DB Setup Instructions

The Oracle Admin requires following databases to be setup on Oracle servers.


1. BirstAdmin (Transaction Processing) – Admin DB, for metadata, administration and scheduling
tasks for the data warehouse.
2. BirstData (Data Warehouse) – Contains the data warehouse. Needs to be on a separate server.

Setup the OS
Besides the databases, we need to make changes at the OS level, as sysadmin, to connect the Birst
Appliance.

The BirstMetaData name needs to resolve the IP address of Metadata file location (server or NAS). The
way to accomplish this is to add the entry in the “/etc/hosts” file or make the dns entry for the same.

If the BirstMetaData share is a CIFS share then we require the cifs-utils package installed on linux with
yum or rpm command (yum install cifs-utils). See the Birst Appliance Quick Start Guide or the Birst
Appliance Operations Guide on the share for more details. In this document we will assume you have
the cifs share in place.

Steps to mount the BirstMetaData share


Login to the data warehouse server where the BirstData DB resides
1. Create the directory /mnt/BirstMetaData to point to the location of BirstMetaData. Run the
following command:
#mkdir -p /mnt/BirstMetaData

2. Now get user and group ID for the Oracle User with the following command.
#id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin)

3. If we don’t have the dns entry for BirstMetaData then add the entry in the “/etc/hosts” file.
Entry will be looks like:
4. Check if we can mount the BirstMetadata, run the following command to Mount (This is all on
one line):
#mount -t cifs -o username=birstuser,password=birst@123,uid=501,gid=501
//BirstMetaData/Repositories /mnt/BirstMetaData

The output should look like this:

5. Now check and verify the mounted BirstMetaData with df command, the output should look like
this:

6. After this unmount the BirstMetadata with the following command:


#umount /mnt/BirstMetaData

7. You should mount this share permanently by adding it in /etc/fstab, add the following entry in
the /etc/fstab file (This is all on one line):
//BirstMetaData/Repositories /mnt/BirstMetaData cifs
username=birstuser,password=birst@123,uid=501,gid=501 0 0

The output should look like this:

8. After the entry in the /etc/fstab, run the following command to mount the BirstMetaData:
#mount -a
Setting up the Database

NOTE: Birst creates a user for each space for namespace isolation. This requires removal any password
policy restriction on Oracle DB that prevents a user to have the same password as the username.

Setup Instructions for BirstAdmin DB


1. Create a new Transaction Processing type database with dbca and name it as BirstAdmin.
2. Check the tns entry with this command ‘tnsping BirstAdmin’ if you cannot do the tnsping then
make the entry in the tnsnames.ora file.

Edit the tnsnames.ora file “$ORACLE_HOME/network/admin/tnsnames.ora” and add this entry


this entry with editor $ORACLE_HOME/network/admin/tnsnames.ora
BirstAdmin =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = BirstAdmin)
)
)

3. Connect to BirstAdmin as sysdba with this command


[oracle@birst-orac-01 ~]$ sqlplus sys/birst123@BirstAdmin as sysdba

4. Create user command will create the user into the oracle default tablespace for users, you can
create the user with specifying the “default tablespace” option in the command for example:
(create user birstuser identified by birst123 default tablespace "tablespacename" )

create user birstuser identified by birst123;


create user dbo identified by dbo;

5. Alter the user to provide the unlimited quota on the tablespace, which was used before to
create the user.

alter user birstuser quota unlimited on users;


alter user dbo quota unlimited on users;

6. Run the following sql statements to grants the permissions:


grant connect to birstuser;
grant dba to birstuser;
grant connect to dbo;
The output should look like this:

7. Download the files BirstAdmin.dmp.tar.gz and BirstSchedul.dmp.tar.gz, extract the files.


tar -zxf BirstAdmin.dmp.tar.gz
tar –zxf BirstSchedul.dmp.tar.gz

8. Import the dump file:

[oracle@birst-orac-01 ~]$ imp birstuser/birst123@BirstAdmin file=BirstAdmin.dmp


FROMUSER=dbo TOUSER=dbo commit=y LOG=BirstAdmin.log ignore=true
The output should look like this:

[oracle@birst-orac-01 ~]$ imp birstuser/birst123@BirstAdmin file=BirstSchedul.dmp


FROMUSER=dbo TOUSER=dbo commit=y LOG=BirstSchedul.log ignore=true

The output should look like this:

[oracle@birst-orac-01 ~]$ imp birstuser/birst123@BirstAdmin file=BirstSchedul.dmp


FROMUSER=birstuser TOUSER=birstuser commit=y LOG=BirstSchedul.log ignore=true

The output should look like this:


9. Connect to the oracle and run following sql:

[oracle@birst-orac-01 ~]$ sqlplus birstuser/birst123@BirstAdmin

CREATE OR REPLACE TRIGGER DBA_LOGON_TRIGGER AFTER LOGON ON DATABASE


DECLARE
cmmd VARCHAR2(64);
BEGIN
cmmd:='alter session set NLS_COMP=LINGUISTIC';
EXECUTE IMMEDIATE cmmd;
cmmd:='alter session set NLS_SORT=BINARY_CI';
EXECUTE IMMEDIATE cmmd;
END
;
/

The output should look like this:


Setup Instructions for BirstData DB
1. Create a new Data Warehouse type database with dbca and name it as BirstData.

2. Check the tns entry with this command ‘tnsping BirstData’ if you cannot do the tnsping then
make the entry in the tnsnames.ora file.
Edit the tnsnames.ora file “$ORACLE_HOME/network/admin/tnsnames.ora” and add this entry
this entry with editor
BirstData =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = BirstData)
)
)
3. Connect to BirstData as sysdba with this command
[oracle@birst-orac-01 ~]$ sqlplus sys/birst123@BirstData as sysdba

4. Create user command will create the user into the oracle default tablespace for users, you can
create the user with specifying the “default tablespace” option in the command for example:
(create user birstuser identified by birst123 default tablespace "tablespacename" )
create user birstuser identified by birst123;
create user dbo identified by dbo;

5. Alter the user to provide the unlimited quota on the tablespace, which was used before to
create the user.
alter user birstuser quota unlimited on users;
alter user dbo quota unlimited on users;

6. Run the following sql statements to grants the permissions:


grant connect to birstuser;
grant dba to birstuser;
grant connect to dbo;
The output should look like this:
7. Download the file BirstData.dmp.tar.gz, extract the file.
tar -zxf BirstData.dmp.tar.gz

8. Import the dump file:

[oracle@birst-orac-01 ~]$ imp birstuser/birst123@BirstData file= BirstData.dmp


FROMUSER=dbo TOUSER=dbo commit=y LOG=BirstData.log ignore=true

The output should look like this:


Connect the Database with BirstAppliance
Once the databases are setup, use the Appliance Management UI to create a connection to the Oracle
DB. Remember to save your setting and restart services from the Monitor tab of the Appliance
Management UI.

Вам также может понравиться