Scripts

Technical Article

Find a string in DB objects.

Find a string in Procedures, Triggers, Constraints, Defaults, Functions, and Views. First off this will not work for any items that have the WITH ENCRYPTION remark in them. With this is can pose a string such as 'INSERT' against all the 'P'rocedures to get a return of which Procedures have an INSERT statment in them […]

5 (1)

You rated this post out of 5. Change rating

2002-02-21

1,695 reads

Technical Article

sp_spaceused2

An update to sp_spaceused2. This update fixes some problems related to dbs that are non-accessible such being offline. This stored proc can be run from any database when compiled in master and can report information on all databases at once. Get information on all dbs, one db, one db and all its tables or one […]

You rated this post out of 5. Change rating

2002-02-19

307 reads

Technical Article

Analyze Space Used for each Table

The following batchfile demonstrates how to use Windows command extension to extract the values of sp_spaceused for each table in the database. The output of sp_spaceused itself contains strings that do not get easily analyzed. The batch file extracts the numbers and outputs the sizes for each table in the database.Copy the batchfile to a […]

You rated this post out of 5. Change rating

2002-02-18

2,275 reads

Technical Article

DATEMY - Covnerts and validates MM/YY, MM/YYYY

If you've ever needed a convenient and quick way to convert/validate what could possibly be a mm/yy or mm/yyyy date to mm/dd/yyyy (date of month is 01) check out this custom function.  Eg:  select dbo.datemy('04/02') outputs smalldatetime '2002-04-01 00:00:00'.  Select dbo.datemy('04/2002') outputs the same smalldatetime '2002-04-01 00:00:00'.

You rated this post out of 5. Change rating

2002-02-15

869 reads

Technical Article

Rename User Login

You can effectively rename a user account but as this is messing wit the system tables I would suggest dropping and adding the user back. But for those of you who really want to know how here it is.First off I tested this and it works fine renaming a user. However this is directly modifying […]

You rated this post out of 5. Change rating

2002-02-14

897 reads

Technical Article

Send notifications on job STEP failures (trigger)

Have you ever wanted to have SQL note a failure on a step, yet continue running the job.  I found it to be annoying that you have to fail (and end) a job in order to send a message to an operator.  I have processes that run at off times, I want to know when […]

5 (2)

You rated this post out of 5. Change rating

2002-02-13

2,263 reads

Technical Article

Compare Definition and Data of table in 2DBs

This proc compares the table definition and the data in a table which is in two of your databases. Typically you may have a development database and a production database on the same server and you just want to know that the table is the same on both. (This proc will express the data differences […]

You rated this post out of 5. Change rating

2002-02-11

271 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