Maintenance and Management

Technical Article

Display Rows/Space Used by all user tables

  • Script

This procedure will display the rows, reserved, data, index and unused space used in KB for all user tables in the database.  The idea is to call sp_spaceused repeatedly.  Limitation: certain versions of sp_spaceused will truncate the table name to 20 characters.Speed will depend on current activity level and locking in the database.  It will […]

You rated this post out of 5. Change rating

2002-03-14

395 reads

Technical Article

sp_spaceused2

  • Script

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

304 reads

Technical Article

Server User Access

  • Script

This script runs from the master database and records all the databases on the server. It then checks each database for users and records their name and the database(s) on which they have access. You can then create a nice cross tab report using any report designer (I used crystal) showing users on the databases […]

You rated this post out of 5. Change rating

2002-02-11

496 reads

Technical Article

Monitor File Growth - Set Based sp_MSforeachdb

  • Script

This is a script, similar to some you have seen in the past, that will monitor file growth on all databases for the given server. This script is not a fancy solution that has a tons of bells and whistles but, it is efficient. The script is a concantanation of the create table / populate […]

4.5 (2)

You rated this post out of 5. Change rating

2001-12-21

3,366 reads

Technical Article

Query to Display Trigger Status

  • Script

Ever wanted to know whether your triggers are enabled or not? The ObjectProperty command allows you to select information about the status of objects in your database, returning 1 for True and 0 for False. The example below determines whether a single trigger is disabled. SELECT ObjectProperty(object_id('Trigger_Name'), 'ExecIsTriggerDisabled') There are a number of other useful […]

5 (1)

You rated this post out of 5. Change rating

2001-10-28

1,197 reads

Blogs

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

The Comprehensive Guide to Mastering Your SQL DBA Skills

By

Database administrators (DBAs) are the backbone of data-driven organizations. If you're looking to break...

Friday Basics: Authentication vs. Authorization

By

Another security fundamentals topic is authentication versus authorization. For those who have a clear...

Read the latest Blogs

Forums

The OS returned the error '(null)' while attempting 'DeleteFile' filestream.hdr

By lmarkum

I have a SQL Server 2019 Enterprise Edition on CU 25. It has in-memory...

Take Care

By Grant Fritchey

Comments posted to this topic are about the item Take Care

Performance

By LearningDBA

Experts, I am learning some skills so I can troubleshoot some performance-related issues. I...

Visit the forum

Question of the Day

Two Table Hints

What happens when I run this code:

SELECT
  p.ProductName
, p.ProductCategory
FROM dbo.Product AS p WITH (NOLOCK, TABLOCK);

See possible answers