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. - If you are planning on connecting to your SQL Server database using Integrated Windows Authentication then please refer to this article: https://support.assetbank.co.uk/hc/en-gb/articles/115005116787-Connecting-Asset-Bank-to-SQL-Server-using-Windows-Authentication
- 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.
3. Azure SQL Server Database setup
- Open your Microsoft Azure portal
- Create a new server from the SQL Server section if you do not already have one: the "Standard" performance preset will be sufficient to meet Asset Bank workloads most of the time
- Navigate to the "Firewall / Virtual Networks" section of your server and grant access to the server's IP where your Asset Bank is running
- From the "SQL databases" section add a new database on the server you have just created (or a server of your choice), you can leave all default settings unchanged
- Into your newly created database, navigate into the "Connection strings" section and copy the string from the JDBC tab: you will need to paste it in the database.url property (see section 4.3)
- From the database "Overview" section, open the "Tools" page and launch the "Query Editor"
Click on "Open query" to open the install-sqlserver.sql script from the installation database folder and run the query - Copy mssql-jdbc-6.2.2.jre8.jar into [Tomcat]\lib directory
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).
Comments
0 comments
Please sign in to leave a comment.