Showing posts with label answers. Show all posts
Showing posts with label answers. Show all posts

Wednesday, March 28, 2012

killing sqlservr.exe from sqlclr code

I keep getting different answers from different people on regarding if you can or cannot kill the hosting sql server process with an unsafe assembly. Can you do this? If so could you please attach a sample demonstrating this?

Thanks,

Derek

Uhh, delicate question. Sure Microsoft did everything to prevent this. I know that in beta this was sort of unstable, but right now I have no clue how to do this.
If someone has an example to do this, this should be reported as a bug to Microsoft in order to prevent this. But I would assume that the CLR hosting process is quite stable right now.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||There are many ways to kill sql server. If we allow PInvoke or unsafe code, then the possibilities are endless. There is no way to prevent a user from calling TerminateProcess with PInvoke. We are more concerned with safe assemblies not corrupting the sql server process then a user focused on terminating sql server.

You can always write an XP to do the same anyway for instance.|||could you please give me some quick code in C#/VB.Net that will kill the hosting process in that case?|||I am only concerned about this becaseu I am a lead author on a sqlclr book.|||

Is this simple enough?

public static void killsql()
{
System.Environment.Exit(-1);
}

Steven

Monday, March 26, 2012

Killing bug in ASP.Net 2, Report server is dead, 100% guaranteed

Hi,

I posted a message to the install forum a few days ago and no answers were made so far. This bug is 100% reproducible and kills Report Server.

I am cross-posting here with the hope that someone in Microsoft will take note and eventually give a solution.

If you go to the IIS6 ReportServer VD and click on the ASP.net 2 config button, You Kill Report Server.

Complete details are in this post

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=250225&SiteID=1

Thanks,

Philippe

Hi,

We have found the solution to this issue.

Just remove this

xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"

From the WEB.config file in both ReportServer and ReportManager folders

Philippe