Satveer Bhantoo
Satveer Bhantoo

Reputation: 81

How to make SQL server 2012 work with php?

How do I connect SQL server 2012 with php 5.6.3?

Like in mysql I use phpMyAdmin, how is it done in SQL server 2012?

Where do I have to save the database?

Upvotes: 1

Views: 1123

Answers (2)

kba
kba

Reputation: 4310

Connecting to database

If you are on windows, use sqlsrv extension and do not forget install SQL Server Native Client 2012. sqlsrv supports also PDO - just use right connection string. On unix try to use mssql or odbc extension.

phpMyAdmin alternatives

SSMS (SQL Server Management Studio 2012) - tool that you can use but it is more for database administrators than developers.

SSDT (SQL Server Development Tool) - similar to SSMS but it is also capable to creating snapshots, comparing schemas, data-tier apps and much more. It is a part of Visual Studio or as standalone app.

Administration

SQL Server is a little bit more sofisticated database than MySQL. Database files are stored in Program Files by default (.mdf for database files, .ldf for transactions log). All administrator tasks, that you want to make as developer, could be done from SSMS (not from configuration file).

Upvotes: 1

Mahadev
Mahadev

Reputation: 856

Nothing changes much while using different database service.

You can use Microsoft SQL Server Management Studio 2012 to create and manage your database.

Databases are automatically saved to SSMS's ( SQL Server Management Studio ) default location. But they can be easily transferred to different location by copying .mdf and .ldf files.

While using php ( or any other language ), make sure to keep running SQL Server Service and use proper connection String to connect to database.

Upvotes: 1

Related Questions