Scripts

Technical Article

View all settings for all databases on your server

My stored procedure, sp_dbsettings, allows you to view, in a cross-tabular format, all the common options and their values for all the databases on your server.  Optionally, you can pass a database name as an argument if you just want to view the settings for one database (i.e., EXEC sp_dbsettings 'Northwind').  Otherwise it shows info […]

You rated this post out of 5. Change rating

2002-10-09

635 reads

Technical Article

Find and replace column constraints

I submit this script as an example of how one might go about generating 'Alter Table' statements that find and replace specific column constraints. In my case I had to find all occurrences in a production db of suser_name() as a column constraint and replace it with suser_sname(). This script is only an example and […]

You rated this post out of 5. Change rating

2002-10-08

247 reads

Technical Article

Get DB Table Details Quickly

Get All the Table Details in a Database in a Second By Running sp_table_info. This procedure will give the No. of row , reserved space , data space , index space and Unused space. Compile the Procedure in Master Database and access it from any other database. We can use it for a single table […]

You rated this post out of 5. Change rating

2002-10-08

491 reads

Technical Article

Database Identity property resetter

After going through development and test cycles it can be laborious to have to go and reset identity properties on tables (Yawn!!) So I wrote a script to do it. It has two parameters database name and identity start value. It basically checks the identity value with the number of rows in the table. if […]

You rated this post out of 5. Change rating

2002-10-06

319 reads

Technical Article

Change the probability of the pseudo-random values

The usual practice, when we need some test data, is to employ the pseudo-random built-in function RAND(). We usually use it to produce a random value in some range and it produces these values with the same probabilities. Sometimes we need more "realistic" data when some values are more probable than others are. In this […]

5 (1)

You rated this post out of 5. Change rating

2002-10-04

263 reads

Technical Article

Frequency of each field in table

This SP will generate the frequency of each occurrence in a field or for every field in a table. The syntax isexex sp_freqall , , , , for example:exec sp_freqall utems2000_2001, null,lastname, 100would return a table (with a field name and a count) for each field in the utems2000_2001 table, except the lastname field and […]

You rated this post out of 5. Change rating

2002-10-03

225 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