Viewing 15 posts - 91 through 105 (of 254 total)
My pleasure. If there's anything else just let me know. 🙂
May 6, 2014 at 4:44 pm
Sorry, I did a post and then an edit. Does the version you are trying have "AND SJH.run_status = 0" in it?
May 6, 2014 at 4:36 pm
Try this:
----------------------------
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SET NOCOUNT ON
IF OBJECT_ID (N'dbo.usp_FailedSQLAgentJobs_Alert', N'P') IS NULL
BEGIN
EXECUTE ('CREATE PROCEDURE dbo.usp_FailedSQLAgentJobs_Alert AS SELECT 1 AS shell')
END
GO
-----------------------------------------------------------------------------------------------------------------------------
-- Main Query: Create Procedure
-----------------------------------------------------------------------------------------------------------------------------
ALTER PROCEDURE dbo.usp_FailedSQLAgentJobs_Alert
@Output_Mode AS CHAR...
May 6, 2014 at 4:01 pm
Have you tried moving the "Skip_Agent_Jobs:" to the bottom of the script, right before the final "GO"? Or even just setting up each job to notify you individually if /...
May 6, 2014 at 3:40 pm
pperez 40143 (4/24/2014)
A workaround would be to output the result...
April 24, 2014 at 2:56 pm
pperez 40143 (4/24/2014)
EXEC sp_msforeachtable 'sp_spaceused "?"'
With this you get the rowcount per table plus the space reserved/used/unused. It works in all versions.
Great unless you have a lot of tables. :(...
April 24, 2014 at 1:47 pm
Pix1985 (4/24/2014)
[Code="SQL"]
SELECT st.Name, sp.Rows
from sys.tables st
JOIN sys.partitions sp
on st.object_id = sp.object_id
Order by st.Name
[/Code]
I've ran them both, i'm getting...
April 24, 2014 at 9:53 am
This is the fastest and most accurate way that I know of doing this:
SELECT
SCHEMA_NAME (T.[schema_id]) AS [schema_name]
,T.name AS table_name
,sqR.total_rows
FROM
sys.tables T
INNER JOIN
(
SELECT
P.[object_id]
,SUM (P.[rows]) AS total_rows
FROM
sys.partitions P
WHERE
P.index_id IN (0, 1)
GROUP...
April 24, 2014 at 6:15 am
hfreeman (4/11/2014)
Lookup Error - SQL Server Database Error: Divide by zero error encountered on line 154
the start of the select query
-----------------------------------------------------------------------------------------------------------------------------
--Main Query: Final Display /...
April 11, 2014 at 1:11 pm
ScottPletcher (4/11/2014)
Excellent! The other thing you need to include in your analysis is the "missing index" info from SQL (DMVs sys.dm_db_missing_index*).
I agree, but I found it a bit "heavy"...
April 11, 2014 at 1:09 pm
At the very least it's just a cool concept. 🙂
February 4, 2014 at 3:40 pm
Well done. Great article!
January 15, 2014 at 5:57 am
Viewing 15 posts - 91 through 105 (of 254 total)