зеркало из https://github.com/microsoft/msphpsql.git
Modified some BVT tests to be configurable (#1106)
This commit is contained in:
Родитель
8bb6cef33c
Коммит
fb335c0b0d
|
@ -83,8 +83,8 @@ install:
|
||||||
}
|
}
|
||||||
- echo Downloading MSODBCSQL 17
|
- echo Downloading MSODBCSQL 17
|
||||||
# AppVeyor build works are x64 VMs and 32-bit ODBC driver cannot be installed on it
|
# AppVeyor build works are x64 VMs and 32-bit ODBC driver cannot be installed on it
|
||||||
- ps: (new-object net.webclient).DownloadFile('https://download.microsoft.com/download/E/6/B/E6BFDC7A-5BCD-4C51-9912-635646DA801E/en-US/msodbcsql_17.4.2.1_x64.msi', 'c:\projects\msodbcsql_17.4.2.1_x64.msi')
|
- ps: (new-object net.webclient).DownloadFile('https://download.microsoft.com/download/E/6/B/E6BFDC7A-5BCD-4C51-9912-635646DA801E/en-US/17.5.2.1/x64/msodbcsql.msi', 'c:\projects\msodbcsql.msi')
|
||||||
- cmd /c start /wait msiexec /i "c:\projects\msodbcsql_17.4.2.1_x64.msi" /q IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL
|
- cmd /c start /wait msiexec /i "c:\projects\msodbcsql.msi" /q IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL
|
||||||
- echo Checking the version of MSODBCSQL
|
- echo Checking the version of MSODBCSQL
|
||||||
- reg query "HKLM\SOFTWARE\ODBC\odbcinst.ini\ODBC Driver 17 for SQL Server"
|
- reg query "HKLM\SOFTWARE\ODBC\odbcinst.ini\ODBC Driver 17 for SQL Server"
|
||||||
- dir %WINDIR%\System32\msodbcsql*.dll
|
- dir %WINDIR%\System32\msodbcsql*.dll
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once('connect.inc');
|
||||||
|
|
||||||
// Set SQL server + user + password
|
// Set SQL server + user + password
|
||||||
$serverName = getenv('MSSQL_SERVERNAME') ?: "sql-2k14-sp2-1.galaxy.ad";
|
$serverName = getenv('MSSQL_SERVERNAME') ?: $server2;
|
||||||
$username = getenv('MSSQL_USERNAME') ?: "sa";
|
$username = getenv('MSSQL_USERNAME') ?: $uid;
|
||||||
$password = getenv('MSSQL_PASSWORD') ?: "Moonshine4me";
|
$password = getenv('MSSQL_PASSWORD') ?: $pwd;
|
||||||
|
|
||||||
// Generate unique DB name, example: php_20160817_1471475608267
|
// Generate unique DB name, example: php_20160817_1471475608267
|
||||||
$databaseName = "php_" . date("Ymd") . "_" . round(microtime(true)*1000);
|
$databaseName = "php_" . date("Ymd") . "_" . round(microtime(true)*1000);
|
||||||
|
|
||||||
// Generic table name example: php_20160817_1471475608267.dbo.php_firefly
|
// Generic table name example: php_20160817_1471475608267.dbo.php_table
|
||||||
$tableName1 = $databaseName.".dbo.php_firefly1";
|
$tableName1 = $databaseName.".dbo.php_table1";
|
||||||
$tableName2 = $databaseName.".dbo.php_firefly2";
|
$tableName2 = $databaseName.".dbo.php_table2";
|
||||||
|
|
||||||
$connectionInfo = array( "Database"=>"$databaseName", "username"=>"$username", "password"=>"$password" );
|
$connectionInfo = array( "Database"=>"$databaseName", "username"=>"$username", "password"=>"$password" );
|
||||||
$conn = sqlsrv_connect( $serverName, $connectionInfo );
|
$conn = sqlsrv_connect( $serverName, $connectionInfo );
|
||||||
|
|
|
@ -4,6 +4,8 @@ $databaseName = 'TARGET_DATABASE';
|
||||||
$uid = 'TARGET_USERNAME';
|
$uid = 'TARGET_USERNAME';
|
||||||
$pwd = 'TARGET_PASSWORD';
|
$pwd = 'TARGET_PASSWORD';
|
||||||
|
|
||||||
|
$server2 = 'ANOTHER_SERVER';
|
||||||
|
|
||||||
// RevisionNumber in SalesOrderHeader is subject to a trigger incrementing it whenever
|
// RevisionNumber in SalesOrderHeader is subject to a trigger incrementing it whenever
|
||||||
// changes are made to SalesOrderDetail. Since RevisionNumber is a tinyint, it can
|
// changes are made to SalesOrderDetail. Since RevisionNumber is a tinyint, it can
|
||||||
// overflow quickly if the BVT tests often run. So we change it directly here first
|
// overflow quickly if the BVT tests often run. So we change it directly here first
|
||||||
|
|
|
@ -10,8 +10,9 @@ $conn = sqlsrv_connect( $server, $connectionInfo);
|
||||||
|
|
||||||
/* Connect to the local server using Windows Authentication and
|
/* Connect to the local server using Windows Authentication and
|
||||||
specify the AdventureWorks database as the database in use. */
|
specify the AdventureWorks database as the database in use. */
|
||||||
$serverName = "sql-2k14-sp1-1.galaxy.ad";
|
$serverName = $server2;
|
||||||
$connectionInfo = array( "Database"=>"AdventureWorks2014", "UID"=>"sa", "PWD"=>"Moonshine4me", 'MultipleActiveResultSets'=> false);
|
$connectionInfo = array( "Database"=>$databaseName, "UID"=>$uid, "PWD"=>$pwd, 'MultipleActiveResultSets'=> false);
|
||||||
|
|
||||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||||
if( $conn === false )
|
if( $conn === false )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/* Connect to the local server using Windows Authentication and
|
/* Connect to the local server using Windows Authentication and
|
||||||
specify the AdventureWorks database as the database in use. */
|
specify the AdventureWorks database as the database in use. */
|
||||||
$serverName = "sql-2k14-sp1-1.galaxy.ad";
|
$serverName = $server2;
|
||||||
$connectionInfo = array( "Database"=>"AdventureWorks2014", "UID"=>"sa", "PWD"=>"Moonshine4me");
|
$connectionInfo = array( "Database"=>$databaseName, "UID"=>$uid, "PWD"=>$pwd);
|
||||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||||
if( $conn === false )
|
if( $conn === false )
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,11 +4,8 @@ server side cursor specified when querying
|
||||||
|
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
//$server = "sql-2k14-sp1-1.galaxy.ad";
|
|
||||||
//$conn = sqlsrv_connect( $server, array( "Database" => "tempdb", "UID"=>"sa", "PWD"=>"Moonshine4me"));
|
|
||||||
|
|
||||||
require('connect.inc');
|
require('connect.inc');
|
||||||
$connectionInfo = array( "Database"=>"$databaseName", "UID"=>"$uid", "PWD"=>"$pwd");
|
$connectionInfo = array( "Database"=>$databaseName, "UID"=>$uid, "PWD"=>$pwd);
|
||||||
$conn = sqlsrv_connect( $server, $connectionInfo);
|
$conn = sqlsrv_connect( $server, $connectionInfo);
|
||||||
if ( $conn === false ) {
|
if ( $conn === false ) {
|
||||||
die( print_r( sqlsrv_errors(), true ));
|
die( print_r( sqlsrv_errors(), true ));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче