Site sponsored by: Idera Try Idera’s new SQL admin toolset
SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Quiz
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
Developer
General DBA
ASP.NET / ADO.NET

Write for Us

Share you SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

Policy Based Management in SQL Server 2008
Inside SQL Server Cluster Setup and Troubleshooting Techniques - Part I ...
Configure and Manage Policy Based Management in SQL Server 2008 ...
Using Column Sets with Sparse Columns

More     
 
Latest FAQ's

Cannot Start SQL Server Service
Users are able to connect to report manager but not able ...
Errors when SQL Server Snapshot Replication is Running
How to Display Server Name or IP Address in a Reporting ...

More     
   
Latest Software Reviews

Spotlight on ApexSQL Doc 2008
ApexSQL Enforce
Embarcadero Change Manager
SQL Server DBA Dashboard

More     

articles >> general dba >> How 11GB of SQL Server Data Mysteriously ...

How 11GB of SQL Server Data Mysteriously Disappeared, and How I Ended Up Better Off than Before

By : Brad McGehee
May 26, 2002

Page 2 / 3

Note: If you try this, and your database does shrink, please write me and let me know. It would be interesting to see how common a problem this is. webmaster@sql-server-performance.com

 

Reader's Feedback

We have had similar problem in some tables in SQL Server 7.0 that were regularly  loaded and deleted with data. Our databases are smaller than the ones in the article, but we would notice that these tables were suddenly 300MB when they should have only been 1-2 MB. Using TRUNCATE TABLE prevented the growth, but it's not really an option for all of the tables. Running the DBCC's didn't help us either. I think I managed to trace it to a bug in SQL Server 7.0  by scouring Google and other newsgroups. The bug is fixed in SQL 2000, but not all of our databases have been upgraded yet.

One other thing that I discovered, which solved the problem, was adding an index to the table. We didn't add indexes to these tables initially because we didn't want the overhead, but since indexes (even non-clustered ones) keep track of the data pages, it would get rid of the empty pages. In a test that I did, adding a non-clustered covering index cut the table growth by about 90%. And the processes even ran quicker. Another example of why indexes are important.

Deborah Melkin
Database Administrator
Eze Castle Software

*****

I saw something like this happen to our 100+ GB database about a year ago. We had a table that had 3 rows in it, all fields where CHAR, INT and VARCHAR. Nothing big. The table showed a size of almost 4GB. I ran all the DBCC's on it and couldn't get the size to come back down. Then I put a clustered index on it and that brought it back down to where it should have been.

Thanks,
Shannon

*****

I had the same problem about one year ago with my SQL Server 7.0 servers. After we upgraded to SP3, the size of our databases became much large then before. I did some investigation and found out that the databases had a lot of free space marked as used. I spent a lot of time trying to shrink them, using DTS to re-import the data, rebuild indexes, and all other stuff to get rid of that free space and had no success. I called Microsoft and they recommended to run an undocumented trace flag for my own risk as a startup parameter. Since running with the trace flag, the problem went away. The trace flag is T1180. They did not explain to me what that trace does, but it is working pretty good.

If somebody have the same problem they can use that flag.

Thanks,
Simon

[Brad: This article has some information, although incomplete, on the T1180 trace flag.]


<< Prev Page     Next Page>>    








Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | QDPMA Performance Tuning | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 1999-2008 by T10 Media. All rights reserved