Integrate Software AG Products Using Digital Event Services 10.4 | Integrate Software AG Products Using Digital Event Services | MashZone NextGen Help | Appendix | Administration | Getting Started with the MashZone NextGen Server | Move the MashZone NextGen repository to a robust database solution | Move MashZone NextGen repository to Microsoft SQL Server
 
Move MashZone NextGen repository to Microsoft SQL Server
1. If you are using your LDAP Directory as the MashZone NextGen User Repository, make sure that at least one user in your LDAP Directory has administrator privileges for MashZone NextGen before you move the MashZone NextGen Repository. See Grant User Access to MashZone NextGen with Built-in Groups for instructions.
When the MashZone NextGen User Repository is your LDAP Directory, the default administrator account (Administrator user) is disabled.
2. If you are hosting the MashZone NextGen Repository or MashZone Repository in a new database, create the database following SQL Server documentation. Keep the following points in mind:
*Make sure this database is supported by MashZone NextGen. See Additional MashZone NextGen System and Software Requirements for details.
Note: The jTDS driver and the original Microsoft driver are available for Microsoft SQL Server. You must make different settings depending on the driver type selected. For details see the following steps.
*If you want MashZone NextGen to support international characters in meta-data for artifacts, make sure the database uses the UTF-16 character encoding and case insensitive collation. See documentation for your database for specific instructions.
*It is a best practice to require passwords for every database account that can access the MashZone NextGen Repository.
*If you do not use the default dbo schema, you have to specify the name of the used schema (value="schema_name" ) in the bean PMF in the rdsApplicationContext.xml file.
The file is located in <MashZone NextGen installation>\apache-tomcat\webapps\mashzone\WEB-INF\classes\.
<bean id="pmf" class="com.jackbe.jbp.sas.rds.impl.jdo
.PersistenceManagerFactoryBean">

<property name="lifecycleListener" ref="entityLifecycleLsnr"/>
<property name="dataSource" ref="dataSource" />
<property name="configLocation"
value="classpath:datanucleus.properties"/>

<!-- overwrite settings in configLocation file -->
<property name="jdoProperties">
<map>
<entry key="datanucleus.ConnectionFactoryName"
value="java:comp/env/MashzoneNextGenRepository"/>
<entry key="datanucleus.storeManagerType" value="rdbms"/>
<entry key="datanucleus.mapping.Schema" value="schema_name"/>
</map>
</property>
</bean>
3. Start the database that will become host to the MashZone NextGen Repository, if it is not already up.
4. Using the SQL tool for the database that will be host, add MashZone NextGen Repository tables with the scripts shown below from the corresponding folder in MashZoneNG-install/prestorepository/mssqldb:
*createDBTables.txt for MetaData and the default User Repository
*createSchedulerTables.sql for Scheduler
This folder also contains scripts to drop the corresponding MashZone NextGen Repository tables, if needed.
5. Copy the JAR file for the JDBC driver for your database to the following folder for each MashZone NextGen Server that uses this MashZone NextGen Repository:
MashZoneNG-install/apache-tomcat/lib
6. Replace the JAR for the MashZone NextGen Repository:
a. Remove the web-apps-home/mashzone/WEB-INF/lib/jackbe-presto-rds-postgresql-derby.jar JAR file for each MashZone NextGen Server that uses this MashZone NextGen Repository. You can delete this JAR or simply move it to a folder that is not in the classpath for the application server that hosts MashZone NextGen.
b. Copy this JAR file:
MashZoneNG-install/prestorepository/jackbe-presto-rds-oracle-mysql-mssql.jar
To the web-apps-home/mashzone/WEB-INF/lib folder.
7. Update snapshot scheduler configuration for the MashZone NextGen Server:
a. In the text editor of your choice, open the applicationContext-scheduler.xml file in the webapps-home/mashzone/WEB-INF/classes/ folder for the MashZone NextGen Server.
b. Find the bean for org.springframework.scheduling.quartz.SchedulerFactoryBean in default profile.
c. Update the org.quartz.jobStore.driverDelegateClass property to the org.quartz.impl.jdbcjobstore.MSSQLDelegate appropriate delegate for this database:
d. Save this change.
e. If this is a clustered environment, copy the updated applicationContext-scheduler.xml configuration file to each MashZone NextGen Server in the cluster.
8. Open the MashZoneNG-install/apache-tomcat/conf/context.xml configuration file in the text editor of your choice.
9. For the MashZone NextGen Repository, edit the <Resource> element with an ID of MashzoneNextGenRepository and:
a. Update the JDBC driver, URL and credential properties:
Example for jTDS driver

<Resource
name="MashzoneNextGenRepository" auth="Container"
type="javax.sql.DataSource" maxTotal="200" maxIdle="30"
maxWaitMillis="10000" username="app" password="app"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://host-name:port/database"
/>
The JTA managed property must be false.
Example for original Microsoft driver

<Resource
name="MashzoneNextGenRepository" auth="Container"
type="javax.sql.DataSource" maxTotal="200" maxIdle="30"
maxWaitMillis="10000"
username="app" password="app"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://host-name:port;databaseName=your_database"
/>
b. If needed, update optional properties. See Tomcat Datasource Properties for a complete list of optional properties and information on defaults.
Some common properties you may need to set include:
*validationQuery = select 1
*Common tuning properties for connections pools. See Tuning the MashZone NextGen Repository Connection Pool.
10. Save your changes to this file.
If the MashZone NextGen Server does not start up successfully, see Troubleshooting Connections to the MashZone NextGen Repository for suggestions.
11. Restart the MashZone NextGen Server to apply these changes.
If the MashZone NextGen Server does not start up successfully, see Troubleshooting Connections to the MashZone NextGen Repository for suggestions.
12. Update connection information for the Snapshots Repository:
a. Open MashZone NextGen Hub and login.
b. Add a JDBC driver for the new database that should host the Snapshots Repository. See Add or manage JDBC drivers for instructions on adding JDBC drivers.
c. Expand the JDBC Configuration menu, if needed, and select Datasources.
d. Select SnapshotDatasource and click Edit.
e. Update configuration to point to the new database. See Add a data source for information on specific configuration properties.
f. Click Save.
13. Restart the MashZone NextGen Server to apply these changes.
14. Load macros required for the Snapshot feature in MashZone NextGen:
a. Open a command or terminal window and move to the MashZoneNG-install/presto-cli/bin folder.
b. Enter the appropriate command, shown below, for your operating system:
For Windows
For Linux, OS/X or UNIX
publish-global-macros.bat -u Administrator -p manage -url http://app-server:port/mashzone/edge/api
./publish-global-macros -u Administrator -p manage -url http://app-server:port/mashzone/edge/api

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release