Hey I'm having a similar problem. The designer has greyed out the "Add stored proc" options when I right-click either of the Stored proc options, both retrieval and action. And there are indeed 2 stored procedures in existence.
This is the stored proc I've created:
-- ########################################## Table Spaced Used
CREATE PROCEDURE dbo.TableSpaceUsed
AS
-- Create the temporary table...
CREATE TABLE #tblResults
(
[name] nvarchar(30),
[rows] int,
[reserved] varchar(50),
[reserved_int] int default(0),
[data] varchar(50),
[data_int] int default(0),
[index_size] varchar(50),
[index_size_int] int default(0),
[unused] varchar(50),
[unused_int] int default(0)
)
-- Populate the temp table...
EXEC sp_MSforeachtable @command1=
"INSERT INTO #tblResults
([name],[rows],[reserved],[data],[index_size],[unused])
EXEC sp_spaceused '?'"
-- Strip out the " KB" portion from the fields
UPDATE #tblResults SET
[reserved_int] = CAST(SUBSTRING([reserved], 1,
CHARINDEX(' ', [reserved])) AS int),
[data_int] = CAST(SUBSTRING([data], 1,
CHARINDEX(' ', [data])) AS int),
[index_size_int] = CAST(SUBSTRING([index_size], 1,
CHARINDEX(' ', [index_size])) AS int),
[unused_int] = CAST(SUBSTRING([unused], 1,
CHARINDEX(' ', [unused])) AS int)
-- Return the results...
SELECT * FROM #tblResults
Could it be some sort of permissions thing? I've done the unattended refresh.
Thanks,
- Jared