Showing posts from June, 2011

DBCC REINDEX vs DBCC INDEXDEFRAG

Note that DBCC DBREINDEX uses one big transaction, killing the operation in the middle would rollback the entire transaction.  It would not help you reduce log space consumption if you restart the in…

Lists user login attempts to a SQL Server (failed and successful login attempts)

This script is useful for security audits (helping you gather information about failed login attempts), and for checking recent activity by a particular login (before you delete a login, for example)…

Script to Generate BCP out and Bulk insert statements

This will be useful while migrating the data from one server to another   SET NOCOUNT ON GO SELECT @@SERVERNAME DECLARE @path nvarchar (2000), @batchsize nvarchar (40), @format nvar…

Query to return fragmentation information on partitioned indexes

This will very useful, if you have implemented the partitioning functionality .   SELECT OBJECT_NAME(a.object_id) AS object_name ,a.index_id ,b.name ,b.type_desc ,a…
Subscribe Our Newsletter