March 2, 2006 at 9:36 am
Dear all,
I would like be able to pull up all those data that bring us system procedures such as sp_spaceused, sp_tables, into a temporary table and so on...
Does anyone have ever used or experienced with the system procedure output?
For example:
sp_spaceused <TABLE>
SP_TABLES
Thank a lot for any input,
March 2, 2006 at 11:18 am
Maybe: (I haven't tried this......)
SELECT INTO ##mytable
FROM (EXEC sp_spaceused
March 2, 2006 at 11:24 am
hi SqlBill,
Unfortunately, that doesn't works. I am almost sure that might have any solution for that. Apparently BOL no says nothing about that.
Think, think
March 2, 2006 at 11:29 am
I've created this:
CREATE TABLE TESTSPACEUSED (
FI varchar (60),
ROWS1 INT,
rESERVED varchar(20),
data varchar(20),
index_size varchar(20),
unused varchar(30)
) ON [PRIMARY]
GO
And then I tried this statement, obtaining unsuccessful results:
SELECT *
FROM TESTSPACEUSED inner join (sp_spaceused <table> as A on testspaceused.fi <> A.name
March 2, 2006 at 11:49 am
On the other hand, this works but not very perfectly...
insert into testspaceused
EXEC SP_MSFOREACHDB 'USE BDGENERAL; EXEC SP_SPACEUSED G03OFIC'
testspaceused is the table above created...
March 2, 2006 at 11:49 am
On the other hand, this works but not very perfectly...
insert into testspaceused
EXEC SP_MSFOREACHDB 'USE BDGENERAL; EXEC SP_SPACEUSED G03OFIC'
testspaceused is the table above created...
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply