SQL Server Q&A

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 ‘folder’

The Databases folder may take longer than expected to open when you expand the folder in Object Explorer in SQL Server 2008 Management Studio

Symptoms
When you expand the Databases folder in Object Explorer in Microsoft SQL Server 2008 Management Studio, the Databases folder may take longer than expected to open. For example, the Databases folder may take several minutes to open.
Note This issue occurs only for instances of Microsoft SQL Server 2008 that have a large history of backups.
Resolution
This issue occurs because of a sub-optimal query that SQL Server 2008 Management Studio runs. This query is run when one of the following columns is enabled in the Object Explorer Details window for the Databases folder:Last Backup DateLast Log Backup Date

FIX: Error message when you run the SQLDiag utility or the PSSDiag utility: “Exception creating Perfmon log”

Symptoms
When you run the SQLDiag utility or the PSSDiag utility to collect Performance Monitor (PerfMon) counters, you may receive the following error message:

Exception creating Perfmon logWhen this problem occurs, an error message that resembles the following message is logged in the ##Sqldiag.log file or in the ##Pssdiag.log file:

2006/07/14 01:36:02.71 PSSDIAG Exception 0xC0000005 caught.
2006/07/14 01:36:02.71 PSSDIAG Creating mini-dump file…
2006/07/14 01:36:02.87 PSSDIAG Mini-dump created
2006/07/14 01:36:02.89 ServerName\* Exception creating Perfmon log.Please see Microsoft Knowledge Base article 906532 for a possible remedyNoteThe previous error message is the version for the PSSDiag utility. In the version for the SQLDiag utility, SQLDIAG appears instead of PSSDIAG.The ##Sqldiag.log file is located in the Sqldiag folder. The Sqldiag folder is located in the same folder as the SQLDiag utility. The SQLDiag utility is located in the following folder:
%ProgramFiles%\Microsoft SQL Server\90\Tools\BinnThe ##Pssdiag.log file is located in the Output folder. The Output folder is located in the same folder as the PSSDiag utility. To obtain the PSSDiag utility, visit the following Microsoft download site:
http://www.microsoft.com/downloads/details.aspx?familyid=5564386a-28c2-4483-8293-76fff67b9eb3(http://www.microsoft.com/downloads/details.aspx?familyid=5564386a-28c2-4483-8293-76fff67b9eb3)In another scenario, the SQLDiag utility or the PSSDiag utility may unexpectedly stop after an error message that resembles the following message is logged:

2006/06/10 05:05:02.20 ServerName\* Starting Perfmon
Resolution
These problems occur because of a problem in the Microsoft Windows Performance Data Helper (PDH) library and in the performance extension DLL. Both the SQLDiag utility and the PSSDiag utility use the PDH library to collect Performance Monitor counters. The Performance Monitor counters are provided by the performance extension DLL. This DLL is available through the PDH library.

“License cannot be granted” exception when you add a licensed user control to the Windows Form in the same solution

Symptoms
When you create a licensed user control in a project, and then add it to the Windows form in the same solution, you receive the following exception:

An exception occurred while trying to create an instance of ‘Projectname.Controlname’. The exception was “An instance of type ‘Projectname.Controlname’ was being created, and a valid license could not be granted for the type ‘Projectname.Controlname’. Please, contact the manufacturer of the component for more information.”However, when you create a new solution, and then add the licensed user control to the Windows form, the licensed user control is added.
Resolution
Any user control that is implicitly added to the toolbox refers the assembly file in the obj\Debug folder. Therefore, the licensed user control that is created refers to the WindowsControlLibrary1.dll file in the obj\Debug folder. Generally, the license (.lic) files are put in the Bin folder. When you add an instance of a licensed user control to the Windows form in the same solution, the license is validated. Because the .lic file is not located in the obj\Debug folder, you receive the exception.