In the Database administration world, it is often necessary to run a query on the production box and then run the same query on the QA or UAT box and compare the results. In this article, I would like to introduce a method that takes advantage of an MS-DOS batch file and SQL Server utility, BCP.exe, to compare the query results executed on two different servers.
There is nothing spectacular about using indexes per say. However, on many occasions I have come across a variety of SQL coders that never consider validating that the index they think they are using is efficient or even being used at all. We can all put indexes on the columns that we think will be required to satisfy individual queries, but how do we know if they will ever be used. You see, if the underlying table data is constructed, contains, or is ordered in a particular way, our indexes may never be used. One of the factors around the use of an index is its clustering factor and this is what this article is about.
This article is a member of the series Introduction to MSSQL Server 2000 Analysis Services. The series is designed to provide hands-on application of the fundamentals of MS SQL Server 2000 Analysis Services, with each installment progressively adding features and techniques designed to meet specific real - world needs.
This series of articles will examine the purposes, uses, and optimization of cursors in SQL 2000. SQL languages are designed so groups of records, or sets, can be manipulated easily and quickly. The speed at which groups of data can be altered, updated and deleted, demonstrates why working with sets is the preferred method. However, there are places where cursors are a better choice.
A common complaint of database administrators (DBAs) is that performance bottlenecks are not among those problems that one can fix "by just throwing hardware at it." Thus, database servers must provide tools and techniques to help administrators address this issue. On that aspect, SQL Server 2005 does not disappoint.
Add this procedure to the master database, it can then be executed from any DB to fix orphaned users (very useful when moving back to development). Using sp_msforeachdb with the proc allows you to resolve orphaned users in all databases in a single command: SP_MSFOREACHDB "USE ?; EXEC SP_AUTOFIX_USERS;"
Learn how to achieve scalable, high-performance merge replication applications. (White Paper)
One of the age old problems in DTS is moving packages between your development, test and production environments. Typically a series of manual edits needs to be done to all the packages to make sure that all the connection objects are pointing to the correct physical servers. This is time consuming and gives rise to the possibility of human error, particularly if the solution incorporates many DTS packages. Many companies have provided their own custom solutions for managing this problem but these are still workarounds for a problem that is inherently DTS's.