Browsing articles in "Sql Server 2005"

Shrink Data file failed with Error 3140

While shrinking a large (950GB) database file to move data to a secondary NDF, got below 3140 error, it is a normal error occurs while shrinking files of that capacity, please find resolution below,   Error:   Environment: SQL Server 2005 ENT. ed.   Issue: Data file shrink fails for large data file size with Error: 3140   Fix: The following example query truncates the primary data file in the AdventureWorks2008R2 database. The sys.database_files catalog […]


SQL Server 2005 Reporting Services – Configuration Issues and Fixes

While dealing with a SQL Server 2005 Reporting configuration, faced multiple issues, below is list of issues and applied fixes along with some useful link to redirect in case freshly setting up SSRS.   Main issue which arises is Authentication, SSRS 2005 authentication is handled via IIS manager, and there are multiple options available for e.g. Integrated Windows authentication, Basic authentication, Anonymous Authentication. Based on security requirement one of these can be setup, easiest one […]


How: Take SQL Server Full Memory Dump from within SQL Server and via Automated way

Sometimes there is need to take full dump for various kind of SQL Server issues and most of the time a DBA don’t know when issue going to occur hence becomes difficult to capture the dump, now to do same we need to have a standard approach, this post is compiled to work as procedure to take required dump file or automate it via trigger to ensure dump is taken even when no one is […]


All about SQL Server Trace flags – Links

  While doing search for SQL Server 2005 trace flags found few good links which greatly describe the info in detail, please use as per your requirement, most of them may be applicable to higher version of SQL Server as well.   Flags can be set for Session or Global (some are startup) levels though for later some can only be switched at startup using –T (you are suggested to avoid –t which turns on […]


SQL Server CXPACKET waittype and MAXDOP settings – Tips

  Recently while troubleshooting performance issue on a server, found that the CXPACKET waittype is high,   WaitType Wait_S Percentage AvgWait_S AvgRes_S AvgSig_S CXPACKET 1402132.06 56.82 0.0067 0.0063 0.0004   CXPACKET waits in the server are not an immediate sign of problem; they may indicate another problem, associated with one of the other high value wait types in the instance for e.g. Queries are executing with parallelism   Now when dealing with CXPACKET waittype do […]


How to restore SQL database on network share (UNC path) – SQL Server 2005

As it is known fact that by default SQL Server 2008 and below does not support database files on network shared path \\<sharepath>\<databaseFileName>.<mdf /ldf>, this is done because of certain performance and stability factor (read more about this in links present in reference section of this article). But in case if there is requirement to do a temporary restore on a network share then the below tip will come handy.   Note: SQL Server 2008R2 […]


Transaction rollback in progress. Estimated rollback completion: 0%. Estimated time remaining: 0 seconds

While dealing with a rollback/kill process (in SQL Server 2005 SP4 + CU3 environment) which is stuck for more than 10 days, it was a VERITAS NetBackup (DB tape backup) process,     On checking the DMV’s dm_exec_requests and dm_exec_sessions using below query, SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT db_id(DB_NAME(er.[database_id])) [DBID] ,er.[session_id] AS [SessionID] ,er.[command] AS [CommandType] ,est.[text] [StatementText] ,er.[status] AS [Status] ,CONVERT(DECIMAL(5, 2), er.[percent_complete]) AS [Complete_Percent] ,CONVERT(DECIMAL(38, 2), er.[total_elapsed_time] / 60000.00) AS [ElapsedTime_m] […]


Fix: Issue with SQL Agent not coming up due to agent error log path incorrect

SQL Server Agent was unable to come up and no error was being reported (only error we found as “SQL agent services started and then stopped”, nothing was logged in Event viewer as well), hence was unable to identify the actual error with which agent was failing, following is done to fix it,   1. Ran following command to read agent error log using query analyzer,                                 EXEC sys.xp_readerrorlog 0,2                 Output was: Msg 22004, […]


The log cannot be rebuilt because the database was not clearly shutdown (Microsoft SQL Server, Error: 945)

Today found that soemone has delete log file of one of database and database was inaccessible, when tried to take it offline and then bring online received following error while bringing it online,   “Database cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details”   “The log cannot be rebuilt because the database was not clearly shutdown (Microsoft SQL Server, Error: 945)”     […]


Lock Pages in Memory enabled but “Using locked pages for buffer pool” message not found

On a SQL Server 2005 x64 SP4+CU3 Standard Edition with Lock pages in memory settings enabled, max memory configured, found issue that “Using locked pages for buffer pool” message is not logged in SQL Server Error logs,   How to check Lock Pages in Memory is enabled? Run below commands in SSMS and in result you should see message like “Using locked pages for buffer pool” else configure or troubleshoot based on situation, exec xp_readerrorlog […]


Subscribe to this blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 265 other subscribers

Translate this blog!



March 2021
« Nov    

View Post by Categories

%d bloggers like this: