Index: openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl 29 Aug 2001 21:22:48 -0000 1.2
+++ openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl 9 Mar 2002 22:51:33 -0000 1.2.2.1
@@ -14,8 +14,7 @@
# This should never happened - we were able to grab a handle previously, why not now?
append my_errors "(db_bootstrap_checks) Internal error accessing pool \"$pool\".
"
set my_error_p 1
- } else {
- # DRB: The aD code didn't deallocate the database handle if either of the following
+ } else { # DRB: The aD code didn't deallocate the database handle if either of the following
# errors occured. Boo hiss...
if { [catch { ns_ora 1row $db "select sysdate from dual" }] ||
[catch { ns_ora exec_plsql_bind $db { begin :1 := 37*73; end; } 1 "" }] } {
@@ -44,6 +43,11 @@
if { [db_string sysdate "select sysdate from dual"] != [ns_fmttime [ns_time] "%Y-%m-%d"] } {
# See if NLS_DATE_FORMAT is set correctly
+ append my_errors "
" + append my_errors [db_string sysdate "select sysdate from dual"] + append my_errors "
" + append my_errors [ns_fmttime [ns_time] "%Y-%m-%d"] + append my_errors "
Your Oracle driver is correctly installed, however Oracle's date format should be set to YYYY-MM-DD.
\n" set my_error_p 1 @@ -64,33 +68,117 @@ # check, so let them check! if {![info exists env(ORACLE_HOME)]} { append my_errors "
- There is no ORACLE_HOME
variable in your environment. This variable must be set in order for the installer to locate your Oracle instance.
+ There is no ORACLE_HOME
variable in your environment.
+This variable must be set in order for the Oracle software to work properly (even on an Oracle client).
" set my_error_p 1 - } elseif { ![file exists "$env(ORACLE_HOME)/ctx/bin/ctxhx"] && ![ad_windows_p]} { - append my_errors "
The file
-The program The CTXSYS user does not exist in your database. This means
+that interMedia is probably not installed. interMedia is needed for full-text searching.
+To install it, you may either use the Oracle Database Assistant ( The You are running Oracle $dbversion under Linux (Intel). Versions of
+Oracle prior to 8.1.7 lack the INSO filters used by interMedia. (These filters convert content
+stored in a variety of proprietary formats (e.g., Microsoft Word) into plain text or HTML for indexing
+and searching.) The best solution is to upgrade the server to Oracle 8.1.7. A workaround is to create the
+file "
-
set my_error_p 1
}
+
+ # do some cleanup
+ set sql "DROP FUNCTION oacs_get_oracle_version"
+ ns_db dml $db $sql
+ ns_db releasehandle $db
+
# ksh must be installed for Oracle's loadjava to work.
@@ -104,7 +192,8 @@
append my_errors " The file $env(ORACLE_HOME)/ctx/bin/ctxhx
which is needed
-by the OpenACS Content Repository is not present in your filesystem. You must be running Oracle 8.1.6
-with Intermedia installed to use OpenACS. If you are using Linux, this file is missing because Oracle
-does not distribute it with the Linux version of Oracle. However, you can replace this file with a
-shell script that acts as a workaround.ctxhx
is primarily used to convert files to HTML or TEXT and can
-support translating between different character sets. The content repository does not need
-this extensive functionality, so you can replace the program with
+ }
+
+ set db [ns_db gethandle]
+
+ # First we look for the overall presence of interMedia
+ set sql "SELECT (SELECT COUNT(*) FROM USER_ROLE_PRIVS WHERE GRANTED_ROLE = 'CTXAPP') ctxrole,
+ (SELECT COUNT(*) FROM ALL_USERS WHERE USERNAME = 'CTXSYS') ctxuser,
+ USER FROM DUAL"
+ set results [ns_db 1row $db $sql]
+ set ctxrole [ns_set value $results 0]
+ set ctxuser [ns_set value $results 1]
+ set thisuser [ns_set value $results 2]
+ if {$ctxuser < 1} {
+ append my_errors "dbassist
under UNIX) to re-create
+your database or add the missing capabilities (JServer and interMedia), or, if you're feeling adventurous, look at running
+the SQL*Plus script \$ORACLE_HOME/ctx/admin/dr0inst.sql
on the Oracle server.CTXAPP
role has not been granted to this database
+user ($thisuser
). Without the role, it will be impossible to synchronize interMedia indexes
+and several other tasks. As a dba user (e.g., SYSTEM
), grant the role:
+If you still receive this error after restarting AOLserver, you may need to include the role
+as a \"default\" role for the user. To do so, run the following as a dba user such as
+GRANT CTXAPP TO $thisuser;
+
SYSTEM
:
+
+
+ALTER USER $thisuser DEFAULT ROLE ALL;
+
\$ORACLE_HOME/ctx/bin/ctxhx
+on the Oracle server containing the following lines:
+
-
-Save the above text in
#!/bin/sh
cat \$1 > \$2
$env(ORACLE_HOME)/ctx/bin/ctxhx
, and give
-it the proper ownership and permissions.
+This is a simple shell script that just copies the input onto the output. This will work fine
+for the HTML and text documents generally stored in this toolset. After saving this file,
+be sure to give it the proper ownership and permissions:
-chown oracle:oinstall $env(ORACLE_HOME)/ctx/bin/ctxhx
-chmod 755 $env(ORACLE_HOME)/ctx/bin/ctxhx
+chown oracle:oinstall \$ORACLE_HOME/ctx/bin/ctxhx
+chmod 755 \$ORACLE_HOME/ctx/bin/ctxhx
/bin/ksh
is not present. This file is the Korn shell and
is required by Oracle's loadjava
utility for adding Java class files to the database.
It must be installed in order for OpenACS to install properly. Please obtain it from
- David Korn's Kornshell page. Install it and provide
+ David Korn's Kornshell page. (Alternatively, pdksh
+ (a ksh clone) has been reported to work.) Install it and provide
a symbolic link from /bin/ksh
to the executable. Alternatively, loadjava
is known to work if /bin/sh
is linked to /bin/ksh
. You can do this by typing
as root: