Maintenance and Management

Technical Article

sp_checksize

  • Script

This stored procedure checks the sizes of one or all databases (including total data, total log, data used/free, data used/free percentage, log used/free, log used/free percentage). If a database name is provided, it will only check the given db. If no parameters provided, all dbs will be checked and the total size of all dbs […]

You rated this post out of 5. Change rating

2002-10-01

1,027 reads

Technical Article

Script Database Objects

  • Script

Others have asked for this throught the disussion threads so I thought others might benefit as well.This SQL-DMO script will create multiple files for server logins (SIDs & encrypted passwords), database users, tables, procedures and views.1.  Alter the script to reflect your server and path for output files.2.  Create the job (ActiveX Script).Be great!Michael

You rated this post out of 5. Change rating

2002-09-20

1,196 reads

Technical Article

Script to gain capacity information

  • Script

Recently at my site we had a need to gather current capcatiy of all databases as well as table obejcts on our servers.  although there are some out of the box stored proceudres to assist in this effort as well as some schema objects, they mostly would return information on one database at a time.  […]

5 (2)

You rated this post out of 5. Change rating

2002-09-20

271 reads

Technical Article

Script All Jobs

  • Script

We utilize this to script our jobs on a scheduled basis.  The main advantage is that it is automated and really comes in handy when there is a large number of jobs.1.  Create a job; ActiveX Script.2.  Paste the code; change the server/path to your desired values.

5 (2)

You rated this post out of 5. Change rating

2002-09-19

894 reads

Technical Article

Check W2K Event log and send results to DBA

  • Script

This is a simple Script that checks the W2K event log of choice and emails the results to the DBA. This script also uses the find command so you can search for strings in your event logs. It creats two scripts, the first script sp_EventlogSys runs xp_sendmail which executes the second procedure sp_EventlogSysquery and attaches […]

You rated this post out of 5. Change rating

2002-08-22

824 reads

Blogs

How to find free space in Azure PosgreSQL

By

I wanted to figure out how big (or approximately how big) my dump file...

T-SQL Tuesday #180: Good enough is perfect Roundup

By

This month, I prompted bloggers to discuss whether good enough is perfect. Thank you to all...

Using SQL Compare with Read-only Access

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Read the latest Blogs

Forums

Announcing SQL Server 2025

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Announcing SQL Server 2025

Running Steve's Code

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Running Steve's Code

New SQL Server 2022 Functions

By Steve Jones - SSC Editor

Comments posted to this topic are about the item New SQL Server 2022 Functions

Visit the forum

Question of the Day

Running Steve's Code

Can you run this code in any of your SQL Server 2019 databases without error?

CREATE OR ALTER PROCEDURE [dbo].[StevesAmazingProc]
AS
    
        SELECT Consumer_ID ,
               Trend_Category ,
               Bit_Trace
        FROM    NewWorldDB.dbo.MarketTrend;
    
GO

See possible answers