send2mark
asked on
SQL Query for SharePoint
I'm looking for a query that will show my Site Collections with size. I tried select * from Sites and that will give me the size without the URL. select * from webs where ParentWebID is NULL will show me the sub sites which would be fine too, but it doesn't show the size.
it may probably be easier if you would run from command prompt on the SP sherver:
stsadm -o enumsites -url http://YOUR_ROOT_SITE_URL
This command will display a list of all the site collections in your environment, including the sizes.
stsadm -o enumsites -url http://YOUR_ROOT_SITE_URL
This command will display a list of all the site collections in your environment, including the sizes.
ASKER
irinuc, its a good idea, but I need to know which database they're in. That is why I am doing it in SQL. We have 14 Content databases and I am moving site collections because some of them are getting too big.
What version of Share Point do you have? I think in MOSS, this command lists also the database where the site collection is located.
Let me double check that, to make sure; maybe you need to add another parameter to the command...
Let me double check that, to make sure; maybe you need to add another parameter to the command...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Consider using this space monitoring tool instead:
http://www.thesug.org/blogs/lsuslinky/SSM/Pages/default.aspx