Product: | Syniti Data Replication, DBMoto |
Version: | Syniti DR 9.6 and above, DBMoto 9.5.1 and above |
ID: | 3010 |
Summary: | Support for spatial data types in MS SQL Server and Oracle |
Syniti DR/DBMoto is currently designed to work on all .NET frameworks 4.0 and above. For this reason, the classes DbGeometry and DbGeography are not currently available for use with Syniti DR/DBMoto. they are included in the assembly System.Data.Entity.dll for framework 4.6.
Syniti DR/DBMoto currently offers support for spatial data types in replications across same database types (SQL Server to SQL Server/Oracle to Oracle). This approach uses the native data structure between the source and target.
SQL Server
Database defined type: geometry
Database internal type enum value: SqlDbType.Udt
UdtTypeName: geometry
Database defined type: geography
Database internal type enum value: SqlDbType.Udt
UdtTypeName: geography
To handle these two data types, Syniti DR/DBMoto includes a utility dll, Microsoft.SqlServer.Types, built by Microsoft.
Two SQL Server-specific data structures are available:
- SqlGeometry [to load and convert geometry objects]
- SqlGeography [to load and convert geography objects]
Supported operations:
- Refresh: supported. The source data is read and sent as it is to the target, using the SQL Server internal type (SqlGeometry or SqlGeography) to the target.
- Mirroring/Synchronization: supported. The source data is read as a string from the log, and using the SQL Server internal type (SqlGeometry or SqlGeography) it is converted from the string format to be sent to the target.
Oracle
Database defined type: sdo_geometry
Database internal type enum value: OracleDbType.Object
UdtTypeName: SDO_GEOMETRY
Database defined type: geography
Database internal type enum value: OracleDbType.Object
UdtTypeName: SDO_GEOMETRY
The Oracle Client does not support these datatypes and even running a SELECT on a table that contains spatial data will throw an error:
"Custom type mapping for 'dataSource='192.168.1.156/ORCL12' schemaName='MDSYS' typeName='SDO_GEOMETRY'' is not specified or is invalid"
In order to use these data types, you have to use an additional assembly called NetSdoGeometry.dll. Submit a request to receive this additional component.
To assign the assembly mapping properly from the Syniti DR/DBMoto code, you need to edit the DBReplicator.exe.config file and the ManagementCenter.exe.config and add this section inside the <configuration> section:
<oracle.dataaccess.client> |
The assembly provides these specific data structures:
- SdoGeometry [to load and convert SDO_GEOMETRY objects]
- SdoElemInfoArray [to load and convert SDO_ELEM_INFO_ARRAY objects]
- SdoOrdinateArray [to load and convert SDO_ORDINATE_ARRAY objects]
- SdoPoint [to load and convert SDO_POINT objects]
Supported operations:
- Refresh: supported. The source data is read and sent as it is to the target, using the NetSdoGeometry internal types to the target.
- Mirroring/Synchronization: not supported.
NOTE: whenever support is indicated, it is meant only among homogeneous databases (SQL to SQL, Oracle to Oracle).