Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Better document SQL Server settings in config/database.php #9459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion 14 database.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,19 @@ DB_FOREIGN_KEYS=true
<a name="mssql-configuration"></a>
#### Microsoft SQL Server Configuration

To use a Microsoft SQL Server database, you should ensure that you have the `sqlsrv` and `pdo_sqlsrv` PHP extensions installed as well as any dependencies they may require such as the Microsoft SQL ODBC driver.
Ensure you have the [`sqlsrv` and `pdo_sqlsrv` PHP extensions installed](https://learn.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac), along with the necessary Microsoft SQL ODBC driver. Use the `DATABASE_URL` in the `.env` file for easy configuration of your Microsoft SQL Server database connection in a Laravel environment.

Example `DATABASE_URL`:

```
DATABASE_URL="sqlsrv:Server=your_server_address;Database=your_database_name;Encrypt=true;TrustServerCertificate=false;LoginTimeout=30;App=your_app_name;MultipleActiveResultSets=false;MultiSubnetFailover=True"
```

(Due to a bug do not put Database= as your first item of the connection string.)

This connection string format allows inclusion of various Microsoft SQL Server options such as encryption, trust server certificate, login timeout, application name, Multiple Active Result Sets (MARS), and MultiSubnetFailovere.

For a detailed list of available connection string options, refer to the [Microsoft SQL Server documentation on connection strings](https://learn.microsoft.com/en-us/sql/connect/php/connection-options?view=sql-server-ver16#table-of-connection-options).

<a name="configuration-using-urls"></a>
#### Configuration Using URLs
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.