Integrate Openfire with MS SqlServer

I am trying to configure my Openfire Server with an instance of MS SQL Server 2008.

I must admit that while I have used Sql Server extensively I have been successfully in using it in spite of myself as I am certainly not an expert (bottom line, you should not assume that I already made any obvious configurations). I also apologize in advance if there is anything so obviously wrong that this is a waste of time question.

My Basic SQL Information/Configuration

  • Server name: PALBU\PALBUSQL
  • Authentication: Sql Server Authentication
  • Login: sa
  • Password: mypassword
    (the database I am trying to use it named ‘openfire’)

Here is my Openfire Settings

  • Domain: palbu

  • Admin Console Port: 9090

  • Secure Admin Console Port: 9091
    I selected ‘Standard Database Connection’ under 'Database Settings’Database Settings - Standard Connection

  • Database Driver Presets: Microsoft SQLServer

  • JDBC Driver Class: net.sourceforge.jtds.jdbc.Driver

  • Database URL: jdbc:jtds:sqlserver://PALBU/opemfire;appName=jive

  • Username: openfireUser

  • Password: mypassword

  • Minimum Connections: 5

  • Maximum Connections: 25

  • Connection Timeout: 1.0 Days
    When I try to connect I get an error message 'A connection to the database could not be made You may view the error message error.log’Here is the Output from the error.log file

2011.07.12 11:10:43 Prototype java.sql.SQLException: Network error IOException: Connection refused: connect at net.sourceforge.jtds.jdbc.ConnectionJDBC2.( at net.sourceforge.jtds.jdbc.ConnectionJDBC3.( at net.sourceforge.jtds.jdbc.Driver.connect( at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConn at org.logicalcobwebs.proxool.Prototyper.buildConnection( at org.logicalcobwebs.proxool.Prototyper.sweep( at Caused by: Connection refused: connect at Method) at Source) at Source) at Source) at Source) at Source) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3( 04) at net.sourceforge.jtds.jdbc.SharedSocket.( at net.sourceforge.jtds.jdbc.ConnectionJDBC2.( … 8 more

Some Additiona Information that may be useful.

SQL is configured to ‘Accept remote connections to this server’ and the port number in use is the default. There is a firewall in use but Openfire and SQL are on the same machine right now and the firewall has been disabled.

I tried Telneting to localhost at port 1443 using PuTTy but no connection was able to be made. In fact PuTTy just closed. (Not sure if this was the right way to check using Telnet I just don’t know any better not that experienced with server issues)

Also I completed the steps in the Openfire Database Installtion Guide as follows.

  1. Create a new database using Enterprise Manager if you do not already have a database you want to use. You may wish to name the database “openfire”.
  2. Create a user to access the database if you do not already have one you’d like to use. Consider making the default database for the user be the one you created in step 1.
  3. Open the Query Analyser and connect to the server.
  4. Select the database you want to use for Openfire from the DB drop down (the one you created in step 1 if you’re using a new database).
  5. Open the openfire_sqlserver.sql file.
  6. Press F5 to run the script. The script will run and create the necessary tables.
  7. Proceed to the Openfire setup tool and use the appropriate JDBC settings when prompted.

If anyone could help explain what I might be doing wrong it would be greatly appreciated.


I am having similar issues. I downloaded and succesfully installed Openfire 3.7.1 for Windows. It runs. But, I cannot successfully configure the use of a local SQL Server instance via the admin panel. It is a SQL Server 2008 R2 (Developer Edition, x64) installation.

Followed all the steps you have with similar results.

Have you since, or has anyone at all, got Openfire working with SQL Server 2008?

Of course, no sooner than I post…

In SQL Server Configuration Manager, make sure that protocols are enabled and listening.

In my case, I went to SQL Server Configuration Manager --> SQL Server Network Configuration --> Protocols for MSSQLSERVER, and enabled Shared Mameory, Named Pipes and TCP/IP.