Category Archives: database

T-SQL – Avoid deadlock and workaround in SQL Server

>Here are some tips on how to avoid deadlocking on your SQL Server: Ensure the database design is properly normalized. Have the application access server objects in the same order each time. During transactions, don’t allow any user input. Collect … Continue reading

Posted in database | Leave a comment

>T-SQL: Top N Rows Per Group

> The following will return the top 10 players who hit the most home runs per year since 1990. The key is to calculate the “Home Run Rank” of each player for each year. selectHRRanks.*from(Selectb.yearID, b.PlayerID, sum(b.Hr) asTotalHR,rank() over (partition … Continue reading

Posted in database | Leave a comment

>T-SQL: Distributed Queries Stored Procedures

>SQL Server 2005 supports the following system stored procedures that are used to implement and manage Distributed Queries. sp_addlinkedserver sp_indexes sp_addlinkedsrvlogin sp_linkedservers sp_catalogs sp_primarykeys sp_column_privileges_ex sp_serveroption sp_columns_ex sp_table_privileges_ex sp_droplinkedsrvlogin sp_tables_ex sp_dropserver (Transact-SQL) sp_testlinkedserver (Transact-SQL) sp_foreignkeys SamplesSample 1–Create a linked server.EXEC … Continue reading

Posted in database, sqlserver | Leave a comment

>Paging of Large Resultsets in ASP.NET

>Author: Jasmin Muharemovic Source code: PagingTest Introduction The paging of a large database resultset in Web applications is a well known problem. In short, you don’t want all the results from your query to be displayed on a single Web … Continue reading

Posted in .NET, asp.net, code_craft, database, development_tutorial, sqlserver, winform | Leave a comment

SQL Server Reporting Services Product Samples

> Source: CodePlex SQL Server Reporting Services is a comprehensive, server-based solution that enables the creation, management, and delivery of both traditional, paper-oriented reports and interactive, Web-based reports. An integrated part of the Microsoft business intelligence framework, Reporting Services combines … Continue reading

Posted in database, sqlserver | Leave a comment

>SQL Web Data Administrator

> The SQL Server Web Data Administrator enables you to easily manage your SQL Server data, wherever you are. Using its built-in features, you can do the following from Microsoft Internet Explorer or your favorite Web browser: Create and edit … Continue reading

Posted in .NET, asp.net, database, projects, sqlserver | Leave a comment