SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Save Stored Procedure Output

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Save Stored Procedure Output
Author Message
Jason



Joined: 29 May 2001
Posts: 27

Post Save Stored Procedure Output Reply with quote

I am using the script below and would like to save the results of the stored procedure to the file in DatabaseSave. This SP cycles through many databases but only the final one is written. Can I append to a file?

dim rows, number
DatabaseConnect("ServerName")
DatabaseRetrieve( "exec all_db_shrinkdatabase", rows)
DatabaseSave( "d:\jobs\db audit\ShrinkDB.txt", "TXT", rows )

Another possibilty would be to write the results to a table. How do I capture the results to use them with a DatabaseInsert command?

Thanks for the help!

Jason

Fri Aug 13, 2004 9:32 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Save Stored Procedure Output Reply with quote

Modify the stored procedure to put all results into a table (or write a warpper procedure for that) then retrieve the complete result from the table.

or

modify the stored procedure and add a parameter (database id or name). Call it in a loop for each db separatelly and
save each one in a different file then concatenate files together like

copy file1 + file2 + file3 final_file

: I am using the script below and would like to save the results of the stored
: procedure to the file in DatabaseSave. This SP cycles through many
: databases but only the final one is written. Can I append to a file?

: dim rows, number
: DatabaseConnect("ServerName")
: DatabaseRetrieve( "exec all_db_shrinkdatabase", rows)
: DatabaseSave( "d:\jobs\db audit\ShrinkDB.txt", "TXT",
: rows )

: Another possibilty would be to write the results to a table. How do I capture
: the results to use them with a DatabaseInsert command?

: Thanks for the help!

: Jason

Fri Aug 13, 2004 10:33 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.