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.
| Author |
Topic |
|
luispimi01
Starting Member
2 Posts |
Posted - 2007-09-04 : 16:19:40
|
| Is there is short way of identifying which dat files have been capped or are still uncapped. I work in a large environment and have many databases with as much as 18 file groups. Want to see if there was a quick to see which files have been cap.Thanks for any update on this request. |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-09-04 : 16:32:36
|
| What do you mean by "capped"?CODO ERGO SUM |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2007-09-04 : 16:59:46
|
| maybe unused? or inactive?--------------------keeping it simple... |
 |
|
|
luispimi01
Starting Member
2 Posts |
Posted - 2007-09-04 : 17:24:40
|
| Yes, that is correct, as below we create a new file and capped the old file.-- ALTER DATABASE [BTA0707]------ Database-- ADD FILE( NAME = N'BTA0707_BTA_Non_Journal_IndxFG1_01'---Filename no NDF Extension-- , FILENAME = N'x:\MSSQL\Data\BTA0707_bta_Mon_Journal_IndxFG1_01.NDF' --Location-- , SIZE = 500-- , MAXSIZE = 20000-- , FILEGROWTH = 500-- ) -- TO FILEGROUP [DSS_Mon_Journal_IndxFG1] ---------- -- -- -- -- -- --To capp the old file-- ALTER DATABASE [BTA0707]-- MODIFY FILE -- (NAME = DSSL01_0707_DSS_NonMon_Journal_IndxFG1, -- FILEGROWTH = 0MB) |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2007-09-04 : 17:29:24
|
| try to check sysfiles and sp_helpdb--------------------keeping it simple... |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-09-04 : 22:51:03
|
| If you like to remove old file from db, should use 'dbcc shrinkfile' with emptyfile option then 'alter databse' with remove file option. |
 |
|
|
|
|
|