July 31, 2011 at 10:59 pm
how to
If I want to store the data of running sp_helpdb to a table, I can use below way.
create table all_database
(
dbname sysname,
dbsize nvarchar(13) null,
owner sysname null,
dbid smallint,
created nvarchar(11),
dbdesc nvarchar(600) null,
cmptlevel tinyint
)
insert into all_database exec sp_helpdb
The sp_helpdb only gives out a table. But if we run sp_helpdb master, it will give out two tables with the information. Do anyone know how to save the data from the two given tables to the database?
July 31, 2011 at 11:27 pm
August 1, 2011 at 2:18 am
I recommend querying sys.databases and sys.master_files
August 1, 2011 at 2:28 am
Suresh B. (8/1/2011)
I recommend querying sys.databases and sys.master_files
Yes, actually I can read from the definition of the SP to write the select statement. But what if I cannot know the definition and which table or view the data were got from?
That I need is to store the data from two or more tables that a SP output to some tables.:hehe:
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply