Setting Up the Database Server Computer (Oracle)

The batch file executes the permission script file using Oracle's System/Manager program. This permission script file creates the Oracle tablespace, users, roles, and permissions.

Then, the batch file imports the Archibus schema and data using Oracle's Import program.

So that the following instructions can apply to all supported versions of Oracle, the instructions use "XX"in the file name to reflect the numerals in the files names. For example, the batch file is referenced as afmoscmXX.bat.

Database Server: Install Oracle

On the database server computer, install Oracle by consulting your Oracle documentation.

Database Server: Upload the Project Database

Once you have the server installed, you need to create the Oracle tablespace, and upload a database containing the Archibus schema.

An overview of this three-step procedure is described below.

Also provided are specific instructions for loading a file containing the Archibus sample data project, or a blank file ready to accept the data for your site.

File Locations:

The databases and the script files referenced below are available for download from Archibus Allbound (https://eptura.allbound.com).

To upload the project database:

  1. Edit the appropriate permissions script file (afmoscm_permXX.sql)
  2. The script then creates the tablespace -- the disk area in which the Archibus database will store its data. You will have to change the database credential name and path name to suit your installation.
  3. The script uses the database credentials to log into the database's administrator account. The script creates the default accounts that the Archibus program uses, namely AFM and AFM_SECURE. It also grants resources and roles.
  4. Edit the appropriate batch file (afmoscmXX.bat) for importing the .dmp file. You will need to change the database credentials.
  5. The batch file executes the permissions script file using Oracle's sqlplus System/Manager program. The batch file then imports the Archibus schema and data using Oracle's imp.exe program.
  6. The .dmp file was created with a user-level export of the Archibus sample database from user AFM. Similarly, the batch file imports this script to the user account AFM.
  7. The log files are created to record what has been imported.
  8. For Oracle 11g:

    sqlplus system/system@trihq imp system/manager fromuser=afm_secure touser=afm_secure file=afmscm.dmp log=afm_secure_scm.log imp system/manager fromuser=afm touser=afm
    file=afmscm.dmp log=afm_scm.log

    • For Oracle 12c and above, use the new import command when importing dmp file. For example:

    impdp system/system@trihq schemas=(afm, afm_secure) directory=<your dump dir> dumpfile=afmscm.dmp logfile=impdp.log

    creates dump directory:

    CONN / AS SYSDBA
    CREATE OR REPLACE DIRECTORY dump_dir AS '<your dump folder>';
    GRANT READ, WRITE ON DIRECTORY dump_dir TO system;

  9. Run the batch file (afmoscmXX.bat) to upload the sample HQ project. The import may take about 30 minutes.

Using the Oracle Administration Tools

If you prefer, you can use the Oracle administration tools rather than the batch file to execute the permissions script file and load the Archibus .dmp file. To upload the project using these tools:

  1. Use the Oracle SQL*Worksheet to execute the script file.
  2. Use the Oracle Data Manager to import the .dmp file.
  3. Perform a Full Database Import to import the objects owned by the user AFM and the objects owned by the user AFM_SECURE.
  4. Enable the options for Grants, Rows, and Indexes.

The following section walks through the details of the three steps for loading the sample project and for loading a blank project. To proceed, choose one of the following methods.

Uploading the HQ Sample Project

The afmoHq.dmp file contains sample data for demonstrating, evaluating, and training Archibus. To load this project:

  1. Edit the afmoHq_PermXX.sql file.
  2. Change the System/Manager parameter to the user name and password of your administrator account.
  3. Modify the data file pathing directory, if required. Change C:\Afmxx\Projects\Hq to the actual location of your Oracle data file. This directory should already exist because the Archibus installation program creates it during the installation process.
  4. Edit the afmoHqXX.bat file to change the System/Manager parameter to the user name and password of your administrator account.
  5. Execute the afmoHqXX.bat file at the operating system command line.

Uploading a New Project

The afmoScm.dmp file contains a blank project database for starting your own new project. To load this project:

  1. Edit the Afmo_PermXX.sql file.
  2. Change the System/Manager parameter to the user name and password of your administrator account.
  3. Modify the data file pathing directory. Change C:\Afmxx\Project\HQ to the actual location of your Oracle datafile. This directory should already exist because the Archibus installation program creates it as part of the installation process.
  4. Edit the afmoScmXX.bat file and change the System/Manager parameter to the user name and password of your administrator account.
  5. Execute execute the afmoScmXX.bat file at the operating system command line.

Oracle TNS Ping Test

To test the server installation, perform the transparent network substrate ping test (the TNS Ping test). This is a low-level test of the connection to the Oracle server.

At a command prompt, type a command similar to the one below. (If you have both the server and client software on the same machine, be certain that you are executing TNSPing.exe from the server directory.)

C:\>TNSPing wgs_DATASERVER_ORCL 5

wgs_DATASERVER_ORCL is the address (the database alias name) and 5 is a small number of pings. Wait a few minutes. The utility will show OK with each ping if the test is successful.

SQL*Worksheet Test

To test whether the database loaded onto the server:

  1. Run the Oracle SQL*Worksheet program.
  2. Log in with the following parameters. It may take a few minutes to connect.
    Username: AFM

    Password: AFM

    Service: wgs_DATASERVER_ORCL
  3. Once connected, try a SELECT statement, like the following:
    SELECT count (*) from afm_flds