Scripts

Technical Article

spFindTableInfo

spFindTableInfo is a great proc for finding info about your database.  It will accept parameters like tablename, fieldname, size, datatype.  So you can run it with no params, and it'll report every table, every field in those tables, and the size, datatype and whether its nullable or not.  You can filter it by Table name […]

You rated this post out of 5. Change rating

2002-03-05

378 reads

Technical Article

Return formatted datetime as a string

Pass a datetime value and receive back a formatted string. Much like the Format$ function in Visual Basic.I put this together to provide a date string to add to filename. Also handy when you are creating text files that require datetime data to be output in weird character formats like yyddmm or yyyymm.eg: fnDate2Char(GetDate(), 'dmy', […]

You rated this post out of 5. Change rating

2002-02-27

821 reads

Technical Article

Recompile Views/SPs from DOS from .SQL Files.

This script is very helpful for anyone trying to recreate particular SQL Server Database Versions for Testing.  It allows you to automatically recompile any stored procedures or views saved with drop, create and permission statements.  The scripts must all be sitting in one directory and end in the same extension.  I have found this very […]

You rated this post out of 5. Change rating

2002-02-25

683 reads

Technical Article

Re-create Transaction log file

This stored procedure detaches and re-attaches a database without specifying a filename for the transaction log. This causes SQL Server to create log file with default size of 512kb.After playing around with SHRINKDATABASE, SHRINKFILE, forcing the virtual log to wrap around, etc... I found this was the quickest and most reliable method of reclaiming the […]

You rated this post out of 5. Change rating

2002-02-25

2,606 reads

Technical Article

Auto generate sp's for any table * usp_create_sps

If you've ever been stuck having to write stored procedures to support an application, check this script out.  This script will automatically generate seperate parameter driven select, insert, delete, and update stored procedures.  Simply call these stored procedures from your application, passing parameters.  This stored procedure requires only one parameter; table name.  Creates scripts with […]

1 (1)

You rated this post out of 5. Change rating

2002-02-21

324 reads

Blogs

Master the Foundational Basics

By

It tells us to take the time to master the foundational basics of whatever...

Simple Talks Episode 9–Data masking and subsetting

By

The episode on data masking and subetting is out. You can see it here:...

T-SQL Tuesday #180: Avoid Perfect for Good Enough

By

I'm listening to Effortless by Greg McKeon (link to author's page) through Audible.com. He...

Read the latest Blogs

Forums

ssrs order of operation question

By stan

hi i need "sample size" in my report's 4th data region which is a...

Query Network Protocols from T-SQL or PowerShell

By webrunner

Hello experts, I want to be more organized about the SSL certificates we have...

Occasional Sql Server 2019 slowness (upgraded from 2014) -- please help...

By jellybean

Hi everyone, We recently upgraded our server to Sql Server 2019 (15.0.2125.1 (X64) on...

Visit the forum

Question of the Day

The Hash Join I

What are the two inputs called to a hash join operation in SQL Server? (choose 2)

See possible answers