Skip to content

Commit

Permalink
Merge pull request #31 from jelster/master
Browse files Browse the repository at this point in the history
Print MSSQL* events to stdout
  • Loading branch information
perrysk-msft authored Feb 8, 2017
2 parents 1639fbb + d712478 commit 2ca7528
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion windows/mssql-server-windows-express/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,9 @@ if ($null -ne $dbs -And $dbs.Length -gt 0){
}

Write-Verbose "Started SQL Server."
while ($true) { Start-Sleep -Seconds 3600 }
$lastCheck = (Get-Date).AddSeconds(-2)
while ($true) {
Get-EventLog -LogName Application -Source "MSSQL*" -After $lastCheck | Select-Object TimeGenerated, EntryType, Message
$lastCheck = Get-Date
Start-Sleep -Seconds 2
}
7 changes: 6 additions & 1 deletion windows/mssql-server-windows/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,9 @@ if ($null -ne $dbs -And $dbs.Length -gt 0){
}

Write-Verbose "Started SQL Server."
while ($true) { Start-Sleep -Seconds 3600 }
$lastCheck = (Get-Date).AddSeconds(-2)
while ($true) {
Get-EventLog -LogName Application -Source "MSSQL*" -After $lastCheck | Select-Object TimeGenerated, EntryType, Message
$lastCheck = Get-Date
Start-Sleep -Seconds 2
}

0 comments on commit 2ca7528

Please sign in to comment.