Groups | Blog | Home
all groups > sql server programming > october 2005 >

sql server programming : database size is very large


microsoft.public.dotnet.languages.vb
10/8/2005 7:33:52 PM
Hi All,

I ran sp_spaceused and the result is following:

database_name database_size unallocated space

DB1 6462.50 MB 1466.20 MB

reserved data index_size unused
4108216 KB 1889512 KB 298952 KB 1919752 KB

sp_helpfile gives me the following:

name size maxsize growth
DB1_dat 5609600 KB Unlimited 10%
DB1_log 1008000 KB Unlimited 10%


I have run dbcc shrinkdb as well as dbcc shrinkfile but everytime I see
the same results.
I think the db size is much more than it is.

Could you please tell what the above results tell me and what to do?

Thanks a million in advance.
Best regards,
mamun
Uri Dimant
10/9/2005 12:00:00 AM
Hi
Probably you did not perfom BACKUP LOG for a while and your database is set
to FULL/BULK-LOGGED recovery mode .
Try to set recovery mode of the database to SIMPLE or BACKUP LOG and the
run DBCC SHRINKFILE .
For more details please refer to the BOL.





"microsoft.public.dotnet.languages.vb" <mamun_ah@hotmail.com> wrote in
message news:1128825232.882522.295020@g14g2000cwa.googlegroups.com...
[quoted text, click to view]

Tibor Karaszi
10/10/2005 12:00:00 AM
Just to avoid confusion:

[quoted text, click to view]

I'd like to phase above as:
The transaction log is truncated then a transaction log backup is performed (or regularly when SQL
Server performs checkpoint if db in simple recovery mode). The log is not truncated when a database
backup is performed.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/


[quoted text, click to view]
microsoft.public.dotnet.languages.vb
10/10/2005 6:52:53 AM
Thanks a lot everyone for your suggestions. That helped.

Best regards,

mamun
JT
10/10/2005 8:52:18 AM
The transaction log accumulates data until a backup of the database is
performed or the log is truncated.
You will also want to perform DBCC SHOWCONTIG to investigate the amount
of data/index fragmentation and DBCC INDEXDEFRAG to resolve it.
Microsoft SQL Server 2000 Index Defragmentation Best Practices
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx

"microsoft.public.dotnet.languages.vb" <mamun_ah@hotmail.com> wrote in
message news:1128825232.882522.295020@g14g2000cwa.googlegroups.com...
[quoted text, click to view]

AddThis Social Bookmark Button