Scripts

Technical Article

Find and REMOVE string from stored procedures

This script extends the "Find strings in text of stored procedures" Script by LiviuB and and now finds thestring and removes it. You may modify script to just comment out the text.This script removes the text (in this case 'set dateformat dmy') from all non-system stored procedures in a database.Modify the variable @searchstring to contain […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2004-11-26 (first published: )

302 reads

Technical Article

Easy and Fast way to check Backup details

Easy and Fast way to check Backup details. One line query to check backup status for all the databases. No need to go to each database or schedule job. Even you can use this query in customized application to get all the details on a single screen.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2004-11-25 (first published: )

745 reads

Technical Article

Get Table Sizes and Percent of Database Size

This script uses two undocumented stored procedures that retrieve all tables in the database in which it is run and lists the data and index sizes, the sum of these sizes, and the table's size percentage of the entire database. The results are presented in descending order of the sum of the data and index […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2004-11-24 (first published: )

2,455 reads

Technical Article

A different Weekdays Between test

Recently, I answered a question by a person on Experts Exchange.com on how to find the # of weekdays between two dates. This question was simplified greatly by the fact that the dates given would always be from Monday to Friday, and so the calculations needed were very simple.Then, while looking at the recent scripts […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2004-11-22 (first published: )

147 reads

Technical Article

Grant Read-only permission to user on jobs

create this SQL as a stored procedure and give user execute permissions on it store procedure. that user will be able to see all the jobs and their associated schedules but won't be able to modify, create or execute job. This is particularly a request most often aske dby developer to view jobs/schedules on production […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2004-11-15 (first published: )

647 reads

Technical Article

Fix orphan users

some times after restore database, you find your logins and users mapping is lossed and no user can now logon to database using application. I faced that many times. To map all your database users with master..syslogins. save this procedure in current database and execute it. All users will be mapped with logins.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2004-11-12 (first published: )

399 reads

Technical Article

Selective Defrag/Reindex and Log

SQL 2000 OnlyThis script will create a stored procedure and a table in the master database. Simply run the stored procedure and supply a database name as a parameter. It will do the following:1. Gather/Log DBCC SHOWCONTIG statistics (pre defrag)2. Defragment all user indexes in the database3. Gather/Log DBCC SHOWCONTIG statistics (post defrag)4. DBCC DBREINDEX […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(3)

You rated this post out of 5. Change rating

2004-11-11 (first published: )

2,249 reads

Blogs

Microsoft Tools for Making Data AI-Ready

By

Making Data AI-Ready, Part 2 (This is the second article in a three-part series...

Local Models Using GPUs with Ollama

By

Can you use your GPUs when running a local model under Ollama? You can,...

Don’t Fear the Technology

By

The concern that a particular technology is going to destroy the world seems to...

Read the latest Blogs

Forums

RegEx Functions III

By Steve Jones - SSC Editor

Comments posted to this topic are about the item RegEx Functions III

Optimized Locking in SQL Server 2025: Fewer Locks, Less Blocking, and the Cases It Cannot Fix

By vgupta

Comments posted to this topic are about the item Optimized Locking in SQL Server...

Finely Tuned Models

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Finely Tuned Models

Visit the forum

Question of the Day

RegEx Functions III

If I run the REGEXP_LIKE() function, does it match values in a case-sensitive fashion, or a case-insensitive fashion by default.

See possible answers