Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by RBarryYoung
»
Table Information View -- No Cursors!
22 posts, Page 1 of 3
1
2
3
»
»»
Table Information View -- No Cursors!
Rate Topic
Display Mode
Topic Options
Author
Message
RBarryYoung
RBarryYoung
Posted Monday, March 17, 2008 1:24 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
Comments posted to this topic are about the item
Table Information View -- No Cursors!
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #470113
bitbucket-25253
bitbucket-25253
Posted Tuesday, April 08, 2008 8:38 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 3:04 PM
Points: 5,101,
Visits: 20,200
Thanks for your unique point of view - it works like a charm ... will be added to my bag of "tricks"
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #481595
wavesmash
wavesmash
Posted Tuesday, April 08, 2008 11:20 AM
Grasshopper
Group: General Forum Members
Last Login: Tuesday, February 19, 2013 9:19 AM
Points: 11,
Visits: 337
This is what I use, however it would need to be modified to insert into a table if you wanted to select against it.
sp_msforeachdb 'use ?;exec sp_spaceused'
cheers,
Andrew
Post #481750
RBarryYoung
RBarryYoung
Posted Tuesday, April 08, 2008 4:30 PM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
bitbucket (4/8/2008)
Thanks for your unique point of view - it works like a charm ... will be added to my bag of "tricks"
Thanks for the feedback Bit.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #481927
RBarryYoung
RBarryYoung
Posted Tuesday, April 08, 2008 4:33 PM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
wavesmash (4/8/2008)
This is what I use, however it would need to be modified to insert into a table if you wanted to select against it.
sp_msforeachdb 'use ?;exec sp_spaceused'
cheers,
Andrew
That's how I used to do it too Andrew, and that is actually the reason why I wrote this View. Besides being undocumented, sp_msForEachDB encapsulates a cursor to accomplish its magic, which carries along with it all of the limitations and problems of a cursor.
I wanted something that could be used
anywhere
in SQL Server and that means a View. So I did essentially what you suggest: I looked at how sp_spaceused works and then extended it to a Select in order to build the View.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #481928
jezman
jezman
Posted Tuesday, August 12, 2008 4:57 AM
Grasshopper
Group: General Forum Members
Last Login: Yesterday @ 7:33 AM
Points: 23,
Visits: 105
I always like a query that gets down and dirty with system tables ;)! Nice. But I'm not sure occasionally cursoring through a few hundred tables is really that much of a chore for SQL Server! It's the counting that takes the time! Still, it's always nice to complete these challenges we set ourselves!
Post #550860
shadab08
shadab08
Posted Monday, September 08, 2008 1:08 AM
Forum Newbie
Group: General Forum Members
Last Login: Monday, September 08, 2008 1:07 AM
Points: 1,
Visits: 0
:P
hello how r u dudes
i want to know abt the normalisations
Post #565238
Jack Corbett
Jack Corbett
Posted Tuesday, November 25, 2008 8:31 PM
SSChampion
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:22 PM
Points: 10,571,
Visits: 11,871
Nice script Barry. Is there one that will work on 2000?
Jack Corbett
Applications Developer
Don't let the good be the enemy of the best. --
Paul Fleming
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #608811
RBarryYoung
RBarryYoung
Posted Tuesday, November 25, 2008 9:42 PM
SSCrazy Eights
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
I believe that this can be made to work on SQL 2000, Jack. But I would need some time on one of the few SQL 2000 systems that I still have access to, to work it out...
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #608832
GabyYYZ
GabyYYZ
Posted Friday, February 06, 2009 6:42 AM
Right there with Babe
Group: General Forum Members
Last Login: Today @ 8:32 AM
Points: 795,
Visits: 1,982
bitbucket (4/8/2008)
Thanks for your unique point of view - it works like a charm ... will be added to my bag of "tricks"
Very nice, I too will add it to my toolkit. Especially love getting the schema details. I tried writing one to work with AdventureWorks which has multiple schemas, and got one to work, but no where near as elegant as your script.
Gaby
________________________________________________________________
"In theory, theory and practice are the same. In practice, they are not."
- Albert Einstein
Post #651581
« Prev Topic
|
Next Topic »
22 posts, Page 1 of 3
1
2
3
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.