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 |
|
nice123ej
Starting Member
48 Posts |
Posted - 2008-06-25 : 23:39:51
|
| hi my database size was normally 6MB when i back it upU have done some changes to tabled (changed the key for some tables)and fixed some Stopred Procs then database size jumped to 66MB !!!!what happened to make database size jumps from 6MB to 66MB (More than 1100% !!!!)how to shrink it back to the original sizeI tried the Shrink tool, but size still 66MB !!what can i do? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
nice123ej
Starting Member
48 Posts |
Posted - 2008-06-26 : 00:55:42
|
| I changed the Primary Key for some tables but no other indexes at allI dont know how to check Fragmentation Level?!!even though for a database to be increases this much! is this normal?!!is there any way to shrink it?! |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-26 : 08:07:14
|
quote: Originally posted by nice123ej I changed the Primary Key for some tables but no other indexes at allI dont know how to check Fragmentation Level?!!even though for a database to be increases this much! is this normal?!!is there any way to shrink it?!
66MB is not big deal. We handle almost TB of database. |
 |
|
|
maninder
Posting Yak Master
100 Posts |
Posted - 2008-06-26 : 11:43:52
|
| To answer your question:USE DBNAMEDBCC SHOWCONTIG and check for "logical Scan Fragmentation"SQL 2005:select * from sys.dm_db_index_physical_stats(NULL,NULL,NULL,NULL,NULL)then check for avg_fragmentation_in_percent on the index_type_desc which is not a HEAP.Maninder |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-26 : 12:56:35
|
quote: Originally posted by nice123ej I changed the Primary Key for some tables but no other indexes at all
Primary keys are indexes and by default they are clustered.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
|
|
|