Menu

Microsoft SQL Server Database

AJGrant

Microsoft SQL Server Database

If you wish to use a Microsoft SQL Server rather than using the default Built-In database then you should install and configure the Microsoft SQL database prior to installing and Configuring Hypersocket. You'll need to download and install Microsoft SQL Server, go to https://www.microsoft.com/en-us/sqlserver/editions/2012-editions/express.aspx

Run the Installation process, define the name of the database and the administrator access, authentication can be set to Windows login or use “mixed Mode” which allows for a system admin along with the Windows authentication (user, sa). Once installation completes close the installer.

There will now be a new application available to you named SQL Server Management Studio, launch this log in to the Database Engine with your administrator user (su) or a Windows user granted admin rights in the database..

The first step will be to create the hypersocket user, go to Security > Logins, right click Logins and select create new login. Set the Login name hypersocket, select SQL Server authentication and enter the and confirm the password hypersocket. Uncheck Enforce Password Policy if you do not want the password to be limited to the password policy. Select OK to create the user

Now to create the database, right click and select New Database, set the database name as hypersocket and set the owner as the hypersocket user. Select OK to complete creation.

The Hypersocket table has now been created,

One final action that must be run is to enable TCP listening on all interfaces that connections might be coming in from. Open the SQL Server Configuration Manager and expand the SQL Server Network Configuration menu, select Protocoles for INSTANCE NAME. In the right scection right click the TCP/IP option and select Enable, then open the properties and go to the IP Addresses tab, scroll to the bottom and set the TCP Port field under all IPs to 1433. Go to SQL Server Services, select the SQL Server (INSTANCE NAME), right click and select restart. Go to the server's Firewall settings and if an Inbound Exception is not already present then make a new one to allow incoming TCP connections on port 1433.

Now install Hypersocket.

For a Windows installation the user will automatically be prompted to setup their database as one of the final parts of the configuration. The user must set Hypersocket's operational ports and then the database to be used, here they will be able to select the SQL Server option and then provide the hostname and port of the server, the database name, and authentication details, if you followed the earlier example these would be:

Hostname – localhost
Port – 1443
Database – hypersocket
Username – hypersocket
Password - hypersocket

Finishing this configuration will complete the installation and you will be able to start the Hypersocket service.

If you are having difficulty with the Installer, or do not wish run it you can also manually change the configuration files to set the database in use. After installation completes and before the service is started you will need to go to the Hypersocket conf directory. Open the database.properties file as root in order to edit the content.

Delete the existing contents of the file and enter the following replacing the 5 variable entries with the relevant details for the SQL Server,

jdbc.driver.className=net.sourceforge.jtds.jdbc.Driver
jdbc.url=jdbc:jtds:sqlserver://${installer:databaseHost}:${installer:databasePort}/${installer:databaseName};ssl=request
jdbc.username=${installer:databaseUser}
jdbc.password=${installer:databasePassword}
jdbc.hibernate.dialect=org.hibernate.dialect.SQLServerDialect

The file will contain a number of placeholder values that need to be updated, each of these entries will need to be changed to use the actual details of the SQL Server database that Hypersocket will connect to:
If you used the earlier example then the text should now look like this:

jdbc.driver.className=net.sourceforge.jtds.jdbc.Driver
jdbc.url=jdbc:jtds:sqlserver://localhost:1443/hypersocket;ssl=request
jdbc.username=hypersocket
jdbc.password=hypersocket
jdbc.hibernate.dialect=org.hibernate.dialect.SQLServerDialect

Save the changes to the file and start the service, Hypersocket should now begin using the SQL Server database.


Related

Wiki: Server Installation

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.