Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / March 2008

Tip: Looking for answers? Try searching our database.

how to make the database size smaller?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kei - 17 Mar 2008 03:49 GMT
my database is 9G! I try to truncate some table to make the database smaller
but it seems it doesn't help, the database size has not changed by truncate
some table, so is there any good method to make the database size smaller? (I
accept some data loss in some table)!!
lonnye - 17 Mar 2008 04:06 GMT
Are you backing up this database?
I would run a transaction log backup and truncate the log when you do.
After that you should be able to shrink the database and remove unused space.
Signature

~lb

> my database is 9G! I try to truncate some table to make the database smaller
> but it seems it doesn't help, the database size has not changed by truncate
> some table, so is there any good method to make the database size smaller? (I
> accept some data loss in some table)!!
kei - 17 Mar 2008 04:47 GMT
how to truncate the log?
anyway, the data file type is already 9G.

> Are you backing up this database?
> I would run a transaction log backup and truncate the log when you do.
[quoted text clipped - 4 lines]
> > some table, so is there any good method to make the database size smaller? (I
> > accept some data loss in some table)!!
lonnye - 17 Mar 2008 04:51 GMT
I would look at Books Online for more info - check backup log...
Run this code if you want to truncate the transaction log and not keep a
backup of the transaction log. Truncate_only invalidates your transaction log
backup sequence. Take a full backup of your database after you perform backup
log with truncate_only:
BACKUP LOG YOURDATABASE WITH TRUNCATE_ONLY

Signature

~lb

> how to truncate the log?
> anyway, the data file type is already 9G.
[quoted text clipped - 7 lines]
> > > some table, so is there any good method to make the database size smaller? (I
> > > accept some data loss in some table)!!
Tibor Karaszi - 17 Mar 2008 13:10 GMT
I suggest you read about the DBCC SHRINKFILE command.

Signature

Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi

> my database is 9G! I try to truncate some table to make the database smaller
> but it seems it doesn't help, the database size has not changed by truncate
> some table, so is there any good method to make the database size smaller? (I
> accept some data loss in some table)!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.