PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.setup > Database size growth
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
ms.sqlserver.setup Questions about SQL Server.

Database size growth

Réponse
 
LinkBack Outils de la discussion
Vieux 25/09/2006, 17h02   #1 (permalink)
James Matthews
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Database size growth

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
  Réponse avec citation
Vieux 26/09/2006, 02h53   #2 (permalink)
Hari Prasad
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Database size growth

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



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h14.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09722 seconds with 10 queries