mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Ignore error at connection time on MS Azure servers without sysprocesses table. Fixes issue #3087.
This commit is contained in:
@ -1244,7 +1244,12 @@ begin
|
||||
// CurCharset := CharacterSet;
|
||||
// Log(lcDebug, 'Characterset: '+CurCharset);
|
||||
FIsUnicode := True;
|
||||
try
|
||||
// Gracefully accept failure on MS Azure (SQL Server 11), which does not have a sysprocesses table
|
||||
FServerUptime := StrToIntDef(GetVar('SELECT DATEDIFF(SECOND, '+QuoteIdent('login_time')+', CURRENT_TIMESTAMP) FROM '+QuoteIdent('master')+'.'+QuoteIdent('dbo')+'.'+QuoteIdent('sysprocesses')+' WHERE '+QuoteIdent('spid')+'=1'), -1);
|
||||
except
|
||||
FServerUptime := -1;
|
||||
end;
|
||||
// Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)
|
||||
// Apr 2 2010 15:53:02
|
||||
// Copyright (c) Microsoft Corporation
|
||||
|
Reference in New Issue
Block a user