Microsoft SQL Server Configuration for BrightServer

This article details the configuration of a Microsoft SQL Server instance (2005 and higher), such that it may be used as a data source for BrightServer.

Server Authentication

Out of the box, a simple connection to Microsoft SQL Server products may be defined for BrightServer via SQL Server authentication. This setting must be activated under the server instance's properties panel under the 'Security' node. Under the Server authentication heading, SQL Server and Windows Authentication must be selected for the connection.

This setting may also be configured when installing a new server instance.

Provided they have access, user credentials configured to use SQL Server Authentication under the 'Security' node of the SQL Server instance, or any SQL user's credentials may be used when specifying connections to databases in BrightBuilder. Windows/Integrated Authentication may also be used to connect to the server, by using the checkbox in the dialog.

For more complex connections, including those which utilise

In versions prior to 9.1, specifying a Microsoft SQL Server JDBC Connection URL with the Custom database type may be used to define the connection as using Windows/Integrated Authentication.

In the above dialog, Windows Authentication is used for the database on localhost. The entries are as follows:

In addition to this custom string, to support Windows Authentication, the folder containing the sqljdbc_auth.dll file for the correct architecture must be registered as a java.libary.path system property. By default, this file is bundled with BrightServer for its respective architecture, located in the 'lib' folder. The following flag (in green) must be present when starting BrightServer from the command prompt/run.bat:

... -Dserver.dir=%DIRNAME% -Djava.library.path=lib -cp .;conf\log4j.xml;lib\* ...

If running BrightServer as a service, the following line in green must also be present in the wrapper.conf file:

# Java Library Path (location of Wrapper.DLL or libwrapper.so)

wrapper.java.library.path.1=lib

wrapper.java.library.path.2=../lib

These flags are pre-configured automatically in BrightServer 9.1 and above, but must be added manually in versions prior. After adding the flags, the change will take effect the next time BrightServer is started.

For more information, please refer to the following articles:

 

TCP/IP Settings

Connections to SQL Server instances by BrightServer is performed via the JDBC library, which require TCP/IP protocols to be enabled on the instance. These settings are disabled by default, and must thus be enabled for any new server instance.

A port number must also be configured, which will also be used when connecting to the instance.

Both these settings may be configured using the SQL Server Configuration Manager, using the steps below:

To enable TCP/IP:

Open SQL Server Configuration Manager, then under the 'SQL Network Configuration', select the SQL Server instance name which will be used with BrightServer.

In the right panel, a list of protocols for the instance will display. Right click TCP/IP in this panel, then select 'Enable'.

Proceed to double click this TCP/IP row, which will open the properties panel.

Note the value of the 'Listen All' item:

To configure ports:

In the TCP/IP Properties dialog box, under the IP Addresses tab, several IP addresses appear in the format IP1, IP2, up to IPAll. One of these are for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. Modify each item as follows:

After enabling the TCP/IP under server protocols, and configuring the ports, restart the server. This may be performed by locating the server instance under 'SQL Server Instances' and right clicking on it and selecting 'Restart'.

System Databases

Microsoft SQL Server instances' databases may be used to configure BrightServer, in place of the default internal configuration. This process is detailed under the Server Settings > System Databases chapter of BrightServer.

BrightServer requires these system databases to be configured to support reading during database transactions. By default, this is not enabled for MSSQL2005 and above. To enable this feature, the following query for the database must be run on the SQL Server instance:

ALTER DATABASE dbName
SET READ_COMMITTED_SNAPSHOT ON
GO

 

In SQL Server 2012 and above, this setting may be set when creating the database, and is exposed via the 'Options' tab of the database's properties panel. If this flag is turned off, simultaneous synchronisations from users on BrightServer will not be possible, and there will be delays in synchronising large sets of data.

Further Information

For further information, please consult the Microsoft SQL Server Knowledge Base articles.