Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 resizing datafiles

Author  Topic 

potinenir
Starting Member

19 Posts

Posted - 2003-09-16 : 10:02:28
How can i resize the datafile? I added a datafile to a filegroup with a fixed size of 4gig. Now is want to shrink it to 1gig. Is there a way to do this? And also how can i associate the objects with a filegroup/datafile. i.e finding out what objects are stored in a particular datafile of a filegroup

thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-09-16 : 12:12:17
Take a look at DBCC SHRINKDATABASE and DBCC SHRINKFILE in SQL Server Books Online.

To associate an object with a filegroup, you specify it in the CREATE statement. Let me look up which system table has the information that you are needing to figure out which objects are in which data file.

Tara
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-09-16 : 12:22:55
The filegroup information is stored in sysfilegroups, but I can't figure out how to relate it to sysobjects. It appears the only way is through sysindexes. So you would probably need to join those three tables together to get the information that you need.

Tara
Go to Top of Page
   

- Advertisement -