[Rt-commit] r4192 - in rt/branches/CHALDEA-EXPERIMENTAL: . sbin

jesse at bestpractical.com jesse at bestpractical.com
Wed Nov 30 16:30:14 EST 2005


Author: jesse
Date: Wed Nov 30 16:30:14 2005
New Revision: 4192

Modified:
   rt/branches/CHALDEA-EXPERIMENTAL/   (props changed)
   rt/branches/CHALDEA-EXPERIMENTAL/sbin/rt-setup-database.in
Log:
 r19609 at truegrounds:  jesse | 2005-11-30 16:09:14 -0500
  r19566 at truegrounds:  jesse | 2005-11-30 15:30:08 -0500
   r18895 at truegrounds:  jesse | 2005-11-14 13:35:29 -0500
   RT-Ticket: 7136
   RT-Status: resolved
   RT-Update: correspond
   
   Stuart Knight reports:
   
   As part of the "initdb" processing, the scripts went through and created a new database user, in my case called RT3.
   
   When it came time to create the tables, the script was still logged on as the dba user "system", so all of tables/sequences were created under "system"'s schema.
   
   I followed through the rt-setup-database script, and spotted that there was a database disconnect, followed by an immediate reconnect, as the same user. (in the case of Oracle this still being the "dba" account)
   
   Putting an extra validation check in here for Oracle, and then connecting as the intended database user fixed up the issue.
   
  
 


Modified: rt/branches/CHALDEA-EXPERIMENTAL/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/sbin/rt-setup-database.in	(original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/sbin/rt-setup-database.in	Wed Nov 30 16:30:14 2005
@@ -130,7 +130,13 @@
     unless ($RT::DatabaseType eq 'SQLite') {
 
         $dbh->disconnect;
+
+	if ($RT::DatabaseType eq "Oracle") {
+        $dbh = DBI->connect( $Handle->DSN, ${RT::DatabaseUser}, ${RT::DatabasePassword} ) || die $DBI::errstr;
+	} else {
+	
         $dbh = DBI->connect( $Handle->DSN, $args{'dba'}, $args{'dba-password'} ) || die $DBI::errstr;
+	}
     }
     print "Now populating database schema.\n";
     insert_schema();


More information about the Rt-commit mailing list