|
Comments
|
|
not well explained ; only those who have good understanding can understand the purpose of that un-documented procedure
|
|
|
Thanks. Ya learn something new everyday.
|
|
|
I wrote an sp like a year ago to do so... jajajaja
|
|
|
Great. I knew about sp_foreachtable, but not about sp_foreachdb
|
|
|
Good and to the point!
Thank you,
Tonci.
|
|
|
It is possible to limit the ms_foreachdb to certain databases. I have done it before.
|
|
|
Excellent video...
|
|
Darren Bates on
10/7/2009
@Feodor: do you have a link? and does the method also work for sp_msforeachtable?
|
|
|
Aren't those undocumented procs meaning - no MS support if something "blew up" as a result of using them?
|
|
|
I never heard of sp_MSForEach system SP's before. This is great information. Thanks!
|
|
|
@Darren Bates: Hello Darren, I am planning on filming a video myself tomorrow about this. It turned out that there are loads of things you can actually control. A while back I had used sp_MSForEachDB to run a procedure towards all user dbs. And today I went exploring the possibilities even further, and I think they are endless.
|
|
|
@Neal Pawlowski: Neal, this is true. However, sp_who2 is also undocumented and I don't see myself surviving as a DBA without it. On the other hand, when I have to do more advanced routines, I use BI tools. There are great features which help with iteration, filtering, variable mapping, etc.
|
|
|
From looking at the proc sp_MSforeachDB it looks like you have the option of changing the placeholder character from '?' to something else. You can also add in a pre command, a post command that are run 'as is' (no placeholder substitution), and it looks like two additional commands that allow for placeholder substitution.
|
|
|
[sp_MSforeachtable] allows for a little more flexibility too: "This proc returns one or more rows for each table (optionally, matching @where), with each table defaulting to its own result set
@precommand and @postcommand may be used to force a single result set via a temp table.
|
|
|
Be a bit cautious with these. They use a global cursor which may unintentionally cause issues depending on how you go about using these.
|
|
Steve Culshaw on
10/9/2009
Excellent tip
|
|
|
It is very clear! Do not re-invent the wheel.
Thank you very much
|
|
|
Well communicated concepts.
|
|
|
This video doesn't play for me - I click on it and nothing happens. I've tried re-loading the page?
|
|
|
This was because the popup window was already open and hidden... sorted now.
|
|
Kamen Angelov on
10/24/2009
Very usefull info!
|
|
|
Awesome explanation, really appreciated this video.
|
|
|
Thank you, I learn a lot from these videos!
|
|
|
I just uploaded a video which shows how to run the procedure for certain databases only. You may view it when it is featured on the site.
|
|
ML Stephens on
11/27/2009
did not know about this one thanks---can use it right away----doing conversion from 2000 to 2005
|
|
|
Here is the video which shows how to use sp_MSForEachDB with a filter. http://www.sqlshare.com/Media.aspx?vid=681
|
|
|
good
|
|
|
Very useful... didn't konw the '?' trick..
|
|
|
Thank you
|
|
|
Issue with volume. Generally all your videos have problem with audio...
|
|
|
ok
|
|
|
Informative viedo
|
|
|
Tx.
|
|
|
Sound was very quiet...and I had it cranked all the way up on the display, and on my laptop.
|
|
|
Good video
|
|
|
Good one..
|
|
mark mcnary on
11/16/2010
I am new to SQL server, and these undocumented SP's are fascinating to me
|
|
|
Thanks
|
|
|
Good info
|
|
Russell Tye on
12/12/2010
Good information...
|
|
|
Good Video
|
|
|
Very nice.
|
|
|
Sweet, looks very usefull.
|
|
|
Very Good
|
|
Jamshid Nouri on
2/20/2012
excellent demo!
|
|
Steve Culshaw on
2/20/2012
Good tip on in-built functionality
|
|
|
The xp_msforeachdb does not always work under heavy load, so don't rely on it for production environments..
Look at http://www.mssqltips.com/sqlservertip/2201/making-a-more-reliable-and-flexible-spmsforeachdb/
|
|
Sherwood Munk on
2/20/2012
Quick and to the point. However, this particular process would seem to have limited application.
|
|
|
Would have been nice to know before I wrote my daily DB checking scripts, but was easy to modify and implement.
|
|
|
Nice to know that there are these kinds of things in SQL server.
|
|
|
Absolutely great presentation!!!
|
|
Paul Jemiolo on
2/21/2012
I believe each of these SP's are going to be degraded soon. Still, it's a good article.
|
|
|
I'd like to see additional ways to use them.
|
|
|
very useful as those sp's are not common
|
|
|
Very useful for me. And Timely as well!!!
|
|
|
good one
|
|
|
very useful Stored Procedures.
|
|
|
Excellent!
|
|
|
Excellent video!! keep up the good work.
|
|
|
its grate video
|