Friday, March 23, 2012

How to find what is in a file??

All,
sql 2000, server 2000
I have a filegroup that I want to get rid of, I delted all
the indexes using that filegroup. But there is still .38
mb being used and it won't let me drop it. Any ideaa, how
do I see what is in that file, so I can drop the filegroup?
Thanks in advance,
Gary AbbottIf U perform dbcc checkfilegroup (filegroupname) this checks for allocation
errors in the filegroups in the process it also displays the objects in the
file group. . . .
ensure that you perform this in a test environment or during your scheduled
maintenance jobs.
PS. This might be , i think it is an undocumented dbcc|||<anonymous@.discussions.microsoft.com> wrote in message
news:2e5b01c3fcfd$d0d373f0$a501280a@.phx.gbl...
> I have a filegroup that I want to get rid of, I delted all
> the indexes using that filegroup. But there is still .38
> mb being used and it won't let me drop it. Any ideaa, how
> do I see what is in that file, so I can drop the filegroup?
Try the following query:
select object_name(id) as tablename,name as
indexname,FILEGROUP_NAME(groupid) as filegroupname
from sysindexes
where groupid>1|||Your query worked great, but the filegroup I am trying to
delete was not in there. I'm sure it is empty, but it
won't let me delete it. I had already deleted several
other filegroups, so I am sure I am doing it right. It's
like there is a remnant of some index, even though there
are none. It is 0.38 MB, which is larger than the other
datafiles I had cleaned out, then deleted. Any other ideas?
Gary Abbott

>--Original Message--
><anonymous@.discussions.microsoft.com> wrote in message
>news:2e5b01c3fcfd$d0d373f0$a501280a@.phx.gbl...
all
how
filegroup?
>Try the following query:
>select object_name(id) as tablename,name as
>indexname,FILEGROUP_NAME(groupid) as filegroupname
>from sysindexes
>where groupid>1
>
>.
>|||I found the answer I was looking for, DBCC Shrinkfile,
with the emptyfile option.

>--Original Message--
>Your query worked great, but the filegroup I am trying to
>delete was not in there. I'm sure it is empty, but it
>won't let me delete it. I had already deleted several
>other filegroups, so I am sure I am doing it right. It's
>like there is a remnant of some index, even though there
>are none. It is 0.38 MB, which is larger than the other
>datafiles I had cleaned out, then deleted. Any other
ideas?
>Gary Abbott
>
>all
still .38
>how
>filegroup?
>.
>

No comments:

Post a Comment