Installing Blackboard (pre-9.1) on Oracle ASM Storage

March 17th, 2010

... or the one about reading and understanding error messages to reverse engineer the solution.

Blackboard claims that new version 9.1 will “support” installation on Oracle’s ASM (Automatic Storage Management), which is really just Oracle’s own LVM (Logical Volume Manager) geared specifically for Oracle files. Blackboard’s installer, prior to version 9.1, will balk if ASM disk paths like +ASM_DBPROD_DATA/ are entered for the installation path on the database, as opposed to normal (ocfs2, ext3, nfs, etc.) /ocfs2_dbprod_data. This is because the installer’s script validates that there is a ‘/’ on the beginning of the path to the database. However, if you enter a fake path, like say ‘/fakepath’ for the installer, it executes some CREATE TABLESPACE SQLs that specify the file name for the tablespace. This SQL of course failes, because /fakepath doesn’t exist. I copied the failing SQL out of the installer path and noticed something: the installer was querying Oracle’s specialUSER_TABLESPACES (or DBA_TABLESPACES, I forget) to see if tablespaces like BB_BB60_DATA and BB_BB60_INDX existed. If they didn’t exist, the failing SQL would then try to create them, and fail due to ‘/fakepath’ being… fake. A complete and detailed solution to this problem follows after the break.

Then the lightbulb turned on in my head! Why not just create the tablespaces in the Oracle Instance shell myself prior to running the installer and pointing it at the Oracle Instance. We are using Oracle 10G R2 RAC with 11G R1 clusterware on ASM storage. OMF (Oracle Managed Files) are enabled:

SQL> show parameter create_file
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest                  string      +ASM_DBARCH_DATA

So after you execute Blackboard’s required grant step in SQLPlus as oracle:

@$ORACLE_HOME/rdbms/admin/rstrconn.sql;
GRANT create session, create table TO CONNECT;
commit;

Then execute this SQL to create the “base” set of Oracle Tablespaces for Blackboard:

CREATE SMALLFILE TABLESPACE "BB_BB60_STATS_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "BB_BB60_STATS_INDX" LOGGING;
CREATE SMALLFILE TABLESPACE "BBADMIN_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "BBADMIN_INDX" LOGGING;
CREATE SMALLFILE TABLESPACE "BB_BB60_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "BB_BB60_INDX" LOGGING; 

note that these SQLs do not cover the CMS tablespaces needed if you’re running the Blackboard (Xythos) CMS.

Here’s the SQL if you’re running the Blackboard (Xythos) CMS:

CREATE SMALLFILE TABLESPACE "CMS_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_INDX" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_USERS_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_USERS_INDX" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_COURSES_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_COURSES_INDX" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_ORGS_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_ORGS_INDX" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_INST_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_INST_INDX" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_LIBRARY_DATA" LOGGING;
CREATE SMALLFILE TABLESPACE "CMS_FILES_LIBRARY_INDX" LOGGING;

Note that this may not be an inclusive list for all installs, but for our work here with Blackboard 7.* through 9.0 SP1 HF2, this has been sufficient. If your installer still errors out after you’ve pre-created the tablespaces, you should investigate the log file that the installer creates and find the name of the tablespace that the installer is failing on. Then , using SQL like what’s above, create whatever tablespace you need.

I found out about all of this when we migrated from OCFS2-backed 10G R2 RAC without OMF (Oracle Managed Files) to ASM-backed 10G R2 with OMF on 11G R1 clusterware, but the solution is actually very simple if you look in the bb-installer.log that the installer creates when you run the jar like /usr/local/jdk/bin/java -jar bb-as-linux-9.0.505.15.jar. When I ran the installer with a /fakepath for the database install path, I saw the failing CREATE TABLESPACE statements referencing the /fakepath. I didn’t want BB to try to name files for the tablespaces, that’s why I’m running Oracle Managed Files. Once I pre-created the tablespaces, everything ran great and the install completed successfully. Detailed solution with example SQL after the break!

I have seen a lot of solutions come across the BBADMIN-L list out of ASU involving complicated solutions where one installs Blackboard 6,7,8 or 9 on non-ASM storage and uses RMAN to migrate the database. Another workaround involved creating a non-clustered database in a RAC environment on local storage and then moving that to the RAC clustered Oracle DB and ASM storage. Both of these solutions time consuming, fraught with places to make mistakes and hose the entire process, and generally a royal pain in the ass. I have a feeling Blackboard already knows this trick and if we’re lucky they’ll eventually publish their version of this article, if they have one.

I hope this helps all my fellow BBAdmins out just a bit. If you’ve got questions or this process blows up on you, please leave me a comment and we can try to figure it out! I have tested this on Oracle 10G R2, both RAC and non-RAC and with Blackboard 7.3.230.0, 8.0.375.0 and 9.0 SP1 HF2, all of which worked AOK.

Leave a Reply