Scripts

Technical Article

List all indexes with keys, description and size

This script combines functionality of sp_helpindex and sp_spaceused to list all tables with individual indexes, their keys and description  (sp_spaceused cannot do that) and size in MB per individual index (sp_helpindex cannot do that either). Feel free to use and modify as you see fit. Hope it can help.

5 (9)

You rated this post out of 5. Change rating

2007-07-03 (first published: )

2,648 reads

Technical Article

Building Automated Backups in MSDN

We write this script due we needed to implement a backup strategy in some machines with MSDE located in remote offices.In that offices there isn't Enterprise Manager, so we send the script to the office and they just execute it.Comments will be welcome

You rated this post out of 5. Change rating

2007-07-02 (first published: )

401 reads

Technical Article

Find Nth Occurrence of Character Function V3

In the tradition of best practice & code improvement, a third iteration of a script that finds the Nth occurrence of a Target string within another string (Original author unknown, V2 author vextant).This version returns zero if an Nth occurrence is not found (similar to V1), but also provides the ability to search the string […]

You rated this post out of 5. Change rating

2007-06-29 (first published: )

423 reads

Technical Article

Get full name of a person

Person name may have these combination in database1. firstname only2. middlename only3. lastname only4. firstname + middlename5. firstname + lastname6. middlename + lastnameAnd firstname, middlename, lastname may contain null or empty string in data. but usee want to display Fullname without spaces then how will combine all.

1 (1)

You rated this post out of 5. Change rating

2007-06-28 (first published: )

1,099 reads

Technical Article

DeDuping Tables with Duplicate Records

The script is in three parts:1. A select statement to determine the number of duplicate records contained within the table2. The deduping process builds a temporary table called #Duplicates and uses it to compare duplicates across both similar tables whilst deleting records with multiple counts3. Final test of deduping with no records indicating table is […]

5 (1)

You rated this post out of 5. Change rating

2007-06-27

379 reads

Technical Article

Shrink databases

This procedure is used to shrink the databases. Many times we use shrink option to shrink the databases for backup. and we do it N number of times, when we take the back of databses or make free space of drive.instructions:- Follwo the step.1. run script.2. And execute the statement, exec shrink_databasesI m new, if […]

3 (1)

You rated this post out of 5. Change rating

2007-06-27

789 reads

Technical Article

DES Encryption/Decryption Function

There is a great article on SQLServerCentral on an Extended Stored Procedure http://www.sqlservercentral.com/columnists/mcoles/freeencryption.asp and this XP will undoubtedly perform better than my Function. However I had a need to encrypt a column in a shared hosted environment where I was not allowed to install XPs. Just copy script and paste into Query Analyzer

You rated this post out of 5. Change rating

2007-06-26 (first published: )

1,236 reads

Technical Article

Custom Log Shipping using VB.NET

This is a first version of a custom solution for SQL Server log shipping using VB.NET 2005 and .NET Framework v.2.0. The script has to run on a server where you have SQL Server 2005 (or at least tools) installed because it uses new SMO. For some functions of the script you will have to […]

1 (1)

You rated this post out of 5. Change rating

2007-06-22 (first published: )

1,124 reads

Blogs

SQL Server Distributed Availability Groups and Kubernetes

By

A while back I wrote about how to use a Cross Platform (or Clusterless)...

Webcast Tomorrow on SQL Server Disaster Recovery

By

Tomorrow, November 19, 2024, at 1 PM EST, I'm giving a webcast on SQL...

SQL Server Quickie #48 – Azure SQL Managed Instance

By

Today I have uploaded SQL Server Quickie #48 to YouTube. This time I’m talking...

Read the latest Blogs

Forums

Converting job_id to join to another table.

By Brandie Tarvin

I need help, please! I have a monitoring table that pulls in information about...

SSMS 20.2 on Windows11 not able to connect to SQL 2005 ??

By Johan Bijnens

We still have a couple of dino's. What should I check to re-enable access...

Agent job security account

By onkarnath.tiwary

Hi All, I have few sql server agent scheduled jobs which are supposed to...

Visit the forum

Question of the Day

What's the Ceiling?

What do I get as the results from this code?

SELECT CEILING (999.999), CEILING (-999.999);

See possible answers