# MS SQL Connection String Format

**URL:** <https://community.dreamfactory.com/t/ms-sql-connection-string-format/153>\
**Category:** Connecting to SQL\
**Created:** [July 10, 2014, 1:24pm UTC](https://community.dreamfactory.com/t/ms-sql-connection-string-format/153 "2014-07-10T13:24:58Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Mark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/mark/32/69_2.png) [@Mark](https://community.dreamfactory.com/u/Mark)\
**Post date:** [July 10, 2014, 2:04pm UTC](https://community.dreamfactory.com/t/ms-sql-connection-string-format/153/10 "2014-07-10T14:04:45Z")

</div>

**Follow these steps to create a connection to MS SQL Server:**

**note:** This connection is applicable to all Operating Systems.

**1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start by making sure everything on the SQL Server side is properly configured.**

Please follow this guide:

> **[Solving SQL Server Connection Problem - Visual Paradigm Know-how](https://knowhow.visual-paradigm.com/hibernate/solving-sql-server-connection-problem/)**
>
> Upon database modeling with Visual Paradigm, you always need to connect to the database server to perform generation of your database and reverse engineering of your ER model. However, you may encounter problem in connecting to the Microsoft SQL...

**2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Download the SQL Server connection drivers for PHP**

**a**.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **Download both the SQLSRV driver and also the PDO driver:**

i.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;php\_sqlsrv\_54\_ts.dll  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
ii.&nbsp;&nbsp;&nbsp;&nbsp;php\_pdo\_sqlsrv\_54\_ts.dll

**note:** This will be based on the PHP version you’re running (5.4)

**b.&nbsp;&nbsp;&nbsp;Put these files in PHP -\> EXT directory**

**3)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To enable these drivers, add the following lines to the end of you php.ini file, which is located in the PHP folder**

;sqlserver connection driver

extension=php\_sqlsrv\_54\_ts.dll

extension=php\_pdo\_sqlsrv\_54\_ts.dll

**4)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Restart Apace**

**5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Create a service within your DSP to connect to MS SQL Server.**

**a.** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connection strings are auto-generated based on host, port, and database name.

Send an email **[support@dreamfactory.com](mailto:support@dreamfactory.com)** if these steps don’t work.

---

_[View the full topic](https://community.dreamfactory.com/t/ms-sql-connection-string-format/153)._
