forked from tediousjs/tedious-connection-pool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
191 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: "{build}" | ||
|
||
services: mssql2014 | ||
|
||
environment: | ||
matrix: | ||
- nodejs_version: "0.10" | ||
- nodejs_version: "0.12" | ||
- nodejs_version: "4" | ||
- nodejs_version: "5" | ||
- nodejs_version: "6" | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
install: | ||
- ps: Install-Product node $env:nodejs_version | ||
- cmd: npm install | ||
|
||
cache: node_modules | ||
build: off | ||
|
||
before_test: | ||
- ps: Start-Process enable-sql-server-tcp-ip.ps1 | ||
|
||
test_script: | ||
- cmd: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null | ||
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null | ||
|
||
$instanceName = 'sql2014' | ||
$computerName = $env:COMPUTERNAME | ||
$smo = 'Microsoft.SqlServer.Management.Smo.' | ||
$wmi = New-Object ($smo + 'Wmi.ManagedComputer') | ||
|
||
# For the named instance, on the current computer, for the TCP protocol, | ||
# loop through all the IPs and configure them to use the standard port | ||
# of 1433. | ||
$uri = "ManagedComputer[@Name='$computerName']/ ServerInstance[@Name='$instanceName']/ServerProtocol[@Name='Tcp']" | ||
$Tcp = $wmi.GetSmoObject($uri) | ||
ForEach ($ipAddress in $Tcp.IPAddresses) | ||
{ | ||
$ipAddress.IPAddressProperties["TcpDynamicPorts"].Value = "" | ||
$ipAddress.IPAddressProperties["TcpPort"].Value = "1433" | ||
} | ||
$Tcp.IsEnabled = $true | ||
$Tcp.Alter() | ||
|
||
# Start services | ||
Set-Service SQLBrowser -StartupType Manual | ||
Start-Service SQLBrowser | ||
Restart-Service "MSSQL`$$instanceName" |
Oops, something went wrong.