News

Tuesday, June 26, 2007

How to troubleshoot SQL Server error 8645

SUMMARY

This step-by-step article describes how to troubleshoot SQL Server error 8645. You may receive the error 8645 when there is a high server workload or when the servers are experiencing high memory pressure.
 

Symptoms

You may see the following 8645 error sporadically:
Error 8645: A time out occurred while waiting for memory resources to execute the query. Re-run the query.

Additionally, you may also see one or more of the following symptoms:
When new users try to connect to SQL Server, they receive a "login failed" error message.
Users are disconnected and they receive various error messages.
CPU usage is very high on the server.
When you run
 

Causes

The error message 8645 is raised when memory-intensive queries, such as those involving sorting and hashing, are queued and are unable to obtain the requested memory before a time-out period. SQL Server waits for memory for a length of time that is based on the query wait configuration value. By default, the query wait value is set to -1, which means SQL Server waits for 25 times the estimated cost of the query. If you modify the query wait value to a non-negative number, SQL Server waits for the number of seconds that you specify in the value of the query wait option.
 
 
 

Tuesday, June 19, 2007

HOW TO: Store and Retrieve an Image File with SQL Server CE and eVB

SUMMARY

This step-by-step article describes how to store an image file to a Microsoft SQL Server 2000 Windows CE Edition (SQL Server CE) database and how to retrieve the stored image from the database and reconstruct the image file. This article uses Microsoft Embedded Visual Basic as the development platform.

The sections that follow describe how to create an Embedded Visual Basic application that uses two command buttons. One command button stores a .jpg file to a SQL Server CE database. The second command button is for reconstructing the .jpg file from the image data stored in the SQL Server CE database.

Wednesday, June 13, 2007

How to connect to an Oracle database by using ASP and ADO

 

INTRODUCTION

This article discusses how to connect to an Oracle database by using a Microsoft Active Server Pages (ASP) page and Microsoft ActiveX Data Objects (ADO).
 

MORE INFORMATION

To connect to an Oracle database, you can create an ASP page that contains the following code.
 
Note
 
Make sure that the connect string has a valid user ID and password and that the SQL statement references a valid table.
 
<%@ Language=VBScript %>
   <html>
   <head>
   <title>Oracle Test</title>
   </head>
   <body>
   <center>
   <%
     Set objConn = Server.CreateObject("ADODB.Connection")
     objConn.Open "Provider=MSDAORA;Data Source=<Your_TNSNames_Alias>;User Id=<userid>;Password=<password>;"

     Set objRs = objConn.Execute("SELECT * FROM DEMO.EMPLOYEE")

     Response.Write "<table border=1 cellpadding=4>"
     Response.Write "<tr>"

     For I = 0 To objRS.Fields.Count - 1
       Response.Write "<td><b>" & objRS(I).Name & "</b></td>"
     Next

     Response.Write "</tr>"

     Do While Not objRS.EOF
       Response.Write "<tr>"

       For I = 0 To objRS.Fields.Count - 1
         Response.Write "<td>" & objRS(I) & "</td>"
       Next

       Response.Write "</tr>"

       objRS.MoveNext
     Loop

     Response.Write "</table>"

     objRs.Close
     objConn.Close
   %>
   </center>
   </body>
   </html>
 
APPLIES TO
- Microsoft Active Server Pages 4.0
- Microsoft Internet Information Services 6.0
- Microsoft Data Access Components 2.8