.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘sql server 2000’

BUG: You may receive an “Access is denied” error message when a query calls an extended stored procedure after you upgrade from SQL Server 2000 to SQL Server 2000 Service Pack 4

Symptoms
After you upgrade a Microsoft SQL Server 2000-based computer to Microsoft SQL Server 2000 Service Pack 4 (SP4), a SQL Server query that calls a registry extended stored procedure may fail, and you receive the following error message:

Access is denied.You receive the error message when you use any one of the registry extended stored procedures in the following list: xp_regreadxp_instance_regreadxp_regenumkeysxp_instance_regenumkeysxp_regenumvaluesxp_instance_regenumvaluesxp_regwritexp_instance_regwritexp_regaddmultistringxp_instance_regaddmultistringxp_regremovemultistringxp_instance_regremovemultistringxp_regdeletevaluexp_instance_regdeletevaluexp_regdeletekeyxp_instance_regdeletekey
Resolution
This problem occurs because SQL Server 2000 SP4 implements a restriction on which registry paths the registry extended stored procedures can access. When a query calls a registry extended stored procedure, the registry extended stored procedure examines the requested registry subkey against a control list of registry hives. If the registry subkey that the query requests is not in the control list, you receive the following error message:

‘Access is denied.’ This error message has nothing to do with the permissions of the SQL Server user account in the context of which one of these registry extended stored procedures is called. The error message occurs even if the user has Administrator permissions.
Note When you receive the error message, the registry extended stored procedure returns no results.

FIX: A floating point exception occurs during the optimization of a query

Symptoms
An INSERT, UPDATE, or DELETE query that operates on a table that is referenced by an indexed view may encounter a floating point exception during optimization. The batch and transaction is aborted, and you receive the following error message:

Server: Msg 3628, Level 16, State 1, Line 1
A floating point exception occurred in the user process. Current transaction is canceled.
Resolution
Service pack informationTo resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
290211?(http://support.microsoft.com/kb/290211/) How to obtain the latest SQL Server 2000 service pack
Hotfix informationThe English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

DateTimeVersionSizeFile name——————————————————————-31-May-200317:452000.80.818.078,400Console.exe25-Jun-200300:012000.80.818.033,340Dbmslpcn.dll25-Apr-200301:12786,432Distmdl.ldf25-Apr-200301:122,359,296Distmdl.mdf30-Jan-200300:55180Drop_repl_hotfix.sql12-Sep-200302:262000.80.859.01,905,216Dtspkg.dll26-Aug-200319:162000.80.854.0528,960Dtspump.dll23-Jun-200321:402000.80.837.01,557,052Dtsui.dll23-Jun-200321:402000.80.837.0639,552Dtswiz.dll24-Apr-200301:51747,927Instdist.sql03-May-200300:561,581Inst_repl_hotfix.sql08-Feb-200305:402000.80.765.090,692Msgprox.dll01-Apr-200301:071,873Odsole.sql05-Apr-200300:462000.80.800.062,024Odsole70.dll07-May-200319:412000.80.819.025,144Opends60.dll02-Apr-200320:482000.80.796.057,904Osql.exe02-Apr-200322:152000.80.797.0279,104Pfutil80.dll04-Aug-200317:17550,780Procsyst.sql11-Sep-200323:3712,305Qfe469315.sql22-May-200321:5719,195Qfe469571.sql06-Sep-200300:361,090,932Replmerg.sql06-Sep-200306:182000.80.858.0221,768Replprov.dll06-Sep-200306:182000.80.858.0307,784Replrec.dll05-Sep-200323:001,087,150Replsys.sql13-Aug-200315:28986,603Repltran.sql29-Jul-200319:132000.80.819.0492,096Semobj.dll31-May-200317:272000.80.818.0172,032Semobj.rll05-Aug-200320:06127,884Sp3_serv_uni.sql01-Jun-200300:012000.80.818.04,215,360Sqldmo.dll07-Apr-200316:4425,172Sqldumper.exe19-Mar-200317:202000.80.789.028,672Sqlevn70.rll01-Jul-200323:182000.80.834.0180,736Sqlmap70.dll03-Sep-200301:562000.80.857.0188,992Sqlmmc.dll02-Sep-200322:032000.80.857.0479,232Sqlmmc.rll08-Feb-200305:402000.80.765.057,920Sqlrepss.dll23-Sep-200300:032000.80.863.07,614,545Sqlservr.exe25-Jul-200320:442000.80.845.0590,396Sqlsort.dll08-Feb-200305:402000.80.765.045,644Sqlvdi.dll25-Jun-200300:012000.80.818.033,340Ssmslpcn.dll01-Jun-200300:012000.80.818.082,492Ssnetlib.dll01-Jun-200300:012000.80.818.025,148Ssnmpn70.dll01-Jun-200300:012000.80.818.0158,240Svrnetcn.dll31-May-200317:592000.80.818.076,416Svrnetcn.exe30-Apr-200322:522000.80.816.045,132Ums.dll01-Jul-200323:192000.80.834.098,816Xpweb70.dll Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.

FIX: A “System.NullReferenceException” exception may be logged in the Reporting Services log when you try to create a snapshot report in SQL Server 2005 Reporting Services

Symptoms
This article describes the following about this hotfix release: The issues that are fixed by this hotfix packageThe prerequisites for installing this hotfix packageWhether you must restart the computer after you apply this hotfix packageWhether this hotfix package is replaced by any other hotfix packageWhether you must make any registry changes after you apply this hotfix packageThe files that are contained in this hotfix package
Resolution
When you try to create a snapshot report in Microsoft SQL Server 2005 Reporting Services, the following exception may be logged in the Reporting Services log:

System.NullReferenceException Additionally, you may experience the following problems: You may notice that mini-dump files have been created in the LogFiles folder for Reporting Services. By default, the path of the LogFiles folder is as follows:
C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFilesNote The folder name MSSQL.3 is a placeholder because this folder name may vary, depending on which SQL Server services you have installed.The mini-dump files are created at a fixed interval.Note You may also experience these problems in Microsoft SQL Server 2000 Reporting Services.

Error when you try to call the Prepare method before you add parameters: “An unhandled exception of type ‘System.Data.SqlClient.SqlException’ occurred in system.data.dll”

Symptoms
When you create a parameterized command against Microsoft SQL Server 7.0, if you call the Prepare method before you add parameters to the command, you receive the following error message:

An unhandled exception of type ‘System.Data.SqlClient.SqlException’ occurred in system.data.dll.
Additional information: System error. This problem does not occur in SQL Server 2000.
Resolution
This problem occurs in SQL Server 7.0 because, by design, you cannot run the Prepare method before you add parameters. This applies to most database systems.
SQL Server 2000 does not generate the above-mentioned exception because it does not run Prepare until the first command is executed. This optimization prevents the overhead of Prepare if no commands are subsequently executed.

BUG: You receive an “EXCEPTION_ACCESS_VIOLATION” error message when you use a RIGHT OUTER JOIN clause in SQL Server 2000

Symptoms
In Microsoft SQL Server 2000, when you run a query that contains a RIGHT OUTER JOIN clause, you may receive an error message that is similar to the following:

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Connection Broken
Resolution
Service pack informationTo resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
290211?(http://support.microsoft.com/kb/290211/) How to obtain the latest SQL Server 2000 service pack

BUG: Access Violation Occurs with Non-Updateable Derived Table in UPDATE Statement

Symptoms
If you run a query that tries to update a derived table that contains a UNION statement, a handled Access Violation occurs and the connection is closed. For example, the following query:

declare @x intupdate tset @x = coalesce( @x , 0 ) + nfrom ( select 1 union all select 2 union all select 3 ) as t( n ) returns this error message:

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Connection BrokenSQL Server also prints a stack dump to the error log with text similar to the following example. Please check the error log for the Access Violation and note that the Exception Address is in (res_view(class CAlgStmt *,class TREE * *):

2000-08-28 12:13:37.77 spid51Error: 0, Severity: 19, State: 02000-08-28 12:13:37.77 spid51SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..********************************************************************************* BEGIN STACK DUMP:*08/28/00 12:13:37 spid 51**Exception Address = 0067CA0C (res_view(class CAlgStmt *,class TREE * *) + 000003E3 Line 0+00000000)*Exception Code= c0000005 EXCEPTION_ACCESS_VIOLATION*Access Violation occurred reading address 00000000* Input Buffer 256 bytes -*declare @x intupdate tset @x = coalesce( @x , 0 ) + nfrom ( select*1 union all select 2 union all select 3 ) as t( n )**
Resolution
Microsoft has confirmed this to be a problem in SQL Server 2000.