Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

External MSSQL database

Go to End

9 Posts   4596 Views


Community Member, 135 Posts

25 September 2009 at 12:47am

I have a client who has data in an external MSSQL database. Has anyone already succesfully done this?
Running SilverStripe on MySQL and getting some extra data from a MSSQL database?


Community Member, 119 Posts

25 September 2009 at 1:28am

Have a look @ the MSSQL module

Its not stable and I have not used it so I'm not sure if it'll serve your requirements or not.


Community Member, 20 Posts

9 February 2010 at 6:08pm


Did this work for you? If so can you please show me your method?

Thanks in advance


Forum Moderator, 5523 Posts

10 February 2010 at 11:31am

We have used external MSSQL databases for most of our development. Just need to include the MSSQL server details in your_config file

	global $databaseConfig;
	$databaseConfig['type'] = 'MSSQLDatabase';
	$databaseConfig['server'] = '';
	$databaseConfig['username'] = 'username';
	$databaseConfig['password'] = 'password';
	$databaseConfig['database'] = 'SS_dbname';


Community Member, 135 Posts

10 February 2010 at 12:16pm

The project I needed that for didn't end go through in the end. So I don't have any experience with it yet. Good to see that it's working though.


Community Member, 20 Posts

10 February 2010 at 12:19pm

We will be connecting to a mysql database for the silverstripe cms and also to an external ms sql database to retrieve other info. Will I be able to connect to two different databases?

Than you for your help.


Community Member, 79 Posts

10 April 2010 at 7:25pm

Hi Willr,

Just to clarify, you are saying that you have run the core SilverStripe installation on a MySQL database but been able to connect to an external MSSQL database to pull in new data?

Just reading this post as well which is suggesting this is more easily possible in 2.4 (which is what I am using).

Thanks in advance for the clarification.



Community Member, 1 Post

15 February 2011 at 11:03am

I'm are trying to setup connection with MS SQL server 2005 as a second database. It works fine on my local Windows machine with WAMP, but on Linux server I get error
mssql_query(): WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?'). (severity 16)
I've read the suggestions on other forums and recommendation is to setup charset to UTF8.
On new Silverstirpe download there is line ini_set('mssql.charset', 'utf8'); in MSSQLDatabase.php file. But when I copy this file to the server, I get
Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.

When run database query from php page outside if Silverstripe everything connection works.
Please help.

Go to Top