.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 ‘microsoft sql server’

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: An EXCEPTION_STACK_OVERFLOW exception may occur when you try to run a Transact-SQL query in SQL Server 2005

Symptoms
This article describes the following about this hotfix release: The issues that are fixed by this hotfix packageThe prerequisites for applying the hotfix packageWhether you must restart the computer after you apply the hotfix packageWhether the hotfix package is replaced by any other hotfix packageWhether you must make any registry changes after you apply the hotfix packageThe files that are contained in the hotfix package
Resolution
When you try to run a Transact-SQL query in Microsoft SQL Server 2005, an EXCEPTION_STACK_OVERFLOW exception may occur. When this problem occurs, the SQL Server service may stop unexpectedly.
Note This problem may only occur in SQL Server 2005 x64 editions.

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 dump file may be generated in the Reporting Services Logfiles folder and you may receive an error message when you try to render a report in SQL Server 2008 Reporting Services

Symptoms
Consider the following scenario. In Microsoft SQL Server 2008 Reporting Services, you create a report. The report contains a Tablix data region item, a Subreport item, or a Chart item. The item has the NoRowsMessage property set, and there are no rows in the data region. Or, the report contains a Subreport item that displays error messages. The text box that is generated to display the error messages is split across a report page. You try to render the report. In this scenario, a dump file may be generated in the Reporting Services Logfiles folder. Additionally, you may receive an error message that resembles the following:

Assert in function = Microsoft.ReportingServices.Rendering.HPBProcessing.Paragraph.get_SpaceBefore file =line = 0 expression = Unhandled managed exception: Type = System.NullReferenceException, Message = Object reference not set to an instance of an object.
Resolution
The fix for this issue was first released in Cumulative Update 1. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
956717?(http://support.microsoft.com/kb/956717/) Cumulative update package 1 for SQL Server 2008Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix.For more information, click the following article number to view the article in the Microsoft Knowledge Base:
956909?(http://support.microsoft.com/kb/956909/)The SQL Server 2008 builds that were released after SQL Server 2008 was released

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.

Error message when you view a report in Microsoft Dynamics CRM 3.0: “System.Web.Services.Protocols.SoapException: The feature: “Report history snapshots” is not supported in this edition of Repor …

Symptoms
Consider the following scenario:You install Microsoft Dynamics CRM 3.0 on Microsoft Windows Small Business Server 2003 Release 2 (R2) with Microsoft SQL Server 2005 Workgroup Edition.You view a report in Microsoft Dynamics CRM 3.0.In this scenario, you receive the following error message:

Server Error in ‘/’ Application.
System.Web.Services.Protocols.SoapException: The feature: “Report history snapshots” is not supported in this edition of Reporting Services.
Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: “Report history snapshots” is not supported in this edition of Reporting Services. at Microsoft.ReportingServices.Diagnostics.Sku.ThrowIfFeatureNotEnabled(String instanceId, RestrictedFeatures feature) at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory) — End of inner exception stack trace — at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The feature: “Report history snapshots” is not supported in this edition of Reporting Services. —> Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: “Report history snapshots” is not supported in this edition of Reporting Services. at Microsoft.ReportingServices.Diagnostics.Sku.ThrowIfFeatureNotEnabled(String instanceId, RestrictedFeatures feature) at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory) — End of inner exception stack trace — at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory)
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:[SoapException: System.Web.Services.Protocols.SoapException: The feature: "Report history snapshots" is not supported in this edition of Reporting Services. ---> Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "Report history snapshots" is not supported in this edition of Reporting Services.at Microsoft.ReportingServices.Diagnostics.Sku.ThrowIfFeatureNotEnabled(String instanceId, RestrictedFeatures feature)at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory)— End of inner exception stack trace —at Microsoft.ReportingServices.WebServer.ReportingService.ListReportHistory(String Report, ReportHistorySnapshot[]& ReportHistory)]System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1496System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218Microsoft.Crm.ReportingServices.ReportingService.ListReportHistory(String Report) +48Microsoft.Crm.Reports.ReportCache.GetSnapshots(String reportPath) +267Microsoft.Crm.Reports.ReportCache.GetReportSnapshotProperties(String reportName) +194Microsoft.Crm.Web.Reporting.SRSViewer.ConfigurePage() +440Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +20System.Web.UI.Control.PreRenderRecursiveInternal() +62System.Web.UI.Page.ProcessRequestMain() +1499
Resolution
SQL Server 2005 Workgroup Edition is available withWindows Small Business Server R2. However, this problem occurs because this version of SQL Server does not support the Snapshot feature in SQL Server Reporting Services.