Differences between SQL Server temporary tables and table variables
I have heard of table variables, but not sure how to use them in a stored procedure. What purpose do they serve and why not just use temporary tables instead?
I have heard of table variables, but not sure how to use them in a stored procedure. What purpose do they serve and why not just use temporary tables instead?
In a previous tip, Searching and finding a string value in all columns in a SQL Server table, you showed how to find a string value in any text column in any table in a database. I was wondering how this can be taken a step further to allow a replacement
In this tip about cluserting for SQL Server we discuss the difference between an Active-Active versus and Active-Passive cluster.
I am trying to leverage the new SQL Server 2005 DMVs for performance analysis. While they are very useful, it would be nice to be able to see graphical representations of the data collected by the DMVs. Is there a graphical utility within SQL Server I can
Many times I would like to insert the results of a stored procedure into a table so I can do some extra processing with the result set. I always have to create the table first in order to perform an Insert Into Exec on the desired stored procedure since E
Automate a SQL Server restore with the script provided in this article.
In this tip we look at a stored procedure you can create to get information about statistics last update, fragmentation and row counts for a SQL Server table's indexes.
We are anticipating building some very large cubes and would like to get a handle on how to partition our measure groups to provide flexibility in processing and administering our cubes. Can you guide us through the steps to define multiple partitions f
Learn how to find the SQL Server configuration values using SQL queries, sp_configure, and using SQL Server Management Studio.
Learn about different ways to do mathematical calculations in SQL Server for calculations on Values, Parameters, Columns and Computed Columns.
In this tip we look at system tables to get better insight into our SQL Server indexes.
I have been hearing about the Resource database in SQL Server 2005 and that it should be included in our system database backups. Unfortunately, this database does not show up in SQL Server Management Studio for me to include in my database backups. How d

Learn how to use SQLCMD to create a database, tables, data, indexes and other database objects using command line scripts.
In a recent tip on Querying SQL Server databases using LINQ to SQL, you have described how it can be used to query SQL Server databases. How do I use LINQ to SQL with stored procedures that retrieve database records?
We have a suite of databases that support a medical care system. These products have progressed in importance over the years to a point where our health care professionals rely on them for critical patient care. These databases must be available 24x7 wi
In this article we cover ways to insert, delete and update data in SQL Server from an Excel spreadsheet along with examples.
Disabling and re-enabling a SQL constraint may cause data issues, learn how to identify constraint checks that may not be correct.
While working on a project recently I was asked to develop a mechanism that would provide the dates for state and federal holidays in a given year. Since this project deals with all states and territories of the United States, the list had to be comprehen
Over the years at MSSQLTips.com the tips focusing on interview questions have been popular with the community. From our first tip on SQL Server Concurrency and Locking Interview Questions to our most recent on SQL Server Backup and Recovery Interview Que
One thing you may need to do is dynamically return a set amount of rows based on user input. This could be for a search function, reports, dropdown lists or whatever. Instead of hard coding a set value you would like to pass in a variable that will then
In a recent tip on Language INtegrated Query (LINQ), you have described how it can be used as a query language extension to both VB.NET and C#. How can we use LINQ to SQL in .NET applications to query SQL Server databases?
So far we have prepared for the rebuild of our master database and have gone through the surprisingly simple rebuild process. (One of those DBA things where you spend all of your time on the preparation for something to go wrong, but everything goes off
We are just getting started with SQL Server Analysis Services and trying to build our first cube. We have an existing relational data source to use as our starting point. There are a number of steps involved in building an SSAS cube. Can you guide us t
Build a SQL Server cluster with this post SQL Server installation checklist.