The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

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.

asked 17 Dec '09, 15:56

Reimer%20Pods's gravatar image

Reimer Pods
4.2k334583
accept rate: 11%

edited 17 Dec '09, 16:12

Zote's gravatar image

Zote
1.7k364050

3

IMO the BEST tests are (a) pulling the power cord and (b) pulling the network caple. The most FUN tests involve water hoses, firearms and so forth... but I never get to have any fun.

(18 Dec '09, 19:37) Breck Carter

...network cable...

(18 Dec '09, 19:38) Breck Carter
1

... I was thinking about a wood-chopper's axe, but that wasn't in the budget (neither a new server)

(22 Dec '09, 09:59) Reimer Pods
1

some of us were around back when Novell dramatically demonstrated their high availability server at a trade show... with 20 workstations scrolling data from the server, the salesman used an axe to chop the rope suspending a HUGE blacksmith's anvil over one server. There was crash, bang, smoke and fire. And the workstations breifly paused while failing over, then resumed full speed scrolling. Pretty hard to top that demo!

(03 Feb '10, 16:26) Bill Aumen

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.

permanent link

answered 21 Dec '09, 17:16

Bruce%20Hay's gravatar image

Bruce Hay
2.6k1510
accept rate: 48%

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.

permanent link

answered 17 Dec '09, 16:00

Reimer%20Pods's gravatar image

Reimer Pods
4.2k334583
accept rate: 11%

edited 05 Nov '11, 20:55

Graeme%20Perrow's gravatar image

Graeme Perrow
8.6k373110

If you might come to the conclusion that I didn't ask a "real" question, but wanted to report a bug in a more subtle way, you're probably right :).

(17 Dec '09, 16:30) Reimer Pods

I'm intested how you are going to keep the answer valid (i.e. for newer builds) if this particular bug will get fixed:)

(17 Dec '09, 17:55) Volker Barth

+1 Crashed here too.

(17 Dec '09, 19:44) Zote

@Volker: this is the third time I encountered a statement that could regularily crash the engine. If this one is fixed, I'm hoping to come up with a new one (well, in fact rather fearing than hoping ...)

(18 Dec '09, 11:16) Reimer Pods

OS: Ubuntu10.4 AMD64 / Debian5 AMD64; SQL Anywhere: SA11.0.1.2645 64bit

for shut down server, run query in java isql:

 select * from test_table where id=1;
 select * from test_table where id=2;
 select * from test_table where id=1
 select * from test_table where id=2

ps: case id 11695638

permanent link

answered 05 Nov '11, 13:50

Marsel's gravatar image

Marsel
185256
accept rate: 33%

Is the semicolon deliberately omitted in the 3rd row?

That might turn this into a Transact-SQL statement batch (i.e. it will return 2 result sets) - though a crash then would surely look like a bug...

(05 Nov '11, 19:02) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×137
×90
×54
×46
×35

question asked: 17 Dec '09, 15:56

question was seen: 1,481 times

last updated: 05 Nov '11, 20:55