0

Can anyone advice me how to write a script to automate TempDB free space check on SQL Server instances?

At the moment I connect to all instances individually and run the script

use tempdb
exec sp_spaceused

I have to repeat this for 10 other instances, which is very time consuming. I am a beginner and not very familiar with scripting. I would really appreciate if anyone could advice me on how to set up script to do this automatically so I can simply open a file to check the free space for the day for all instances.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

Using Registered Servers to Manage Servers

Sean Pearce
  • 1,150
  • 5
  • 10