1. Install mssql module for PHP.

sudo apt-get install php5-sybase

In /etc/freetds/freetds.conf add these two lines (last two):

[global]      
;tds version = 4.2
tds version = 8.0
client charset = UTF-8



2. Duplicated the Mysql.php files in the following locations and changed everywhere it said Mysql to Mssql.

app/code/core/mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php -> Webinse_Mehrdata_Model_Mssql_Resource
lib/Varien/Db/Adapter/Pdo/Mysql.php -> Webinse_Mehrdata_Model_Mssql_Adapter
lib/Varien/Db/Statement/Pdo/Mysql.php -> Webinse_Mehrdata_Model_Mssql_Statement

3. Modify Webinse_Mehrdata_Model_Mssql_Resource:
Change class adapter to new Webinse_Mehrdata_Model_Mssql_Adapter:

/**
* Retrieve DB adapter class name
*
* @return string
*/
protected function _getDbAdapterClassName()
{
return 'Webinse_Mehrdata_Model_Mssql_Adapter';
}

4. Modify Webinse_Mehrdata_Model_Mssql_Adapter:

Changed everywhere it said Mysql to Mssql.

Add (for rewrite parent value 'mssql'):

/**
* PDO type.
*
* @var string
*/
protected $_pdoType = 'dblib';


Change class statement to new Webinse_Mehrdata_Model_Mssql_Statement:

/**
* Default class name for a DB statement.
*
* @var string
*/
protected $_defaultStmtClass = 'Webinse_Mehrdata_Model_Mssql_Statement';

Change _connect() method:

/**
* Creates a PDO object and connects to the database.
*
* @throws Zend_Db_Adapter_Exception
*/
protected function _connect()
{
if ($this->_connection) {
return;
}
if (!extension_loaded('pdo_dblib')) {
throw new Zend_Db_Adapter_Exception('pdo_dblib extension is not installed');
}
...
/** @link http://bugs.mysql.com/bug.php?id=18551 */
//$this->_connection->query("SET SQL_MODE=''");
if (!$this->_connectionFlagsSet) {
//$this->_connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
 //$this->_connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
$this->_connectionFlagsSet = true;
}
}

5. Modify app/etc/local.xml

<config>
    <global>
        ...
        <resources>
            ...
            <default_setup>
                <connection>
                    ...
                </connection>
            </default_setup>

            <webinse_mehrdata_database>
                <connection>
                    <host><![CDATA[192.168.0.1\SQL2014]]></host>
                    <username><![CDATA[sample_user]]></username>
                    <password><![CDATA[sample_pass]]></password>
                    <dbname><![CDATA[sample_base]]></dbname>
                    <model>mssql</model>
                    <type>webinse_mehrdata_pdo_dblib</type>
                    <active>1</active>
                </connection>
            </webinse_mehrdata_database>

6. Modify app/etc/config.xml

<config>
    <global>
        <models>
            <webinse_mehrdata>
                <class>Webinse_Mehrdata_Model</class>
                <resourceModel>webinse_mehrdata_resource</resourceModel>
            </webinse_mehrdata>
            <webinse_mehrdata_resource>
                <class>Webinse_Mehrdata_Model_Resource</class>
                <entities>
                    <product>
                        <table>MDS_Product</table>
                    </product>
                </entities>
            </webinse_mehrdata_resource>
        </models>
        <resources>
            <webinse_mehrdata_write>
                <connection>
                    <use>webinse_mehrdata_database</use>
                </connection>
            </webinse_mehrdata_write>
            <webinse_mehrdata_read>
                <connection>
                    <use>webinse_mehrdata_database</use>
                </connection>
            </webinse_mehrdata_read>
            <webinse_mehrdata_setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </webinse_mehrdata_setup>
        </resources>
        <resource>
            <connection>
                <types>
                    <webinse_mehrdata_pdo_dblib>
                        <adapter>Webinse_Mehrdata_Model_Mssql_Adapter</adapter>
                        <class>Webinse_Mehrdata_Model_Mssql_Resource</class>
                        <compatibleMode>1</compatibleMode>
                    </webinse_mehrdata_pdo_dblib>
                </types>
            </connection>
        </resource>

7. Add standard files of model:

Webinse_Mehrdata_Model_Product
Webinse_Mehrdata_Model_Resource_Product
Webinse_Mehrdata_Model_Resource_Product_Collection



8. Use standard Magento methods to load data:

Mage::getResourceModel('webinse_mehrdata/product_collection')->getItems();

Resources:

http://php.net/manual/ru/pdo.drivers.php
http://framework.zend.com/manual/1.12/ru/zend.db.adapter.html#zend.db.adapter.adapter-notes.pdo-mssql
http://askubuntu.com/questions/391961/how-to-install-pdo-dblib
http://forum.azmagento.com/how-to/how-do-i-install-magento-with-a-ms-sql-server-2008-database-63-nbsp--82533.html
http://fishpig.co.uk/magento/tutorials/create-external-database-connection/