Scripts

Technical Article

Replication PreScreen for proper Primary Keys

THIS TABLE WILL HODL YOUR TABLENAME AND UP TO THREE KEY COLUMNS FOR CREATING YOUR PRIMARY KEYSTHE OTHER COLUMNS ARE USED IN PROCESSING THE KEY'S AND GENERATING THE ALTER TABLE ASTATEMENTS TOCREATE THE PRIMARY KEYS FOR YOUR DB. THIS TOOL IS HANDY FOR PREPPING FOR A REPLICATION STRATEGY TO HELP YOU QUICKLY INDENTIFY IF YOU […]

You rated this post out of 5. Change rating

2005-08-03 (first published: )

364 reads

Technical Article

LOG SHIPPING FROM SCRATCH

We were experiencing significant issues with Cross Domain Log Shipping, even after getting help from Microsoft. The main reason was that in SQL Server 2000 you cannot access the Log Shipping Wizard from a scripting interface. This set of stored Procedures is all you need to setup a good log shipping framework in your organization […]

You rated this post out of 5. Change rating

2005-08-01 (first published: )

3,009 reads

Technical Article

Generate Insert Statements

If you wish to save the contents of your database as insert statements, this script will generate a text file that has all data formatted as insert statements. This way you can save off the data as a script to send to a client or combine with a create script to rebuild the database on […]

You rated this post out of 5. Change rating

2005-07-29 (first published: )

856 reads

Technical Article

Generate Quick Snapshot of table structures.

I use this script to quickly compare databases. In the past, I would generate creation scripts and compare those but that is tedious at best. This script generates a report of the metadata in an easy to read format that includes...- Table and Field Listing with types.- Foreign Key information- Primary Key and Index information- […]

5 (1)

You rated this post out of 5. Change rating

2005-07-28 (first published: )

578 reads

Technical Article

Find Nth Max-Min Record - The Efficient Way!

It is quite often that we need to find Nth (5th or 8th or 10th) maximum or minimum number of record from the record set. The solution is different in MS SQL than in Oracle because we have RowNum in Oracle. Some time ago I got the same problem with a massive table of more […]

You rated this post out of 5. Change rating

2005-07-22 (first published: )

1,036 reads

Technical Article

Deleting Sets of Rows in huge table

There was a problema user was reflecting http://groups.yahoo.com/group/sqlcon/message/1119What I did was following steps1. Divide the count of table into segments for divide2. Then use the even Odd functionality for smooth looping3. Use a simple while loop and SET ROWCOUNT functionality for further deletions across table with checkpoint4. It saved the log swell up and resources […]

You rated this post out of 5. Change rating

2005-07-20 (first published: )

254 reads

Technical Article

Sproc to get First Day of the Month,First Weekday ETC

First Day of the Month, First Weekday, Total Days in this Month, Days In First WeeK, Days In Last Week,Total Weekend Days sample output: Given Date:Jul 16 2005 12:00AM First Day of the Month:7/1/2005 First Weekday (sun=1,sat=7):6 Total Days in this Month:31 Days In First Week:2 Days In Last Week:1 Total Weekend Days:10

You rated this post out of 5. Change rating

2005-07-15 (first published: )

210 reads

Blogs

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

A New Word: Ochisia

By

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

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

Read the latest Blogs

Forums

How Do You Patch 100 Database Servers?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item How Do You Patch 100...

Microsoft SQL announcements at PASS Data Community Summit 2024

By Press Release

Comments posted to this topic are about the item Microsoft SQL announcements at PASS...

How to Develop Custom T-SQL Code Snippets in Azure Data Studio

By Noman072

Comments posted to this topic are about the item How to Develop Custom T-SQL...

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