Microsoft SQL Server Non-Spatial Writer Parameters

About Database Connections

Database formats include a Database Connection parameter that defines and stores authentication information. For general information about sharing database connections, please see Using Database Connections. Using Database Connections.

Note that Database Connection parameters differ slightly, depending on context and/or database format.

Connection

From the Connection parameter in a database format, you can do one of the following:

  • Select an existing, previously defined connection. See the section Reusing a Database Connection in Using Database Connections
  • Select Add Database Connection to define a new connection. See database-specific parameters below, as well as the section Adding a Database Connection in a Workspace in Using Database Connections. The new connection can be made visible only to the current user, or can be shared among multiple users.

Connection Parameters (Add Database Connection dialog)

Server

The host name of the Microsoft SQL Server or Azure SQL Database. (It is not necessary to specify a port if a default configuration is used.)

If you have configured your Microsoft SQL Server database to use a non-standard port number, you can specify this port here.

The correct syntax is:

<Host>[\<Instance>][:<port>]

Database

To initiate a database connection, enter (or browse for) the database name.

Authentication

  • SQL Server Authentication – Select this option to proceed with specifying login credentials through the Username and Password parameters.
  • Windows Authentication – Select this option when connecting through a Windows user account, and the database can validate the account name and password using the Windows principal token in the operating system. Since the user account is retrieved by Windows, the Username and Password parameters are ignored.

Username and Password

Enter the username and password to access the service.

Encrypt Connection

Note   This parameter is not present in the Azure SQL Database reader and writer. The Azure SQL Database reader and writer will always request Secure Sockets Layer (SSL) encrypted connections.

When selected, this parameter requests Secure Sockets Layer (SSL) encryption for the connection. If the server does not have a certificate trusted by the client machine, the connection will fail. Otherwise, data will be encrypted before traveling over the network. There are multiple ways to trust a server certificate on a client machine.

If this parameter is not selected, encryption behavior will be determined by encryption properties set for SQL Server Native Client, and for SQL Server.

Tip   When Encrypt Connection is selected, please provide a fully qualified Server name. For example, a server named safe-sql-server might have a fully qualified name of safe-sql-server.dev.safe. This fully qualified name should be an exact match for the server name on the trusted certificate.

Multi-Subnet Failover

Enable this option if you are connecting to a SQL Server that has been configured for High Availability (HA).

Advanced

Bulk Insert

When set to Yes, this parameter changes the insert mode from feature-by-feature to batch. This can result in anywhere from six to ten times greater insertion speed. The compromise is reduced granularity in errors, with one invalid feature potentially causing the failure of a complete transaction.

Note  The speed of the bulk insert will increase with transaction size (fewer transactions = faster insert). Larger transaction sizes also mean that if a transaction fails, there will be more rows to re-insert.

In Microsoft Azure SQL Database Non-Spatial (MSSQL_AZURE), Bulk Insert is very important, as the insertion speed increase is on the order of 300x. However, for Bulk mode to work with Azure, the Server and Username parameters must be changed:

  • Server: tcp:SERVERNAME.database.windows.net
  • Username: USERNAME@SERVERNAME

The remaining parameters can be left unchanged.

Note   Bulk Insert (which is set to Yes by default) invalidates foreign key constraints in order to improve loading speed. You can set this parameter to No in the Navigator, or repair foreign key constraints after writing.

Features Per Transaction

This parameter sets the number of features to be placed in each transaction before a transaction is committed to the database.

A default value of 500 is used as the transaction interval.

If this parameter is set to 0, then feature-based transactions are used. As each feature is processed by the writer, it is checked for an attribute called fme_db_transaction. The value of this attribute specifies whether the writer should commit or roll back the current transaction.

The value of the attribute can be one of COMMIT_BEFORE, COMMIT_AFTER, ROLLBACK_AFTER or IGNORE. If the fme_db_transaction attribute is not set in any features, then the entire write operation occurs in a single transaction.