Recover Lost Data Using the Transaction Log Files

Every now and then, experienced SQL Server DBAs as well as the SQL Server rookies find themselves in the unpleasant situation when some important data has been changed or lost with the monumental task to solve this in the most efficient way. Regardless of the change source – was it an internal or external user, the intent behind it – unintended mistake or a malicious change, or even the exact nature of the change – update, delete, drop or something else, database administrators are faced with the task to recover the lost data and enable users to continue using the database as if the recovery was never required by providing the data recovery. Let us learn about how to recover lost data using the transaction log files.

Read More

SQL SERVER – FCB::Open failed: Could not open file Path for file number 2. OS error: 5(Access is denied.)

I assume a number of times when the machine is booted up, I am most likely to hit the Management Studio to work on some script or the other. But sometimes strange things happen and I get all sorts of error. There might be tons of reasons why SQL Server is not able to start. This blog is a result of a quick consulting engagement with one of my clients where I faced OS error.

Read More

SQL SERVER – Fix Error – 948 A downgrade path is not supported. The database cannot be opened because it is version.

These past weeks the number of errors I have been getting when attaching a database has been far too many. But the best part of this learning experience is that I get to write about them one after another. There are no right or wrong answers sometimes, but am learning every time. Here is an error which is related to a downgrade path not supported. I received while I was trying to attach database using below command:

Read More

Pester the Tester: PowerShell Bugs, Beware! – Notes from the Field #129

[Note from Pinal]: In this episode of the Notes from the Field series database expert Robert Cain explains about Pester which is a bug testing framework for Powershell. I know Robert from last many years. Besides his amazing credentials of MVP, MCTS, Published Author and he is an amazing person to hang out with. I have seen him speaking at many prestigious events like PASS Summit, TechEd and every single time I learn something related to technology.

Read More

SQL SERVER – SQL Profiler vs Extended Events

To tell you the truth, I didn’t know how to start this article about SQL Profiler vs Extended Events. After all, I decided to take mind off things and to watch a movie. The movie was Iron Man 2. In addition to the brilliant performance of Robert Downie Jr., one phrase stuck in my mind and immediately inspired my writing.

“Don’t get so attached to things, learn to let go.”
~ Iron Man 2 (Robert Downie Jr)

What is better the old reliable SQL Profiler or something new? My personal choice is Extended Events. Why? To deal with Extended Events, we should go back to SQL Profiler and comprehend its work. First, a new trace is created, and information to be traced is noted.

Read More