[svn-commits] r196 - in branches/advisor/src: back/scf/scm front/st/shell_unix front/st/vdba

thial01 at ingres.com thial01 at ingres.com
Sat Aug 23 06:36:52 PDT 2008


Author: thial01
Date: 2008-08-23 06:36:51 -0700 (Sat, 23 Aug 2008)
New Revision: 196

Modified:
   branches/advisor/src/back/scf/scm/Jamfile
   branches/advisor/src/back/scf/scm/workloaddb.sql
   branches/advisor/src/front/st/shell_unix/iisudbms.sh
   branches/advisor/src/front/st/vdba/makimau.sql
Log:
Adding creation of workloaddb to iisudbms - see #174


Modified: branches/advisor/src/back/scf/scm/Jamfile
===================================================================
--- branches/advisor/src/back/scf/scm/Jamfile	2008-08-22 19:14:29 UTC (rev 195)
+++ branches/advisor/src/back/scf/scm/Jamfile	2008-08-23 13:36:51 UTC (rev 196)
@@ -12,3 +12,5 @@
 
 IILIBRARY SCFLIB : scmima.c scmmain.c ;
 
+IIDFILES iianalyze : workloaddb.sql ;
+

Modified: branches/advisor/src/back/scf/scm/workloaddb.sql
===================================================================
--- branches/advisor/src/back/scf/scm/workloaddb.sql	2008-08-22 19:14:29 UTC (rev 195)
+++ branches/advisor/src/back/scf/scm/workloaddb.sql	2008-08-23 13:36:51 UTC (rev 196)
@@ -1,3 +1,14 @@
+/*
+** Table registrations for workload DB used by the Ingres Design Advisor
+**
+## History:
+##
+##      17-Jul-2008 (thial01)
+##        Created 
+*/
+
+set session authorization '$ingres'\p\g
+
 drop table statements\p\g
 
 create table statements (
@@ -130,3 +141,11 @@
 ) 
 \p\g
 
+grant all privileges on statements to public with grant option\p\g
+grant all privileges on workload to public with grant option\p\g
+grant all privileges on tables to public with grant option\p\g
+grant all privileges on attributes to public with grant option\p\g
+grant all privileges on indexes to public with grant option\p\g
+grant all privileges on references to public with grant option\p\g
+grant all privileges on statistics to public with grant option\p\g
+

Modified: branches/advisor/src/front/st/shell_unix/iisudbms.sh
===================================================================
--- branches/advisor/src/front/st/shell_unix/iisudbms.sh	2008-08-22 19:14:29 UTC (rev 195)
+++ branches/advisor/src/front/st/shell_unix/iisudbms.sh	2008-08-23 13:36:51 UTC (rev 196)
@@ -3653,6 +3653,81 @@
 
 fi
 
+# Create and load workload database for design advisor
+CREATE_WKLDB=NO
+WKLDB_ERROR=''
+if [ -d "$II_SYSTEM/ingres/data/workloaddb" ] && [ $UPGRADE_DBS="false" ] ; then
+    cat << !
+You have chosen not to upgrade the user databases at this time. As such
+workloaddb cannot be reload until the database has been upgraded using the
+'upgradedb' utility.
+
+Contact Ingres Corporation Technical Support for more information.
+!
+else
+    CREATE_WKLDB=YES
+fi
+
+if [ "$WRITE_RESPONSE" = 'false' ] ; then
+    # create workloaddb if it doesn't exist
+    if [ "$CREATE_WKLDB" = "YES" ] &&
+        [ ! -d "$II_SYSTEM/ingres/data/default/workloaddb" ] ; then
+	cat << !
+Creating workloaddb...
+
+!
+	$DOIT createdb workloaddb ||
+	{
+	    WKLDB_ERROR=Y
+	    NONFATAL_ERROR=Y
+	    cat << ! | error_box
+An error occured creating database 'workloaddb'. As this database is used by the Ingres Design Advisor this feature cannot be used until this issue has been resolved.
+
+Contact Ingres Corporation Technical Support for assistance.
+!
+	}
+    fi
+
+    # load data
+    if [ "$CREATE_WKLDB" = "YES" ] && [ -z "$WKLDB_ERROR" ] ; then
+	cat << !
+Populating workloaddb...
+
+!
+	[ -f "$II_SYSTEM/ingres/files/iianalyze/workloaddb.sql" ] &&
+	    ( $DOIT cd "$II_SYSTEM/ingres/files/iianalyze" ; \
+		$DOIT sql workloaddb < workloaddb.sql ) ||
+		{
+		    WKLDBDB_ERROR=Y
+		    NONFATAL_ERROR=Y
+		    cat << ! | error_box
+An error occured loading 'workloaddb'. As this database is used by the Ingres Design Advisor this feature cannot be used until this issue has been resolved.
+
+Contact Ingres Corporation Technical Support for assistance.
+!
+		}
+    fi
+	
+    # now sysmod and checkpoint workloaddb and we're done
+    if [ "$CREATE_WKLDB" = "YES" ] && [ -z "$WKLDB_ERROR" ] ; then
+	sleep 1
+	$DOIT sysmod -w workloaddb ||
+	{
+	    WKLDB_ERROR=Y
+	    NONFATAL_ERROR=Y
+	}
+    fi
+ 
+    if [ "$CREATE_WKLDB" = "YES" ] && [ -z "$WKLDB_ERROR" ] ; then
+	sleep 1
+	$DOIT ckpdb -w +j workloaddb
+	{
+	    WKLDB_ERROR=Y
+	    NONFATAL_ERROR=Y
+	}
+    fi
+fi
+
 # Create and load demo databases if we need to
 CREATE_DEMODB=NO
 DEMODB_ERROR=''

Modified: branches/advisor/src/front/st/vdba/makimau.sql
===================================================================
--- branches/advisor/src/front/st/vdba/makimau.sql	2008-08-22 19:14:29 UTC (rev 195)
+++ branches/advisor/src/front/st/vdba/makimau.sql	2008-08-23 13:36:51 UTC (rev 196)
@@ -110,6 +110,8 @@
 ##	    Corrected name of sc_avgrows to sc_totrows and IMA field to total_rows.
 ##	04-jun-2008 (joea)
 ##	    Correct datatype of lkd_status.
+##  17-Jul-2008 (thial01)
+##      Adding ima_scm_* for Ingres Design Advisor
 */
 
 set autocommit on;




More information about the svn-commits mailing list