|
|
|
|
||||||
| ms.sqlserver.setup Questions about SQL Server. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi I have just moved a database from an sql 2000 server to a 2005 server.
When I moved the database it was 7.5Gb in size and it was only growing very slowly at about 100MB a month or so. Now a couple of weeks later the database has grown to 38GB with a log file of 14GB. The usage of the database has not changed so I think it must be a problem on the sql 2005 server that is causing it to increase the size. Is there a way that I can run a query to find the size of each of the tables and other database components so that I can try to determine where this file space is being used. I can see the details of individual tables in there properties but we have several hundred tables and I don't want to have to look at each individually. Are there are tools oout there that would me manage the size of the database. Cheers James |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Hi,
For table size use the below command EXEC sp_msforeachtable 'select ''[?]'' as tablename, count(*) from ?' For Log file; check if you have scheduled the transaction log backup. If not schedule the log backup. After that you could use DBCC SHRINKFILE to shrink the LDf file. Thanks Hari SQL Server MVP "James Matthews" <JamesMatthews@discussions.microsoft.com> wrote in message news:546F64E2-A275-4986-A089-00F564DA5151@microsoft.com... > Hi I have just moved a database from an sql 2000 server to a 2005 server. > When I moved the database it was 7.5Gb in size and it was only growing > very > slowly at about 100MB a month or so. Now a couple of weeks later the > database > has grown to 38GB with a log file of 14GB. The usage of the database has > not > changed so I think it must be a problem on the sql 2005 server that is > causing it to increase the size. > > Is there a way that I can run a query to find the size of each of the > tables > and other database components so that I can try to determine where this > file > space is being used. I can see the details of individual tables in there > properties but we have several hundred tables and I don't want to have to > look at each individually. > > Are there are tools oout there that would me manage the size of the > database. > > Cheers > James |
|
![]() |
| Outils de la discussion | |
|
|