.NET Daily

Recommended Resources


Popular Content


Navigation
CategorySQL
Featured

SQL

How To Solve: SQL Server detected a logical consistency-based I/O error: invalid protection option.

Posted on March 19th, 2018.

If you happen to receive the logical consistency-based I/O error, then your database probably ended up in an unusable state. SQL Server provide some options to repair it but it does that with the risk of potentially losing data. The syntax that I used to repair it is the following: ALTER DATABASE MyBrokenDB SET SINGLE_USER WITH ROLLBACK...

Featured

SQL

Fast SQL Server Stored Procedure with Filtering, Sorting and Paging

Posted on July 11th, 2017.

Even though there are dozens of articles out there which shows you how to do a Microsoft SQL Server stored procedure with filtering, sorting and paging, the execution time greatly differs between each approach. So I started to do some research in order to find the best approach out there. And I believe I found it on Aaron Bertrand...

Featured

SQL

How to Generate SQL Insert Statements for a Populated Table – SQL Server 2008 R2

Posted on January 13th, 2012.

Let’s say you want to export some data from your database SQL table to another database. If you have a decent number of items, for example less than 5000 entries, you can use the Script Wizard tool for that. Follow the steps below to learn how to use Script Wizard: Step 1) Right click on the database and select Generate Scripts… Step 2)...

Featured

SQL

How to Change SQL Default Instance in Visual Studio 2010

Posted on January 3rd, 2012.

After I have installed SQL Server 2008 Developer edition, I wanted to add a local database file (.mdf), but I received an error which said that I need to install the SQL Server Express version back. As I still had the Express version installed, I went to services and started the SQL Server Express process. This was not enough. After many...