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 -N -r1.5 -r1.6 --- openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl 11 Apr 2003 03:58:09 -0000 1.5 +++ openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl 4 Jun 2006 00:45:22 -0000 1.6 @@ -26,10 +26,13 @@ } if { ![info exists my_error_p] } { - # DRB: I've got the SQL to pick the version to drop in later...what we really want, - # though, is Oracle's "compat version" number and I'm not sure how to get it (it is - # reported as 8.1.0 during the Oracle installation process) - nsv_set ad_database_version . "8.1.6" + # Get the version from Oracle, using the db tools equivalent of + # sticks and fire... + set db [ns_db gethandle [lindex [db_available_pools {}] 0]] + set selection [ns_db 1row $db "select version from product_component_version where product like 'Oracle%'"] + regexp {^[0-9]\.[0-9]\.[0-9]} [ns_set value $selection 0] match + ns_db releasehandle $db + nsv_set ad_database_version . $match } } @@ -41,7 +44,9 @@ # Date format is a globally defined value for Oracle, so we only need to check it once # for correctness. - if { [db_string sysdate "select sysdate from dual"] != [ns_fmttime [ns_time] "%Y-%m-%d"] } { + if { [db_string sysdate "select sysdate from dual"] != + [db_string sysdate2 "select to_char(sysdate,'YYYY-MM-DD') from dual"] } { + # See if NLS_DATE_FORMAT is set correctly append my_errors "

" append my_errors [db_string sysdate "select sysdate from dual"]