|Summary:||Microsoft SQL Server CE 3.5 (distributed with DBMoto 7) does not work with certain Windows 64-Bit Versions. You can define an alternative metadata database.|
The metadata database in DBMoto is used to store tables containing information and settings for the replication process. DBMoto provides a default database connection to SQL Server CE (included with DBMoto) so you do not need to create a connection for your metadata. However, Microsoft SQL Server CE is not supported by certain Microsoft Windows 64-bit versions. Consequently, it may not work as a default metadata database with DBMoto 7 in your environment. You can, however, easily define an alternative metadata database in the DBMoto Management Center. You may see an error similar to the following in the DBMoto Management Center. Refer to Microsoft KB article 974247 (http://support.microsoft.com/kb/974247) for more information.
"System.Exception: An error was generated while creating database 'C:\Program Files\HiT Software\DBMoto V7\SQLServerCe\metadata.sdf'. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8080. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more detail"
You can either upgrade your operating system to match the configurations below, or define an alternative metadata database.
Defining an Alternative Metadata Database
The steps describe how to define a new metadata database for your environment.
- Install and configure a .NET Data Provider for the database that you are planning to use for your metadata connection. See https://support.syniti.com/hc/en-us/articles/5726157638807-Syniti-Data-Replication-and-DBMoto-Supported-NET-Providers for a current list of supported providers. Note that IBM Db2 for i or z/OS are not supported as metadata databases.The database can be local or remote, but should have enough access bandwidth available to handle the number of replications you are planning.
- Create and test a connection string for the .NET data provider/database you are using. Check the documentation for the .NET provider for information on how to do this.
- In the Management Center Metadata Explorer, select the server name ("local" in default installations).
- Click New Metadata in the Metadata Explorer toolbar to open the Metadata Connection wizard.
- Complete the screens in the Metadata Connection wizard using the information below.
- On completion of the wizard, the metadata connection name is displayed in the Metadata Explorer.
Select Provider Screen
Type a name to identify the metadata. This name appears in the Metadata Explorer as a way to group connections for a specific replication.
Select the database for which you want to create a connection.
Note: Db2 running on mainframe and i (iSeries/AS400) cannot be used for the metadata connection. Choose a different database when defining your metadata connection.
Select a .NET data provider from the list. If no .NET provider is available for the database, select either an OLE DB provider or an ODBC driver. By default, only default providers are listed in this dialog. If you want to see all providers for a specific database, uncheck the Use Only Default Providers option in the Options dialog available from the Tools menu.
.NET providers are preferred over ODBC drivers or OLE DB providers because, with DBMoto being a .NET application, it can take advantage of the use of native .NET providers based on the same architecture. If you use ODBC or OLE DB connections, the .NET framework will need to add a software layer for every call you make to the driver, adding overhead. Besides, using 100% managed .NET providers, there is no risk of memory leaks because the .NET framework cleans up memory automatically using an internal garbage collector.
This field is displayed only if using a .NET data provider, and the provider has not been registered. Provide a path to the .NET data provider DLL.
Set Connection String Screen
Edit at least the Required connection properties by clicking in the property value field and typing a new value. The list of Optional properties for .NET and OLE DB providers contains the most commonly used properties for the providers. Edit these as needed. Note that some properties are displayed with default values (no bold text.) Any values that you add or edit are displayed in bold text. Check the documentation for your provider for a complete list of properties. You can set the value of the ExtendedProperties property to define additional property-value pairs. The syntax for defining property-value pairs is: prop1=val1;prop2=val2;....
If you are creating the metadata tables in SQL Server, note that each login has a default initial catalog. For example, the default initial catalog for a system administrator login is "master." If you do not want to use the default catalog, be sure to enter a catalog to use in the Initial Catalog field.
If you are using an ODBC driver, click in the ConnectionString value field and then click the ... button to open the ODBC Driver Connection dialog. The contents of this dialog depend on the ODBC driver that you are using. Provide values for the dialog fields, then click OK to make a test connection and set the values in the DBMoto wizard.
Click Edit to open a text entry window where you can paste or type a connection string for your provider. This is offered as an alternative to the Connection Properties grid, but should be used with great care because an error in the connection string can cause a connection to fail or to have unexpected properties. This window displays any connection information that you have already entered in connection string format. Note that default values are not displayed as part of the connection string.
Click Test to make sure that the connection correctly opens a database connection.
Select Qualifer Screen
This screen is not available if the database you have specified does not allow table qualifiers such as catalogs and schemas. If you do not select values for these fields, the default qualifiers will be used based on the connection properties provided in the Set Connection String screen.
Define Metadata Screen
Create a new metadata database
Select this option to create DBMoto metadata tables using the connection properties specified in the Set Connection String screen.
Restore the metadata set from a backup file
Select this option if you have previously saved a metadata set to a file using the DBMoto Backup Metadata option.
Open existing metadata database
Select this option to use an existing metadata set available from the connection properties specified in the Set Connection String screen.