Original source here
with fs
as
(
select database_id, type, size * 8.0 / 1000 size
from sys.master_files
)
select
name,
(select sum(size) from fs where type = 0 and fs.database_id = db.database_id) DataFileSizeMB,
(select sum(size) from fs where type = 1 and fs.database_id = db.database_id) LogFileSizeMB
from sys.databases db
However not all users have these permissions, script below to check a single table across multiple dbs.
Showing posts with label temp tables. Show all posts
Showing posts with label temp tables. Show all posts
Tuesday, 22 September 2015
Wednesday, 29 July 2015
Stored Procedure that disables failing Server Agent Jobs
I had a problem, I had a lot of development jobs that ran overnight, when they failed I got an email advising me of this. Then they failed again and again as they kept trying to run, this stored procedure monitors for failing jobs, using a user set limit and emails out a VERY bright red email to advise on what it's done.
Friday, 20 February 2015
TSQL Stored Procedure to disable failing jobs
Procedure to disable failing jobs and email an alert when this happens
Labels:
admin,
email,
rank,
SQL,
stored procedure,
temp tables
Subscribe to:
Posts (Atom)