Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 insert output of SP into table

Author  Topic 

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2007-08-20 : 06:20:15
Hi gurus

Please help me to get out the problem ... i wanna store the output of SP_MONITOR into a table. Please let me know how can i do this

Thanks & Regards
Chander

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-08-20 : 06:30:32
As it returns multiple resultsets you cant store the result in a table

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2007-08-20 : 06:36:56
Can u please tell me any other way to do this task. My main aim is to gather system level info in a table.Please tell me the procedure to do this

Thanks & Regards
Chander
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-08-20 : 07:18:41
create YourTable (columns that will be returned by your sproc)

insert into YourTable (columns)
exec sp_monitor

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2007-08-20 : 07:21:30
Hi

Let me try this create table procedure

Thanks
Chander
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-08-20 : 08:22:19
quote:
Originally posted by spirit1

create YourTable (columns that will be returned by your sproc)

insert into YourTable (columns)
exec sp_monitor

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp


provided sp_monitor should return single resultset

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-08-20 : 11:57:55
maybe s/he can echo the results to a file



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-08-20 : 12:00:18
Well it's already in a table

SELECT * FROM master.dbo.spt_monitor

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -