Scripts

Technical Article

spEasyBackup

Database backup made simple. You dont even have to pass any parameters if desired. It will all be handled for you.Capable of Net Send status notifications and writes status message to Windows event log.Side Effects:When not passing any @database params the the backup is done of the database where the proc resides. That means if […]

You rated this post out of 5. Change rating

2002-09-06

568 reads

Technical Article

Recompile all Udf's associated with a Table

When altering the structure of tables it is good practice to run SP_RECOMPILE against the table to force triggers and stored procedures to recompile. However this does not incude Udf's which also rely on the table, and this means the Udf's may fail when they are called. Run this script and supply the table name […]

You rated this post out of 5. Change rating

2002-09-05

351 reads

Technical Article

Show valuable info from sysindexes

This sp (sp_sysindexes) captures important columns from the table sysindexes and translates the numeric values into text. It shows the owner.object, the filegroup which it belongs to, the type of index, the total number of pages for tables/clustered indexes and non clustered indexes. It also shows the status, the indid and the type of object.You […]

3.5 (2)

You rated this post out of 5. Change rating

2002-09-01

3,699 reads

Technical Article

Divide big delete into several small ones

Big transactions cause the Tlog to grow.When you do a clean of a large table, the delete statement can cause a very long transactionSometimes it's necessary to prevent this.So we divide one big delete into several little ones.A table with call centre data gets +/- 1-mlj records a day. Every day we run a script […]

You rated this post out of 5. Change rating

2002-08-27

821 reads

Technical Article

Function to Return the Amount of Children in a Tree

Assuming we have the following table (that stores hierarchical data)  :CREATE TABLE [staff] (    [employee] [int] NOT NULL ,    [employee_name] [varchar] (10) NULL ,    [supervisor] [int] NULL ,     PRIMARY KEY  CLUSTERED     (        [employee]    )  ON [PRIMARY] ,     FOREIGN KEY     (        [supervisor]    ) REFERENCES [staff] (        [employee]    ))I ‘ll built a […]

You rated this post out of 5. Change rating

2002-08-23

830 reads

Technical Article

Check W2K Event log and send results to DBA

This is a simple Script that checks the W2K event log of choice and emails the results to the DBA. This script also uses the find command so you can search for strings in your event logs. It creats two scripts, the first script sp_EventlogSys runs xp_sendmail which executes the second procedure sp_EventlogSysquery and attaches […]

You rated this post out of 5. Change rating

2002-08-22

821 reads

Technical Article

SP to display locking users in tree format

This SP will give a listing of users blocking and being blocked in a tree formation (similar to explorer tree list). It uses a User defined function that recurses through the locking information gathered from sysprocesses. The listing only shows the Hostname (username) and the SPID.First create the User Defined Function (Part One) then create […]

2 (1)

You rated this post out of 5. Change rating

2002-08-19

2,128 reads

Blogs

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...

Building Effective Data Governance Framework: Top Areas to Focus On

By

The post Building Effective Data Governance Framework: Top Areas to Focus On appeared first...

Read the latest Blogs

Forums

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,...

Do You Want a Microsoft Solution?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Do You Want a Microsoft...

The Density Vector

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Density Vector

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