December 29, 2003 at 10:35 am
Is there a system function / stored proc to find the default file group for
a database? I need to find this for about 100 databases, so GUI is not a
solution. Select * from sysfilegroups, seems to show status of 16 for
default file groups. Is that true? I would prefer is there is already
a system function or proc that already deciphers these bit masks
thanks.
December 29, 2003 at 10:43 am
16 is correct (0x10) according to BOL. As far as system proc, don't see one. sp_helpfile and sp_helpfilegroup don't tell you which is the default.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
December 31, 2003 at 6:12 am
exec sp_msforeachdb "select '?',
groupname from ?.dbo.sysfilegroups
where FILEGROUPPROPERTY(groupname, 'IsDefault') = 1 "
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply