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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   5828 Views

Avatar
dendeffe

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?

Avatar
Taffy

Community Member, 119 Posts

25 September 2009 at 1:28am

Have a look @ the MSSQL module

http://silverstripe.org/microsoft-sql-server-database-module/
http://doc.silverstripe.org/doku.php?id=modules:mssql

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

Avatar
orion

Community Member, 20 Posts

9 February 2010 at 6:08pm

Dedeffe,

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

Thanks in advance

Avatar
Willr

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'] = 'server.hostname.com';
	$databaseConfig['username'] = 'username';
	$databaseConfig['password'] = 'password';
	$databaseConfig['database'] = 'SS_dbname';

Avatar
dendeffe

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.

Avatar
orion

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.

Avatar
ccburns

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).

http://www.silverstripe.org/data-model-questions/show/273096#post273096

Thanks in advance for the clarification.

Cheers,
Colin

Avatar
Natalia

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