Database Setup
Database Setup
For RMsis 1.3.0 onwards
Embedded H2 Database
From version 1.3.0 onwards, RMsis is shipped with H2 as embedded database. This can be configured during the process of RMsis application deployment.
Caution : Please use H2 embedded Database only for evaluation and it is not recommended for use in a production system.
For all versions of RMsis
MySQL
- Open a unix terminal or a windows command prompt whichever is relevant to you. And login to MySQL database using the command line client that is shipped with the MySQL. Use "root" (administrator) credentials to login.
- Create a database to store RMSis data. Use any name for it. Example - "rmsis".
- Create a database user and assign permissions to this user to access the database created above.
- Exit MySQL
$ mysql -uroot -ppassword mysql> create database rmsis; mysql> grant all on rmsis.* to 'username'@'hostname' identified by 'new_user_password'; mysql> exit;
Microsoft SQL Server 2005 / 2008
- Create a database for RMsis (e.g. rmsis). Note that the collation type must be case insensitive, e.g.: 'SQL_Latin1_General_CP437_CI_AI' is case insensitive. If it is using your server default, check the collation type of your server.
- Create a database user which RMsis will connect as (e.g. rmsisuser). Note that rmsisuser should not be the database owner, but should be in the db_owner role.
- Create an empty 'schema' in the database (e.g. rmsisschema) for the RMsis tables. Please note that a 'schema' in SQL Server 2005 is a distinct namespace used to contain objects, and is different from a traditional database schema. It is not required to create any of RMsis tables, fields or relationships (RMsis will create these objects in empty schema when it starts for the first time). Read more on SQL Server 2008 schemas in the relevant Microsoft Documentation (http:/msdn2.microsoft.com/en-us/library/ms190387.aspx).
- Ensure that the user has permission to connect to the database, and create and populate tables in the newly-created schema.
- Ensure that TCP/IP is enabled on SQL Server and listening on the correct port (the port is 1433 for the default instance of SQL Server). Read the Microsoft documentation for information on how to enable a network protocol (TCP/IP) and how to configure SQL server to listen on a specific port.
- Ensure that SQL Server is operating in the appropriate authentication mode. By default, SQL Server operates in 'Windows Authentication Mode'. However, if user is not associated with a trusted SQL connection, i.e. 'Microsoft SQL Server, Error: 18452' is received during RMsis startup, it is required to change the authentication mode to 'Mixed Authentication Mode'. Read the Microsoft documentation on authentication modes and changing the authentication mode to 'Mixed Authentication Mode'
- Turn off the SET NOCOUNT option. Open SQL Server Management Studio and navigate to Tools -> Options -> Query Execution -> SQL Server -> Advanced. The following screenshot displays the configuration panel for this setting in MSSQL Server 2005/2008. Ensure that the SET NOCOUNT option is not selected:
- Copy SQL server driver to application server.
- Download the SQL Server JDBC driver (v1.2.3) from JTDS.
- Add the SQL Server JDBC driver jar (jtds-1.2.3.jar) to the <Tomcat install>/lib/ directory.