SQL Server Settings

When using the SQL Server database, by default the server settings are held in the Server record under the Application record. However there may be times when you want to have this in a configuration file, so you can more easily override the settings for each deployment without changing what's in WorkflowFirst.

One example is when installing WorkflowFirst Professional, which uses SQL Server Express on the local machine by default. You can create this file to override that.

To set the SQL Server to use, you create a file called sqlserver.cfg in your application's Files folder. For WorkflowFirst Professional you will put the sqlserver.cfg file in the Apps\WorkflowFirstPro\Files folder in your installation folder.

This file is an INI-style file that can contain settings in the format of field=value, separated by carriage returns. The server application must be restarted after changing this file.

An example of the sqlserver.cfg file can be found here.

The following settings can be included in the file:

Server

Overrides the host name of the server where the SQL Server resides. This is specified as a server name, a backslash, and the instance name, if one is configured.

Port

The port to use to connect to the SQL Server, if not using the default port.

UserID and Password

Overrides the UserID and password login to use when accessing the SQL Server.

Note: To obfuscate the password, prefix it with # and put the value as base64 encoded. (Version 4.3 onward)

UseExistingLogin

If set to True, windows authentication will be used to access the SQL Server, and the UserID and Password will be ignored.

Database

Overrides the name of the database to use. The database will be created if it does not exist.  Version 4.4.1 onwards.

DocumentRootFolder

Optional. Overrides the folder path where the document library is stored.

TablePrefix

Specifies a prefix to add to all tables in the database, for instances where you wish to share one database with multiple applications.

DisableUpgrades

If this is set to True, this server instance will not attempt to make any changes to the database structure. This is important if you have redundant (secondary or slave) web servers pointing to the same database. Only one server should be updating the database structure at startup, otherwise they will conflict.

OverrideConnectionString

This allows you to override the SQL Server connection string entirely. All other options will then be ignored. Version 4.4 onward.

Keep in mind that if you put this into your WorkflowFirstPro or WorkflowFirst folder, it will copy it to your application when it first publishes. Subsequently it will not overwrite the file on a publish.


Next Topic:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM