While testing High Availability I want to simulate a failing primary server. Killing the process via task manager would work, but I just wanted a more elegant solution using plain SQL.
|
|
|||||||||
|
|
|
To terminate a server using a SQL statement, you might use xp_cmdshell() together with a command that kills a process (e.g. taskkill on Windows). The issue that caused the crash with the above CREATE VIEW statement will be fixed in build 11.0.1.2367. |
||
|
|
|
|
Just submit create view ConnectionInfo as select Number as ConnNr, Name, Userid, DBNumber, LastReqTime, ReqType, CommLink, NodeAddr,LastIdle, BlockedOn, LockName, UncmtOps, (select value from sa_conn_properties(ConnNr) where PropName= 'PrepStmt' ) PrepStmt, (select convert(integer,isnull(value,0)) from sa_conn_properties(ConnNr) where PropName= 'CursorOpen' ) CursorOpen from sa_conn_info() This will crash the server instantly (until the bug will be fixed). I'm using 11.0.1.2352. |
||||||||
|