Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Removing a Filegroup
About 3 years ago we were getting index corruptions on our SQL server
database. MS and SAP indicated it was a H/W problem but HP after performing 
a
lot of tests suggested the problem was a S/W problem. So to get the problem
resolved MS and SAP recommended placing the two tables I was having problems
with on a second File group, but indicated that we need to move the files
back to the PRIMARY filegroup before performing a SAP upgrade.

I have successfully moved the files back to the PRIMARY frlegroup but am
unable to to remove the filegroup. I have run the following queries:

use MD3
GO
ALTER DATABASE MD3
REMOVE FILEGROUP ISO601
GO

The results are:

The filegroup 'ISO601' cannot be removed because it is not empty.

I have run the following check to see if there are any other files in the
file group:

I have run the SQL query:

use MD3
dbcc checkfilegroup ('ISO601')

DBCC results for 'MD3'.

CHECKFILEGROUP found 0 allocation errors and 0 consistency errors in
database 'MD3'.
DBCC execution completed. If DBCC printed error messages, contact
your system administrator.



Report this thread to moderator Post Follow-up to this message
Old Post
David Caddick
12-29-05 01:23 AM


Re: Removing a Filegroup
David

You need probably use DBCC SHRINKFILE command to empty the file
DBCC SHRINKFILE
( { file_name | file_id }
{ [ , target_size ]
| [ , { EMPTYFILE | NOTRUNCATE | TRUNCATEONLY } ]
}
)

"David Caddick" < DavidCaddick@discuss
ions.microsoft.com> wrote in message
news:108BE929-D337-43CD-83EB- 9200D66277D5@microso
ft.com...
> About 3 years ago we were getting index corruptions on our SQL server
> database. MS and SAP indicated it was a H/W problem but HP after
> performing a
> lot of tests suggested the problem was a S/W problem. So to get the
> problem
> resolved MS and SAP recommended placing the two tables I was having
> problems
> with on a second File group, but indicated that we need to move the files
> back to the PRIMARY filegroup before performing a SAP upgrade.
>
> I have successfully moved the files back to the PRIMARY frlegroup but am
> unable to to remove the filegroup. I have run the following queries:
>
>      use MD3
>       GO
>       ALTER DATABASE MD3
>       REMOVE FILEGROUP ISO601
>       GO
>
> The results are:
>
>       The filegroup 'ISO601' cannot be removed because it is not empty.
>
> I have run the following check to see if there are any other files in the
> file group:
>
> I have run the SQL query:
>
>       use MD3
>       dbcc checkfilegroup ('ISO601')
>
> DBCC results for 'MD3'.
>
>       CHECKFILEGROUP found 0 allocation errors and 0 consistency errors in
> database 'MD3'.
>       DBCC execution completed. If DBCC printed error messages, contact
> your system administrator.
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Uri Dimant
12-29-05 08:23 AM


Re: Removing a Filegroup
Try DBCC Shrinkfile with emptyonly
Look in books online for more details.

Regards
Amish

*** Sent via Developersdex http://www.droptable.com ***

Report this thread to moderator Post Follow-up to this message
Old Post
Amish Shah
12-29-05 08:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:21 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006