...
Name | Type | Required | Description |
---|---|---|---|
id | string | yes | Unique identifier |
dbtype | 'sqlserver' | yes | The name of the driver to use, in this case sqlserver |
host | string | yes | The hostname or ip address of the SQL Server host |
port | number | yes | The port number that the SQL Server instance is running on |
database | string | no | The database to be connected to |
instance | string | no | The SQL Server instance to be connected to |
integratedsecurity | boolean | no | Login as current windows user account. Works only in windows. Ignores user and password settings. |
url | string | no | JDBC URL connection string, full URL that completely replaces the URL constructed from the settings listed above (host, port, database, instance and integratedsecurity) |
schema | string | no | The schema used when connecting to the database |
user | string | yes | The userid used when connecting to the database |
passwd | string | yes | The password used when connecting to the database |
namespace | string | no | The namespace prefix |
minconnectionsminConnections | integer | no | The minimum number of pooled connection. Default 1 |
maxconnectionsmaxConnections | integer | no | The maximum number of open connections. Default 10 |
validateconnectionsvalidateConnections | boolean | no | Check connection is alive before using it. Default false |
fetchsizefetchSize | integer | no | The number of records read with each interaction with the DBMS. Default 1000 |
connectiontimeoutconnectionTimeout | integer | no | The number of seconds the connection pool will wait before timing out attempting to get a new connection. Default 20 (seconds) |
primarykeymetadatatableprimaryKeyMetadataTable | string | no | The optional table containing primary key structure and sequence associations. Can be expressed as 'schema.name' or just 'schema' (if the table name is 'GT_PK_METADATA'). Default none |
maxopenpreparedstatementsmaxOpenPreparedStatements | integer | no | Maximum number of prepared statements kept open and cached for each connection in the pool. Set to 0 to have unbounded caching, to -1 to disable caching. Default 50 |
geometrymetadatatablegeometryMetadataTable | string | no | The options table containing geometry column metadata information. |
usenativegeometryserializationuseNativeGeometrySerialization | boolean | no | Use native SQL Server serialization, or WKB serialization. Default is false. |
forcespatialindexusageviahintsforceSpatialIndexUsageViaHints | boolean | no | When enabled, spatial filters will be accompanied by a WITH INDEX sql hint forcing the usage of the spatial index. Default is false. |
tableHints | string | no | These table hints will be added to every select query. |
useNativePaging | boolean | no | Use native paging for SQL queries. For some sets of data, native paging can have a performance impact. |
trustServerCertificate | boolean | no | If true (or not set) the connection URL will include the TrustServerCertificate=true flag. Available since 2.6.9 |
Sub-tags
None
Content
None
Examples
...
Code Block | ||
---|---|---|
| ||
<spatial:spatialengine id="sqlserver"> <dbtype>sqlserver</dbtype> <host>sqlhost</host> <port>1434</port> <database>INTERNAL</database> <user>gis</user> <passwd>ENCSMAAFGJGAMGESBUK</passwd> <schema>GIS</schema> <minconnection>2</minconnections>minconnection> <validateconnections>true</validateconnections> </spatial:spatialengine> |
...
Code Block | ||
---|---|---|
| ||
<spatial:spatialengine id="sqlserver"> <dbtype>sqlserver</dbtype> <url>jdbc:sqlserver://sqlhost:1434;DatabaseName=INTERNAL</url> <user>gis</user> <passwd>ENCSMAAFGJGAMGESBUK</passwd> <schema>GIS</schema> <minconnection>2</minconnections>minconnection> <validateconnections>true</validateconnections> </spatial:spatialengine> |
Note |
---|
Note: Because of a bug in the |
Row Identifiers
Weave needs to be able to uniquely identify each row in a particular table, normally it would do this using the primary key of the table, but sometimes a primary key has not been specified so this information must be provided another way.
...
Code Block | ||
---|---|---|
| ||
<spatial:spatialengine id="sqlserver"> <dbtype>sqlserver</dbtype> <host>sqlhost</host> <port>1434</port> <user>gis</user> <passwd>hak0rz</passwd> <schema>GIS</schema> <minconnection>2</minconnections>minconnection> <validateconnections>true</validateconnections> <primarykeymetadata> <table schema="dbo" name="park" column="gid" policy="autogenerated"/> <table schema="dbo" name="property" column="park_id" type="autogenerated"/> <table schema="dbo" name="road" column="objectid" type="autogenerated"/> </primarykeymetadata> </spatial:spatialengine> |
...
Code Block | ||
---|---|---|
| ||
<spatial:spatialengine id="sqlserver"> <dbtype>sqlserver</dbtype> <host>sqlhost</host> <port>1434</port> <user>gis</user> <passwd>hak0rz</passwd> <schema>GIS</schema> <minconnection>2</minconnections>minconnection> <validateconnections>true</validateconnections> <geometrymetadata> <table schema="dbo" name="park" type="multipolygon" srid="28355" dimension="2"/> <table schema="dbo" name="property" type="polygon" srid="28355" dimension="2"/> <table schema="dbo" name="road" type="linestring" srid="28355" dimension="2"/> </geometrymetadata> </spatial:spatialengine> |
...