| |   Skin:   
      User: Not logged in 
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Featured Articles
Book Chapters
Training Courses
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
About Me
My Blog
HeadGeek Articles
Talking Portfolio
World Trip Pics

Recovering from a MS SQL Server Crash
Author: Unknown
Published: 6/23/2005 1:09 PM
Category: Database, SQL
Summary: Using a combination of Windows administrative features and exception handling within your application you can quickly recover from a SQL server crash while offering a "friendly" error message to your web surfers.

  1. In the Windows services controls, modify the service properties for MSSQLSERVER.
  2. Under the recovery tab, First Failure, choose "Restart the Service."
  3. Also under the recovery tab, Second Failure, choose, "Reboot the Computer."
  4. Create the testsql.asp file (provided below.)
  5. Set the testsql.asp to include in all of your db-enabled applications.  It'd be a good practice to have it in the top of your header.

Contents of testsql.asp


 On Error Resume Next
 set conn = Server.CreateObject("ADODB.Connection")
 conn.ConnectionString = "PROVIDER=SQLOLEDB;DATA SOURCE=yoursqlserver;UID=youruid;PWD=yourpassword;DATABASE=yourdatabase"
 conn.ConnectionTimeout = 1
 If Err.Number <> 0 then %>

<table width="544" border="0" cellspacing="0" cellpadding="4">
    <td width="74"><div align="center"><img src="/intranet/images/caution.jpg" width="64" height="64"></div></td>
    <td width="454" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">We
      apologize for the inconvenience, but access to the the database server
      will be unavailable for less than five minutes as we perform a necessary
      server reboot. Please try your request again in a few minutes.</font></td>


End If



Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”

Advertise on XMLPitstop

Advertise on XMLPitstop

EggHead Cafe
Web Servicee development
Buy text ads here!
Color Laser Printer
online business degree
Diesel sunglasses
Skype vs. sipcall
VoIP Internettelefonie
Buy text ads here!

Interested in Text ads?
2,218 Total Members
33 members(last 30 days)
6 members(last 7 days)
0 members(today)

1,609 Total Discussions
14 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

17,054 Total Blog Posts
1,739 Blogs(last 30 days)
223 Blogs(last 7 days)
0 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

13,785 Total Resources
4 Resources(last 30 days)
1 Resources(last 7 days)
0 Resources(today)


David Silverlight's| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139