IMPORTANT NOTE: Asset Bank now requires MySQL 5.7 (not MySQL 8) or SQL Server 2008 and above.
1. MySQL Database setup
Note: there are scripts in [tomcat]/webapps/asset-bank/WEB-INF/manager-config/database to run the steps below: database-setup.cmd (Windows) and database-setup.sh (Linux).
Create a new database. By default call it assetbank.
Create a database user. By default call this application.
Give the user ALL privileges on the database.
Connect as root, and run the install-mysql.sql script from the installation database folder (it is also in [tomcat]/webapps/asset-bank/WEB-INF/manager-config/database).
Download MySQL Connector for Java v5.1.47 either as a tar.gz or as a zip.
Extract the archive.
Copy mysql-connector-java-x.x.x-bin.jar from the extracted folder into [tomcat]/lib directory
2. SQL Server Database setup (SQLServer 2008 to 2016)
Create a new database login, with SQL Server Authentication. By default call this application. The following should all be UNchecked: Enforce password policy, Enforce password expiration, User must change password at next login.
Create a new database, with Name=assetbank, and Owner=application. The application user should be owner since the Asset Bank updater function will run under this user to create and update tables. The database needs to use a case insensitive collation. It requires either the db_owner permission , or at least "db_datareader, db_datawriter, db_ddladmin and public".
Now connect to SQL Server using the application login, and run the install-sqlserver.sql script from the installation database folder.
Note for SQL Server 2005, the following configuration steps should be done in SQL Server Configuration Manager to allow JDBC access:
SQL Server 2005 Services: Enable and start Sql Server Browser
Protocols: Enable TCP/IP protocol
Copy mssql-jdbc-6.2.2.jre8.jar into [Tomcat]\lib directory Please note: if you want to use the driver for an existing installation you might also need to update the connection string in database-local.properties. An example can be found in database.properties.
Please ensure that tempdb is configured appropriately for row version storage by following the recommendations in http://msdn.microsoft.com/library/ms345124.aspx. Specifically, we recommend that the initial size of tempdb is at least 50MB and that it's located on a fast disk.
Note: Support for Azure SQL Server has been introduced since version 3.1770.7
4. Database connection settings
Copy [Tomcat]\webapps\asset-bank\WEB-INF\classes\database.properties to [Tomcat]\webapps\asset-bank\WEB-INF\classes\database-local.properties
Open [Tomcat]\webapps\asset-bank\WEB-INF\classes\database-local.properties in a text editor and ensure that the example settings for the database type you are using are uncommented and the example settings for the other databases are commented out (or deleted). Comments are lines beginning with '#'. By default the MySQL settings are active and the SQL Server settings are commented out.
Update the following properties if necessary for access to your database: database.url, database.username and database.password.
In the file [Tomcat]\webapps\asset-bank\WEB-INF\classes\ApplicationSettings.properties search for the property sql-generator-class and update its property to suit the database you installed (potential values for this property are detailed in a comment above the property itself).