Category Archives: Uncategorized

SSRS Error: Exceeding Maximum Requests for One User

You intentionally want to restrict or increase maximum request for one user for report server


There could be some scenario when one specific login has created too much connection on report server via some application, and creates an issue when the number of connection reaches a maximum limit which is called MaxActiveReqForOneUser. This parameter is defined in Rsreportserver.config file and the file is available a example D:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer.

Open this file in any text editor and set the value to your choice and save the file.

<Add Key=”MaxActiveReqForOneUser” Value=”20″/>

In this way you can increase or restrict the number of request from one user.


Capture blocking details in SQL 2005 along with SQL Commands for both SPID and Blocked

If you want to store all blocking details in your databases in SQL Server 2005 then you can use the below method.

Step 1 Run the below script to create a table







CREATETABLE [dbo].[MyBlockingInfo](

[CaptureDateTime] [datetime] NOTNULL,

[spid] [smallint] NOTNULL,

[kpid] [smallint] NOTNULL,

[blocked] [smallint] NOTNULL,

[waittype] [binary](2)NOTNULL,

[waittime] [bigint] NOTNULL,

[lastwaittype] [nchar](32)NOTNULL,

[waitresource] [nchar](256)NOTNULL,

[dbid] [smallint] NOTNULL,

[uid] [smallint] NULL,

[cpu] [int] NOTNULL,

[physical_io] [bigint] NOTNULL,

[memusage] [int] NOTNULL,

[login_time] [datetime] NOTNULL,

[last_batch] [datetime] NOTNULL,

[ecid] [smallint] NOTNULL,

[open_tran] [smallint] NOTNULL,

[status] [nchar](30)NOTNULL,

[sid] [binary](86)NOTNULL,

[hostname] [nchar](128)NOTNULL,

[program_name] [nchar](128)NOTNULL,

[hostprocess] [nchar](10)NOTNULL,

[cmd] [nchar](16)NOTNULL,

[nt_domain] [nchar](128)NOTNULL,

[nt_username] [nchar](128)NOTNULL,

[net_address] [nchar](12)NOTNULL,

[net_library] [nchar](12)NOTNULL,

[loginame] [nchar](128)NOTNULL,

[context_info] [binary](128)NOTNULL,

[sql_handle] [binary](20)NOTNULL,

[stmt_start] [int] NOTNULL,

[stmt_end] [int] NOTNULL,

[request_id] [int] NOTNULL




Step 2 Run the below script to create a table to capture SQL Command






[CPDATETIME] [datetime] NULL,

[SPIDTXT] [nvarchar](4000)NULL,

[BKSPIDTXT] [nvarchar](4000)NULL


Step 3 Run the below script to create trigger on table MyBlocking






ON [dbo].[MyBlocking]













set @CPDATE=(select CAPTUREDATETIME from INSERTED wheredbid=13)

set @SPID=(select SPID from INSERTED wheredbid=13)

set @BKSPID=(select BLOCKED from INSERTED wheredbid=13)

— this will give you the SQLHandle for the culprit SPID



— this statement will give you the SQL Statement for culprit SPID






Step 4 Run the below script to create a table

Create 2 jobs with an interval of 30 seconds inserting sysprocesses information in MyBlocking table.

@command=N’Insert into dbo.MyBlocking

select getdate(),* from sys.sysprocesses where blocked <>0′,

When the above jobs execute they will insert the blocking information in your blocking table MyBlocking and then the trigger will capture the details of running process and the blocking process in another table for future references and output will be shown as below


Error: Server is in script upgrade mode. Only administrator can connect at this time

 Server is in script upgrade mode. Only Administrators can connect at this time Error: 18401

script upgrade mode

The above error can generate after applying SQL Server Service pack. The problem arises when you apply a SP\CU and after restarting the server when you try to connect to SQL you get above error message.

Cause: This happens sometime when Service Pack installation completes successfully but certain scripts like sqlagentxxx_msdb_upgrade.sq mostly in the Service Pack will be applied only after the SQL Server service starts the next time.

Script upgrade means that when SQL is restarted for the first time after the application of the patch, the upgrade scripts are run against each system databases to upgrade the system objects. During this process, SQL Server attempts to create this mdf file in the default data location, and if the path is not available, then we get this error. Most of the time, it’s a result of the data having been moved to a different folder, and the original Default Data path being no longer available. The default data path can be checked from the following registry key (for a default SQL 2008 instance):

HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer

Workaround and Resolution

  • Wait for few more minutes after start of SQL Server Services, as it takes a little time to apply the script .Keep an eye on any error message in Windows event log and SQL Server error log. If everything is good then you would be able to connect.
  •  In one of the scenario the default location of the database was changed since its installation but the registry entry was still pointing to the default path folder whose structure was deleted from the disk. In this case you will get below error logged in the error log

Here SQL Server is picking up the default data drive location from Registry and trying to create temporary .mdf file which is necessary to complete the upgrade.


To quickly resolve this issue we need to look into the registry path containing the default data path location and change it to existing one. This approach is more practical as we will not face the same issue while next patching activity otherwise you can create the missing folder structure on the drive.

HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer

Check the value for the String Entry named “DefaultData” and change the location to existing one .Restart the SQL Services and monitor Errorlog file.

Another scenario is when you have Utility control Point enabled in SQL Server 2008 R2 and Agent XPs disabled. This issue is fixed in SQL Server 2008 R2 CU2 but I included this here if in case this is the one you are facing.

This component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘Agent XPs’ by using sp_configure. For more information about enabling ‘Agent XPs’, see “Surface Area Configuration” in SQL Server Books Online.


Below are the steps you need to follow in order to fix above error message,

Enable Trace Flag 902 to disable the script execution. Restart the SQL Services.

Make sure that SQL Agent Services are in stopped state.

Connect to SSMS and execute below commands

EXEC sp_configure ‘show advanced’, 1;


EXEC sp_configure ‘allow updates’, 0;


EXEC sp_configure ‘Agent XPs’, 1;



Stop SQL Services and remove the trace flag 902. Start the services.

There could be several other reasons for the same.



Error: Setup Support Rules failed with warning “Network Error Binding” Order while installing SQL Server 2008 Cluster

Error: Setup Support Rules failed with warning Network Error Binding Order while installing SQL Server 2008 Cluster

When you install a SQL 2008 cluster you can encounter above error “Setup Support Rule Failed” with warning Network binding error. You cannot move forward without passing this rule. When you check the cluster validation report you can found the below mention error


Network interfaces ServerName-Node1 – BackupLan and Servername-Node2  BackupLan are on the same cluster network, yet either address xxx.xx.xx.xx is not reachable from or the ping latency is greater than the maximum allowed 500 milliseconds.

Network interfaces ServerName-Node1- BackupLan and Servername-Node2  – BackupLan are on the same cluster network, yet either address xxx.xx.xx.xx is not reachable from xxx.xx.xx.xx or the ping latency is greater than the maximum allowed 500 milliseconds.

Cause: The main root cause here is that during the Cluster Validation the connection between the 2 Backup LAN’s connections is not routable hence the cluster is not able to ping from one Backup LAN NIC to the other Backup LAN NIC and throws above error.

Resolution: Temporarily disable the Back LAN network connections on both nodes and proceed with the installation & then enable them again on both nodes

You can follow the below mentioned link for more details.

Installation Issues with SQL Server 2005 on windows 2003\2008

You might have face several issues while installing SQL Server on the standalone server and on cluster, some of the errors are mentioned below; I hope this could help you in resolving some issues.

>>Error message when you install SQL Server 2005: “There was an unexpected failure during the setup wizard”

Most common error when you copy the setup files from the CD or from the network location to install your SQL Server and you encountered the below mentioned error as shown in RED

When you encounter this error first of all check for logs in location C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files and check for SQLSetupNumber_ServerName_Core(local).log and check for below mentioned error.

 Running: InstallToolsAction.10 at: 2006/4/8 16:46:2

Error: Action “InstallToolsAction.10” threw an exception during execution. Error information reported during run:Target collection includes the local machine.

Fatal Exception caught while installing package: “10”
Error Code: 0x80070002 (2)

Windows Error Text: The system cannot find the file specified. Source File Name: sqlchaining\sqlprereqpackagemutator.cpp

Compiler Timestamp: Tue Aug 9 01:14:20 2005

Function Name: sqls:: SqlPreReqPackageMutator::modifyRequest
Source Line Number: 196
—- Context ———————————————–
WinException caught while installing package. : 1603

Error Code: 0x80070643 (1603)

Windows Error Text: Fatal error during installation. Source File Name: packageengine\ installpackageaction.cpp
Compiler Timestamp: Fri Jul 1 01:28:25 2005
Function Name: sqls::InstallPackageAction::perform

This problem occurs because the folders that contain the files that are required during the installation of SQL Server 2005 do not have a correct layout.
To work around this problem, set the folders in the correct layout for the SQL Server 2005 installation.
The SQL Server 2005 installation uses the following two folders:
•           Servers
•           Tools
These two folders must be under the same level of a folder or the root folder of a drive. The names of these folders must be exactly Servers and Tools. The Servers folder contains all the files that are required to install major SQL Server 2005 components, such as database engine. The Tools folder contains tools components and Books Online for SQL Server 2005.
In this example, the D:\SQLServer2005 folder is the location to which you want to copy the files from the SQL Server 2005 installation CDs.
In the D:\SQLServer2005 folder, create the following two subfolders:
Servers & Tools

  1. Copy all the files from the SQL Server 2005 installation CD that is named Servers to the D:\SQLServer2005\Servers folder.
  2. Copy all the files from the SQL Server 2005 installation CD that is named Tools to the D:\SQLServer2005\Tools folder.
  3. Open the D:\SQLServer2005\Servers folder, and then double-click Setup.exe to start the SQL Server 2005 Setup program.

>>SQL Server took too much time than expected, sometime more than 24 hours

You could face a this issue when the primary domain has many external trust relationships with other domains, or when many lookups are performed at the same time, the time that is required to look up domain group names may increase significantly. Therefore, the time that is required to install SQL Server 2005 may also increase. To resolve this issue MS has suggested a hotfix below is the link to resolve this issue.
I have also face similar kind of issue with SQL server 2008 Edition, however for me Slipstream setup worked. To know more about slipstream setup, you have to check my blog “How to slipstream SQL Server 2008 setup”

 >> On a computer that has a multicore processor, you may be unable to install SQL Server 2005

 When you are installing SQL server 2005 on a server and every time the installation get failed in the last when setup trying to start your SQL Services, when you analyze the error log in %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG you find the below mentioned error
Unable to start service (1053)
Error Code: 0x8007041d (1053)
Windows Error Text: The service did not respond to the start or control request in a timely fashion.
This situation can be True in case of below mentioned conditions.
1.     The ratio between logical processors and physical sockets is not a power of 2. For example, the computer has a single socket together with a triple-core processor.
2.     The number of physical cores is not a power of 2.
3.     The total number of CPUs is an odd number. For example, there are seven or nine CPUs.

There were 2 workaround to resolve this issue one is to change the NUMPROC value to 1 in boot.ini advanced configuration, and the other method is to extract the SP and run the setup using command line along with this Hotfix, for more details follow the below mentioned link suggested by MS.

>>After you install SQL Server 2005, the full-text search service cannot start

This issue occurs when you install SQL Server 2005 on Windows Server 2008 and the full text service fails to start, this problem occurs because the NTLM Security Support Provider (NTLMSSP) service does not exist on Windows Server 2008. However, the full-text search service depends on the NTLMSSP service. However the workaround is very simple to resolve this issue you have to install SQL Server 2005 SP2.
>> All resources did not come online and therefore you will need to manually set the cluster restart option
This issue occurs when you install SQL Server 2005 on Windows Server 2008 failover cluster and you receive this error message “All resources did not come online and therefore you will need to manually set the cluster restart option”.
This error occurred because full text service fails to start, this problem occurs because the NTLM Security Support Provider (NTLMSSP) service does not exist on Windows Server 2008. However, the full-text search service depends on the NTLMSSP service. However the workaround is very simple to resolve this issue you have to install SQL Server 2005 SP2.


>> The setup has encountered an unexpected error while Completing Commit. The error is: The cluster resource cannot be made dependent on the specified resource because it is already dependent.
Consider a scenario in which you have an existing SQL Server 2005 clustered instance installed on Windows server 2008, and you try to perform any of the following operations by using setup.exe:
1.     Edition upgrade
2.     Change server collation
3.     Rebuild system databases

You will get the below mentioned error in case any of the above operation performed “The setup has encountered an unexpected error while Completing Commit. The error is: The cluster resource cannot be made dependent on the specified resource because it is already dependent”
This error occurred because there is a known compatibility issue with SQL 2005 Setup and Windows Server 2008 Failover cluster. Setup tries to add the network name or the shared disk as a dependency to the SQL Server resource, and this fails because the dependency already exists.
There is no workaround available for this issue. At the time of the most recent update to this article, SQL Server 2005 is in extended support phase, and this issue will not be fixed in this release. If you have to perform any of the actions mentioned above, you will have to uninstall the existing instance of SQL Server and reinstall it with the new edition/collation changes.

SQL Server 2000 Installation Issues & Workaround

Error: A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup

Restart the computer and see if you are able to run the setup. If the restart does not help, use the steps that follow.
1. Perform these steps and then run the SQL Server 2000 setup again:
a. Click Start, and then click Run.
b. In the Open dialog box, type: “Regedit” (without the quotation marks) or “Regedt32” (without the quotation marks)
c. Click OK.

NOTE: Please make sure that you only delete the value mentioned, not the whole session manager key.
d. In Registry Editor, expand the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
e. On the File menu, click Export.

NOTE: In Microsoft Windows 2000, click Export Registry File from the Registry menu.
f. In the File name text box, type: “Session Manager Key” (without the quotation marks)
g. Click Save.
h. In the right-pane of the Registry Editor window, right-click PendingFileRenameOperations. On the shortcut menu that appears, click Delete.
i. In the Confirm Value Delete message dialog box that appears, click Yes.
j. On the File menu, click Exit.

NOTE: In Windows 2000, click Exit on the Registry menu.
k. Restart the computer.
l. Using the Registry Editor, verify that the PendingFileRenameOperations registry value is not available.

Note The PendingFileRenameOperations registry value may be re-created when you restart the computer. If the registry values are re-created, delete the PendingFileRenameOperations registry value again by completing steps a through j, and then run SQL Server 2000 Setup. Do not restart the computer before you run SQL Server 2000 Setup.
2. Check other control set keys (for example, ControlSet001, ControlSet002, and so forth) for the same values and also delete them.
3. Identify the virtual memory settings on the computer. If the paging file is too small or if there is no paging file, this error message may occur at startup:
Limited Virtual Memory Your system has no paging file or the paging file is too small.
If the error message occurs, determine the placement of the paging file from the virtual memory settings and give that drive full permissions for the system account.

Error: Unable to install MSDTC during setup up

MS DTC on computers with multiple network cards could affect this configuration hence, MS DTC cannot be installed on a server with multiple network cards, uninstall one of the network cards, and then retry the SQL Server Setup. This should work and setup will run successfully

Error: SQL Server Setup failed while installing services

Please make sure that if the setup failed and there is a SQL instance installed earlier then you must delete the below mentioned registry key for starting the installation again.


Error: Rule “SQL Server Database Services feature state” failed

While Installing SQL 2008 cluster installation after installing on one node when trying to add a failover cluster node in the “add Node Rules” I get following message:
Rule Check Result
Rule “SQL Server Database Services feature state” failed.

The SQL Server Database Services feature failed when it was initially installed. The feature must be removed before the current scenario can proceed.
Resolution: Please follow the below mentioned steps to resolve this issue.

Change registry key on active node:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL\  Server \ MSSQL10.BENEDICT\ConfigurationState
Change all 4 values from 2 to 1

Download and extract the service pack by running the following command:

SQLServer2008SP2-KB979450-x64-ENU.exe /x:C:\SP2

Run: C:\SP2\x64\setup\1033\sqlsupport.msi

Run from source media:
Setup.exe /PCUSource=C:\SP2 /SkipRules=Cluster_IsDomainController Cluster_VerifyForErrors /Action=AddNode

The solution works after making changes in registry key  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.BENEDICT\ConfigurationState
Change all 4 values from 2 to 1

Which SQL Server Version?

Being a DBA if someone asks you a question which SQL Server Edition should I go for, well it’s a very tricky questions both for DBA and for the customer as he doesn’t want to shed an extra penny from his pocket.

I’ll start this discussion with SQL 2000, Well MSDE the free version of SQL Server 2000, didn’t include management tools and had a performance governor that made the product unsuitable for all but the most trivial of real-world needs or personal use
Well MSDE is the Microsoft Data Engine and is a scaled down version of Microsoft SQL Server 2000 intended primarily for development use or as a backend database for small office systems. While intended to have a lighter load on system resources than an actual installation of Microsoft SQL Server 2000, it is an otherwise functionally identical SQL database engine to its larger sibling. It is limited to a 2GB database, only supports servers up to 2GB RAM and two processors, and doesn’t support advanced SQL Server features such as BI, RS, Full Text Indexing/Search. The biggest disadvantage of MSDE is the fact that it does not include a GUI management tool and incorporates a performance governor. However if you have purchased a license for SQL Server 2000, then you can use the Enterprise Manager tools included with that to manage your MSDE.

The most significant issue with using MSDE is potentially the performance governor. This artificially limits the performance of the database engine by throttling the number of queries it can process at simultaneously as a result of which it is not suggested not to use MSDE with live production website. Hence the product is unsuitable for all but the most trivial of real-world needs or personal use.

If we talk about SQL Server 2005, then we have SQL Server Express Edition available free of cost. Moreover the SQL Server 2005 Express Service Pack 1 (SP1) now offers a useful set of GUI administration tools. Running SQL Server 2005 Express on a fast dual-core server with 1GB of memory will give you a remarkably capable platform for lower-end production uses. SQL Server 2005 Express with Advanced Services even includes support for Reporting Services.

For SQL Server 2005 and 2008 the free version SQL Server Express Edition can legally be used on laptops that connect with a paid version (such as Standard Edition) on the server, as long as you don’t mind the following limitations of SQL Server Express Edition like database size limit for SQL Server Express Edition: 4 GB for 2005 version or 10 GB for 2008

There is also SQL server workgroup edition and It is mostly used as a data management solution for small organizations that need a database with no limits on size or number of users. Workgroup Edition can serve as a front-end Web server or for departmental or branch office operations. It includes the core database features of the SQL Server product line and is easy to upgrade to Standard or Enterprise Edition.

SQL server 2005 workgroup has Management Studio, Import/Export, Limited Replication Publishing and Backup Log Shipping; and for all this you have to shed around 4000$\Processor or around 730$\5 users.

If you want to use SQL Server for developers then the other option for database developers is SQL Server 2008 Developer Edition. Unlike Express Edition, Developer Edition has no limitations on database size, performance characteristics or functionality. However, it’s only licensed for use by a single developer in a non-production development environment.

Moreover you may use it for your own use in developing applications, but you may not allow others to access either the database or those applications. Before you put the applications into production, you must transfer the database to a fully licensed version of SQL Server

Now we talk about the 2 primary editions for SQL Server: Standard and Enterprise. Standard edition provides basic SQL Server features and will serve the needs of most businesses. Enterprise edition offers additional functionality and a much heftier price tag.

If you are working on Large volumes of data and Working with terabyte-class databases or billion-row tables and need functionality likes offers table partitioning, parallel indexing, and indexed views that can significantly improve performance in large environments then you must choose Enterprise Edition.

Moreover if You are working in a high-availability, mission-critical environment in which you want system to be running a 24/7/365 then features like Online indexing will allow you to maintain indexes without scheduling down-time, and Online Restore and Fast Recovery are both options you want when recovering from a failure.

Enterprise Edition is the only Edition that allows you to replicate data from Oracle.

Enterprise Edition also provide some more advanced BI features, such as parallel processing, cube partitioning, and text mining, hence if you are working with large BI solutions then Enterprise Edition is suitable for you.

So if you have a limited budget then SQL Server Standard is significantly less expensive than Enterprise when purchased on licensed per CPU. The conclusion, If you do not fall into any of these categories, then Standard edition will most likely suffice.

Some of the Myths come in mind while choosing and edition.

Standard isn’t as stable as Enterprise.
Not true. Standard and Enterprise both use the same core; the only difference is the additional features that Enterprise provides.
My other database servers are Enterprise, so all of my new servers need to be Enterprise, too.
Not true. While having a homogeneous environment does simplify many things (planning, maintenance, etc.), you can easily mix and match SQL Server editions within an environment to best meet your needs (and budget!).
I need Enterprise edition in order to replicate partitioned tables.
Not true. Replication can exist between partitioned and non-partitioned tables. In fact, replication by default does not create partitioning schemas on the subscription database, so the destination table is not partitioned unless explicitly requested. That said, if the source tables are partitioned, there may be good cause for the destination tables to be partitioned too, and Enterprise edition should be seriously considered.
I need Enterprise edition in order to cluster.
Not true starting in SQL Server 2005. Both 2005 and 2008 Standard editions support 2 node clusters. In a lot of enterprises, you will see Enterprise installed for clustering only. If you have a two node active/passive cluster and that is your only reason: you are probably overpaying and could be fine with standard edition.
I need Enterprise edition to access more memory
Not true with 2005 or 2008. These versions of SQL will address as much memory as the OS allows in Standard or Enterprise edition.