Go to file
Ingo Schommer 61b27ce835 Added composer.json 2013-01-03 21:42:05 +01:00
code BUGFIX Includes all children of a class when building the query for SearchEngine, not only the ones that have a table in the db (ie if the Page class doesn't have a $db property, pages with this page type would be excluded from the search results) 2013-01-02 22:58:09 +01:00
README.md MINOR Tidy 2012-03-05 18:31:04 +13:00
_config.php MINOR Removed whitespace from _config 2010-05-13 12:26:07 +00:00
composer.json Added composer.json 2013-01-03 21:42:05 +01:00

README.md

SQL Server Database Module

Allows SilverStripe to use SQL Server 2008 or SQL Server 2008 R2 database servers.

More information can be found on the extension page at silverstripe.org.

Maintainer Contact

  • Sean Harvey (Nickname: halkyon) <sean (at) silverstripe (dot) com>

Requirements

Note: SQL Server 2008 R2 Express can also be used which is provided free by Microsoft. However, it has limitations such as 10GB maximum database storage.

Installation

The easiest way to get up and running with SQL Server on SilverStripe is using the installer:

Troubleshooting

Q: SQL Server resides on a remote host (a different machine) and I can't connect to it from mine.

A: Please ensure you have enabled TCP access using SQL Server Configuration Manager and opened firewall ports.

Q: I just installed SQL Server, but it says that it cannot connect

A: Sometimes SQL Server will be installed as a non-default instance name, e.g. "SQLExpress" instead of "MSSQLSERVER" (the default.) If this is the case, you'll need to declare the instance name when setting the server in your PHP database configuration. For example: (local)\SQLExpress. The first part before the slash indicates the server host, or IP address. In this case, (local) indicates localhost, which is the same server PHP is running on. The second part is the SQL Server instance name to connect to.

Q: I'm getting unicode SQL Server errors connecting to SQL Server database

A: If you are using FreeTDS make sure you're using TDS version 8.0 in /etc/freetds/freetds.conf (or wherever it's installed). If on Windows, ensure you use the SQL Server Driver for PHP and NOT the mssql drivers provided by PHP.

Q: Using FreeTDS I can't connect to my SQL Server database. An error in PHP says the server doesn't exist

A: Make sure you've got an entry in /etc/freetds/freetds.conf (or wheverever it's installed) that points to your server. For example:

[myserver]
   host = myserver.mydomain.com
   port = 1433
   tds version = 8.0

Then you can use "myserver" (the bit in square brackets above) as the server name when connecting to the database.

Alternatively, if you don't want to keep adding more entries to the freetds.conf to nominate more SQL Server locations, you can instead use the full the host/ip and port combination, such as "myserver:1433" (1433 being the default SQL Server port.) and ensure the "tds version = 8.0" is set globally in the freetds.conf file.

Note: Use tabs not spaces when editing freetds.conf, otherwise it will not load the configuration you have specified!

Note: Certain distributions of Linux use SELinux which could block access to your SQL Server database. A rule may need to be added to allow this traffic through.