Skip to content

Examples Microsoft SQL Server

Rainer Stötter edited this page Apr 14, 2017 · 1 revision

check the prerequisites

Before you can use the examples you have to have installed the PHP library mssql.so (Install mssql)

The script file mk-sql-data-02-mssql.cmd

This script file runs against a Microsoft SQL Server database and creates relational test data.

Use the program "sqsh" in order to execute the SQL commands.

Run the example script and create the test data

./mk-sql-data.php --config examples/mk-sql-data-02-mssql.cmd

Import the test data into our database

echo "\\go" >> output/random-fk-mssql.sql
sqsh -U db2phpsite -P sql@2017 -S MSSQLSERVER  -D db2phpsite -a 1 -e -p < output/random-fk-mssql.sql

Clone this wiki locally