Scripts

Technical Article

Log DISK IO statistics per Database file!!!

Well, ever wanted to know what was happening on disk....You could with FN_vitrualfilestats....Here is a NICE SPROC that samples all databases and puts it in a table. You can choose if you want to Retain values in the table or that it must be cleaned every time the sproc runs.( Put this data in a […]

You rated this post out of 5. Change rating

2003-01-31

901 reads

Technical Article

Delete record efficiently. (sp_CheckAndDelete )

The sp_CheckAndDelete stored procedure specially created for handling process of data deleting efficiently in MS SQL Server 2000 tables, as it is too difficult to handle this process when dependants exist for record to be deleted. When the deleting process is done with sp_CheckAndDelete stored procedure, you will be informed the status of the process […]

You rated this post out of 5. Change rating

2003-01-30

185 reads

Technical Article

List all the associated tables for a view

I had recent request for a script to list all the views for a database along with the associated tables the columns depend on. It is a rather simple script but as I have not seen a similar one, I thought I would share it with my fellow dbas. It returns information about views specific […]

You rated this post out of 5. Change rating

2003-01-23

451 reads

Technical Article

Build a script for CREATE DATABASE/FOR ATTACH

It is easy enough to detach and reattach databases in SQL 2000 providing you have less than 16 files to attach.I manage some very large databases and these sometimes need to be detached and reattached (i.e. for moving a database file from one volume to another).I have more than 16 files to contend with on […]

4.67 (3)

You rated this post out of 5. Change rating

2003-01-22

2,856 reads

Technical Article

Build Restore Scripts for All User Databases

Something I really hate is typing something repetitive.  To prepare for our Disaster Recovery plan, I wrote this script.It is a bit strange in that it requires 2 run iterations to generate the desired result.I use a naming standard for backup files of the form:D_DBName.Bakand a naming standard for database files of the form:DBName_Dx.Mdf for […]

You rated this post out of 5. Change rating

2003-01-22

577 reads

Technical Article

Generate script to tidy up DB Logical File Names

You may be a tidy person who likes to keep naming standards for everything in SQL Server.  It is a good practice since it makes generating scripts for everyday DBA tasks a lot simpler.  I make all database files follow the following standard:DBName_D1.mdf     for primary filegroup dataDBName_I1.ndf     for index filegroupDBName_L1.ldf     for transaction […]

You rated this post out of 5. Change rating

2003-01-22

272 reads

Blogs

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Microsoft finally adds Tenant Switcher for Fabric / Power BI

By

Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...

Microsoft Releases Windows 11 ARM ISO – A Game Changer for ARM-Powered Devices

By

Yesterday, Microsoft released the highly anticipated Windows 11 ARM ISO image, marking a major...

Read the latest Blogs

Forums

Table Delete

By Bruin

I have a very large table and I'm looking to do a cleanup based...

Creating paginated report where each page is a month in the range selected

By plsh

With in the paginated report I am trying to display on each new page...

Upgrading SSIS and SSRS from SQL Server 2016

By Deni Kusdeni

Hi All, I have plan to upgrade SSIS and SSRS from SQL Server 2016,...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers