The information in this article applies to:
SUMMARY
The following is a list (Part 2 of 3) of fixes and other various
improvements that have been made in Microsoft SQL Server version 6.5
Service Pack 2, now available from your primary support provider. For more
information, contact your primary support provider.
LIST OF PROBLEMS CORRECTED IN SERVICE PACK 2 (Part 2 of 3)SERVER COMPONENTSQ140606: FIX: ORDER BY DESC Queries May Cause High Logical ReadsBelow are excerpts from each of the articles listed above. For the full text of the articles, search for the article number in the Microsoft Knowledge Base. FIX: ORDER BY DESC Queries May Cause High Logical ReadsQ140606 BUG #: 15670 (6.50) SYMPTOMS
A SELECT query containing an ORDER BY DESC clause can sometimes cause
a high number of logical reads in SQL Server 6.0.
FIX: Updates in Browse Mode Applications Can Cause AVsQ153542 BUG #: 15587If a DB-Library browse mode client updates a row and the row has changed since the client selected the row, a handled exception of the client thread on the SQL Server can occur. If a table is created with greater than 223 columns, and SELECT permissions are then granted to a user or group, then a subsequent SELECT, issued by a permitted user, can result in the following message being reported for each column defined after column 223 in the table structure: A DB-Library application making repeated cursor calls encounters one or more of the following errors: Attempting to dump a database while a dbwritetext, dbmoretext, or WRITETEXT is being executed on one of the tables in the database may cause a handled access violation (AV) followed by a SQL Server hang. A partial dump is created, and the loading header from the dump shows the dumpsize to be 0 (0 pages). It may not be possible to shut down SQL Server under these conditions. In order to restart SQL Server, you may have to restart Windows NT. When you attempt to connect to a SQL Server using the 16 bit TCP/IP sockets network library with a fully qualified DNS name 20 characters or greater, the following error message appears: A select that contains a subquery combined with a GROUP BY and a HAVING clause with the function ROUND() results in the following error message and terminates with a thread level Access Violation (AV): If you declare a non-insensitive cursor, which involves selecting a value converted to the bit datatype, a handled Access Violation occurs. The SQL Server process can go into a 100% CPU spin when a DB-Library or ODBC application opens a server cursor which executes a procedure created using the Recompile option. In general, when you use the Select statement and a query that involves the multiplication of a decimal number and the value returned from a function, an Arithmetic Overflow error message appears. This error message also appears in the following three specific conditions:
Table lock escalation, and subsequent blocking, can occur if a query selects text, or image columns and rows are searched with a unique index. If a query's page locks on a table escalate to a table lock and the table is searched with a unique index, an Error 1203 occurs and terminates the client connection. If a DB-Library browse mode client updates a row, and the table has a Foreign key constraint on any column, a handled exception error of the client thread on the computer running SQL Server occurs. If a DB-Library browse mode client updates a row and the table has a Check constraint on any column, a handled exception of the client thread on the SQL Server occurs. The TRUNCATE statement fails with the following error message: Deleting from the table produces the following error: If you create a view with a CASE statement, and one or more of the result expressions is a SELECT statement, the following error may occur: The extra SELECT keyword in the selection list of an aggregate function may cause a thread level access violation, and result in the following error message: A CASE expression in the WHERE clause of a SELECT statement may cause a handled access violation (AV). The client's connection to the server is broken when the access violation occurs. The client will receive the following message: Other processes on the server are not affected. Assigning a decimal value from a VIEW to an OUTPUT parameter of a stored procedure causes a handled access violation (AV). The client reports the AV message on SQL Server version 6.0, and appears to stop responding on SQL Server version 6.5. The errorlog contains the details of the access violation. If a stored procedure is selected as the victim in a deadlock situation, a temporary table created within the procedure may become stranded in tempdb. This situation will only occur if, in addition to the temporary table, a cursor is declared within the stored procedure, and the stored procedure then acts upon the temporary table. Because the standard method for handling a deadlock is to resubmit the command that was terminated, problems may arise if that command attempts to re-create the temporary table upon resubmission. Specifically, error message 2714 may be reported when the query is resubmitted, as follows: Attempts to drop the temporary table prior to re-creating it will fail, and you will receive error message 3701: The existence of the temporary table can be confirmed by selecting from tempdb.sysobjects for that table. This problem does not occur if a cursor is not used within the stored procedure. Thus, if a cursor is absent, the temporary table is correctly cleaned up from tempdb after a deadlock. When you issue a create view statement with a view column list, a correlated subquery, and a group by clause, the SQL Server may incorrectly produce the following error message: Selecting from a view that contains a correlated subquery and a distinct clause can cause a thread level access violation (AV) in SQL Server. A nested cursor fetch on basic select type cursors can cause a handled access violation, as well as the inability to locate locally defined variables or the cursor. The SQL Server error log will contain a Language Exec error, followed by a stack trace. The following errors, as well as a client disconnect, are reported on the client: A non-system administrator (SA) user will receive a Permission Denied error message (number 229) when he or she tries to update a table through a stored procedure, even if the user has permission to run the stored procedure. If the SA or database owner (DBO) runs the stored procedure first, the user will then be able to use the stored procedure. This problem occurs when the following sequence of events occurs:
On SQL Server 6.5 SP1 (6.00.213) Alpha platforms, the checkpoint process will encounter an access violation (AV) if both of the following are true:
-and- When you select from a view with an aggregate subquery using an ANSI style outer join, you receive an access violation error message. For example, the following view will cause this behavior:
Using Dynamic Cursor within a user-defined transaction can cause hundreds
of 1203 errors in the SQL Server errorlog and Windows NT Event Viewer. The
SQL Server shuts down afterwards, with the following error message:
If Insert Row Level Locking (IRL) is enabled, using INSERT/SELECT may cause the following error message: An undetected deadlock can occur between a database dump and a user process that holds locks on syscolumns. When this deadlock occurs, all activity within the database is suspended until the deadlock is manually resolved. Selecting from a view which has nested selects in its text may cause errors 2804 or 4401, if the SELECT is run after recycling the server. The text of each error message is:
WORKAROUNDRestructure the query to use an intermediate temporary table such as the following:
Note that this workaround should only be necessary in rare circumstances.
Testing should be done to determine if the workaround uses fewer logical
reads than the original query in your environment.
FIX: Numeric Datatype in Stored Proc Causes Connection BrokenQ149697 BUG #: 14684 (6.50)This problem goes away by creating the stored procedure with "with recompile." You can also get a good execution by executing the stored procedure with "with recompile." FIX: LOAD HEADERONLY Doesn't Report Files Cont on Another TapeQ150891 BUG #: 15076 (6.50)Convert the application to use normal locking or cursors. FIX: SELECT from Table with >223 Columns Fails with Error 230Q153693 BUG #: 15610Consider trimming the number of tables in the columns or use aliasing or different security schemas to allow data to be seen by all users. FIX: SQL Terminates on Repeated Cursor Calls w/ ODS HandlersQ153917 BUG #: 14803 (6.50)Stop any ODS applications, such as SQL Trace, that may be running at the server. This causes the ODS handlers to be de-installed and prevents the server from terminating. FIX: TEXT Operations Can AV During DUMP DATABASEQ154164 BUG #: NT: 15703 (6.5) (sqlserver)Schedule database dumps so that they do not execute while applications are using text operations such as dbwritetext, dbmoretext, or WRITETEXT. FIX: 16-bit TCP/IP Fails to Connect With Long DNS NamesQ154627 BUG #: Windows NT: 15694To work around this problem, use shorter DNS names or use the IP address of the SQL server. FIX: AV if Subquery GROUP BY and HAVING with ROUND()Q154887 BUG #: (SQL 6.5) 15765Re-code the query so that it does not fit the pattern. FIX: AV Declaring a Cursor Involving Conversion to BitQ155182 BUG #: NT: 15771 (6.5)Do not convert to the bit datatype or declare the cursor as INSENSITIVE. FIX: 100% CPU Spin Opening Cursor on a RECOMPILE proc.Q155231 BUG #: SQL 6.5 15804Change the procedure to not have WITH RECOMPILE. FIX: Select Statement Can Cause Arithmetic OverflowQ155710 BUG #: 15785 (6.50)To work around this problem, convert the decimal or numeric values to integer values using the Convert function. For more information on how to use the Convert function, please see the Transact-SQL Reference guide. FIX: Error Msg 1007 Occurs While Inserting Value '0Q155714 BUG #: Windows NT: 15866 (6.50)Enable trace Flag 107 for the server or any connection that needs to use this value in or against a column defined as float, decimal, numeric or real. FIX: SH_PAGE Locks Held on Text or Image Data in Service Pack 1Q155815 BUG #: Windows NT: 15870 (6.50)Increase the LE Threshold Maximum configuration value with sp_configure so that it takes more locks before the query escalates from page locks to table locks. FIX: Table Lock Escalation in Service Pack 1 Causes Error 1203Q155816 BUG #: Windows NT: 15871 (6.50)To work around this problem:
FIX: Updates with Foreign Key Constraint Cause Exception ErrorQ155825 BUG #: 15716 (Windows NT: 6.50)To work around this problem, either create a trigger to manage referential integrity (instead of using the Check constraint), or convert the application to use normal locking or cursors. FIX: Browse Mode Updates with Check Constraint Causes ExceptionQ155826 BUG #: Windows NT: 15715 (6.50)To work around this problem, create a Rule and bind it to the column instead of using the Check constraint, or convert the application to use normal locking or cursors. FIX: Unable to Truncate a Table That Had a Constraint DefinedQ156287 BUG #: 15405 (6.5)To work around this problem, do the following:
FIX: Create View with Nested SELECT in CASE Causes Error 206Q156292 BUG #: 15817 (6.50)Use the CONVERT function to convert the result of the SELECT statement to the same datatype as the other result expressions. FIX: Access Violation with Extra SELECT in Aggregate FunctionQ156680 BUG #: 15979 (SQL 6.5)To work around this problem, remove the extra SELECT keyword. FIX: CASE Expression in WHERE Clause of SELECT May Cause AVQ156736 BUG #: 15877 (6.5)This problem only occurs if the variable into which the parameter values are passed to the stored procedure is used in the CASE expression of the SELECT statement. Therefore, the problem can be avoided by transferring the parameter value to another variable that is defined inside the stored procedure, and then using that second variable in the CASE expression. See the MORE INFORMATION section of this article for an example. FIX: AV Assigning Decimal from VIEW to OUTPUT ParameterQ156862 BUG #: 15860 (Windows NT: 6.5)To work around this problem, do one of the following:
FIX: Temp Table Stranded If Deadlock in Stored Proc. w/ CursorQ157570 BUG #: 16037 (Windows NT, 6.50)To work around this problem, try to close out the connection on which the deadlock occurred, prior to resubmitting the command. It is not necessary to cycle SQL Server in order to clean up an object left stranded in this manner, because that process (and any associated resources) appear to be released once the creating process is closed. FIX: Error 8158 Caused by Create View StatementQ157746 BUG #: 15976 (SQL 6.5)To work around this problem, do one of the following:
-or- FIX: AV Caused by View with Distinct and Correlated SubqueryQ157809 BUG #: 15964 (SQL 6.5)Recode the query so that a distinct clause and a correlated subquery are not combined. FIX: Nested Cursors Can Cause a Handled Access ViolationQ157846 BUG #: 15710 (6.50)Do not use cursors in a nested fashion where the inner cursor relies on the results of the outer cursor. FIX: Permission Denied Err 229 Updating Table in Another DBQ157847 BUG #: 16008 (6.50)Do not use cursors to update tables when the cursor is in a stored procedure that is called by another procedure. Another workaround is to give the user permissions to the underlying table. FIX: AV from View with Group By and Incorrect Column ListQ157981 BUG #: 15978 (SQL 6.5)To work around this problem, do one of the following:
-or- FIX: Checkpoint Process Access Violation when Log FillsQ158234 BUG #: 16060 (Windows NT: 6.5)To work around this problem, do not use the database option "trunc. log on chkpt." Instead, do one of the following:
-or- FIX: AV Selecting View with Aggregate Subquery and Outer JoinQ158269 BUG #: 16035Replace Left Outer Join with "*=" to avoid the access violation. FIX: Error 1203 Using Dynamic Cursor Within TransactionQ158288 BUG #: 16082 (6.50)To work around this problem, do one of the following:
-or- -or- FIX: Insert/Select May Cause Error 818 If IRL Is EnabledQ158290 BUG #: 16114 (6.50)To work around this problem, do either of the following:
-or- FIX: Undetected Deadlock on System Catalogs During DumpQ158335 BUG #: 15796Killing either the user process or the database dump process will resolve the deadlock and allow activity within the database to continue. FIX: Selecting From Views With Nested Select Causes ErrorsQ158401 BUG #: 16027Drop and re-create the view after recycling server. The problem occurs as a result of the view resolution at server startup. Additional query words: SP2 database patch
Keywords : kbother SSrvGen |
Last Reviewed: December 14, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |