Skip to end of metadata
Go to start of metadata

PRE-REQUISITES

  1. Oracle
    1. Version 10g or later
    2. You will need a username/password that has DBA privileges. By default, the process uses the Oracle user 'SYSTEM'
    3. Install Express Edition to run a local Oracle instance
  2. MySQL
    1. Version 5.1+
    2. You will need a username/password that has DBA privileges. By default, the process uses the MySQL user 'root'
    3. Before importing a rice database for the first time, make sure you've followed Rice MySQL configuration prerequisites
  3. JDK6
  4. Maven 3.0+
    1. You may need to set the environment variable MAVEN_OPTS to increase the heap available to the process e.g.
  5. Subversion Client

PROCESS

  1. Checkout the Rice trunk
    svn co https://svn.kuali.org/repos/rice/trunk/
    
  2. Change into the directory for the "master" data set
    cd db/impex/master
    
  3. Verify that Maven can connect to your database instance
    1. Running Locally
      1. MySQL
        mvn validate -Pdb,mysql -Dimpex.dba.password=[dbapassword]
        
        Icon

        If the 'root' user does not have a password (which is the default on a new MySQL install), drop the '-Dimpex.dba.password' parameter from all MySQL commands or use 'NONE' for the password:
        mvn validate -Pdb,mysql
        or
        mvn validate -Pdb,mysql -Dimpex.dba.password=NONE

      2. Oracle
        mvn validate -Pdb,oracle -Dimpex.dba.password=[dbapassword]
        
    2. Connecting to a remote database
      1. MySQL
        mvn validate -Pdb,mysql -Dimpex.dba.url=jdbc:mysql://[your-mysql-instance]/ -Dimpex.dba.password=[dbapassword]
        
      2. Oracle
        mvn validate -Pdb,oracle -Dimpex.url=jdbc:oracle:thin:@[your-oracle-server]:1521:XE -Dimpex.dba.password=[dbapassword]
        
    3. If you are using Oracle and validation fails with an error about "com.oracle:ojdbc14:jar:10.2.0.3.0" there are two possible fixes.
      1. Follow these instructions to install Oracle's JDBC driver into your local maven repository manually
        1. mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=ojdbc14.jar
      2. Edit your local ~/.m2/settings.xml file using http://svn.kuali.org/repos/rice/trunk/settings.xml.developer as a template
  4. Load the data set.
    1. Running Locally
      1. MySQL
        mvn clean install -Pdb,mysql -Dimpex.dba.password=[dbapassword]
        
      2. Oracle
        mvn clean install -Pdb,oracle -Dimpex.dba.password=[dbapassword]
        
    2. Connecting to a remote database
      1. MySQL
        mvn clean install -Pdb,mysql  -Dimpex.dba.url=jdbc:mysql://[your-mysql-instance]/ -Dimpex.dba.password=[dbapassword]
        
      2. Oracle
        mvn clean install -Pdb,oracle -Dimpex.url=jdbc:oracle:thin:@[your-oracle-server]:1521:XE  -Dimpex.dba.password=[dbapassword]
        

VERIFICATION

  1. You should get the following message at the end of the process
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    
  2. You will have a database called 'rice' that you can access with username 'RICE', password 'RICE'
  • No labels

8 Comments

  1. Jeff, is there a way to exclude certain tables from being extracted into the rice datasets from the master datasource? There are some tables that cause integrity violations if they contain data when rice starts up from a fresh DB install. These tables aren't bootstrap data anyway. A few I can think of are:

    krsb_svc_dscrptr_t
    krsb_svc_def_t
    krsb_msg_que_t
    krsb_msg_pyld_t
    krsb_bam_parm_t
    krsb_bam_t

    There could be others....

  2. To make this work don't check the source out separately. Instead go into the db/impex/master directory of your rice checkout. You'll also need to manually copy ojdbc14-10.2.0.3.0.jar into your maven repository.

    If you want to specify your own database add the command line option -Dimpex.database=db-name

  3. OSX (PPC 10.5.8) MySql 5.1.40 sets the root password to blank (none).  In order for the impex script to work I had to set a root password (mysqladmin -u root password newpass).  I also received errors during create user (rice), so used the root user in its place.  

    1. The script is unable to connect to the local database if the user is created as 'RICE'@'%' or 'RICEMASTER'@'%'. After the user was created, I used MySQLWorkbench to limit connectivity for the user to 'localhost', and then the script could run successfully. I finally tracked down this, from http://dev.mysql.com/doc/refman/5.5/en/access-denied.html:

      If you cannot figure out why you get Access denied, remove from the user table all entries that have Host values containing wildcards (entries that contain '%' or '_' characters). A very common error is to insert a new entry with Host='%' and User='some_user', thinking that this enables you to specify localhost to connect from the same machine. The reason that this does not work is that the default privileges include an entry with Host='localhost' and User=''. Because that entry has a Host value 'localhost' that is more specific than '%', it is used in preference to the new entry when connecting from localhost! The correct procedure is to insert a second entry with Host='localhost' and User='some_user', or to delete the entry with Host='localhost' and User=''...

      1. With 5.5.27-osx10.6-x86_64 on OSX 10.7 I had to remove the CREATE USER RICE with % from the pom.xml. to keep it from errorring out.

  4. Creating a rice user at the time of running the command worked fine on windows 7 and mysql 5.5.

  5. As of Rice 2.0.0-b3, the Mac OS X issue related to the 'RICE'@'%' user is fixed. MySQL on Mac OS X needs 2 rows in its internal 'user' table. One with 'RICE'@'%' and one with 'RICE'@'localhost'. The default scripting now adds both for all platforms.

    This process should now be fully supported on Mac OS X

    Also, if the 'root' user does not have a password, drop the '-Dimpex.dba.password' parameter from all MySQL commands or use 'NONE' for the password: eg '-Dimpex.dba.password=NONE'

  6. YMMV, but I had to leave the trailing '/' off the impex.dba.url (so "-Dimpex.dba.url=jdbc:mysql://[your-mysql-instance]" instead of "-Dimpex.dba.url=jdbc:mysql://[your-mysql-instance]/") to be able to successfully 'mvn install'. Seems to me that 'mvn validate' still worked with the trialing slash, which was slightly confusing.