Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

Reduce database size Expand / Collapse
Author
Message
Posted Tuesday, December 4, 2012 5:38 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:51 PM
Points: 35,606, Visits: 32,190
JimS-Indy (12/4/2012)
Sorry, I'm a newbie. What's a 'LUN', and what's a 'UAT'?


LUN is a Logical Unit Number on a SAN (a type of disk system separate from the server).
UAT is "User Acceptance Testing".


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1392750
Posted Tuesday, December 4, 2012 5:41 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:51 PM
Points: 35,606, Visits: 32,190
A lot of people have very large "log" tables that mean nothing in UAT. Find them and truncate them before you do the recommended index and compression things the others have recommended.

If that does do it, then you're going to have to pick and choose which data you want to keep. Such "Gold Sets" are a huge PITA in many ways.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1392751
Posted Wednesday, December 5, 2012 5:11 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 5:03 AM
Points: 2,840, Visits: 3,975
Lowell (12/4/2012)
HEAP tables never release the space taken by deleted rows.
this is new to me ..can you give me any article reference here ?


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1392928
Posted Wednesday, December 5, 2012 5:12 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 5:03 AM
Points: 2,840, Visits: 3,975
Also UAT doesnt need archived or purged data (some historical table too) .. we can obsolete those tables too (+ their indexes too )

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1392929
Posted Wednesday, December 5, 2012 5:25 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 1:23 PM
Points: 12,927, Visits: 32,330
Bhuvnesh (12/5/2012)
Lowell (12/4/2012)
HEAP tables never release the space taken by deleted rows.
this is new to me ..can you give me any article reference here ?


sure!
take a look at this recent thread, where someones HEAP was holding 15 gig, but the real data was only 600Meg
http://www.sqlservercentral.com/Forums/Topic1390660-149-1.aspx

and the same citation i posted in that link for ease of clicking:
http://sqlserverpedia.com/wiki/Heaps#Deletes_and_Heaps

Deletes and Heaps

When data is deleted from a heap using a DELETE statement, SQL Server will not release the space; it remains allocated to the heap. This leads to space bloat that wastes valuable resources. To address this problem, you can do any of the following:


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1392933
Posted Wednesday, December 12, 2012 2:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 6, 2013 1:20 AM
Points: 5, Visits: 26
When looking at our database it's 226 Gb, but the data is 167 Gb and the logfiles 59 Gb. Does this mean that I can reduce the size of the database by deleting the logfile?

I'm very new in this so can someone advise me what to do?

Thanks,
Bert
Post #1395527
Posted Wednesday, December 12, 2012 2:56 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:49 AM
Points: 40,433, Visits: 36,887
Lowell (12/5/2012)

http://sqlserverpedia.com/wiki/Heaps#Deletes_and_Heaps

Deletes and Heaps

When data is deleted from a heap using a DELETE statement, SQL Server will not release the space; it remains allocated to the heap. This leads to space bloat that wastes valuable resources. To address this problem, you can do any of the following:


That's not entirely true. Mostly true, just not completely true.

When data is deleted from a heap using a DELETE statement, SQL Server will not release the space, unless the delete has taken a table lock.

The cited page has a lot of 'mostly true' statements, so be a little careful with it.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1395532
Posted Wednesday, December 12, 2012 3:00 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:49 AM
Points: 40,433, Visits: 36,887
bdeboer (12/12/2012)
When looking at our database it's 226 Gb, but the data is 167 Gb and the logfiles 59 Gb. Does this mean that I can reduce the size of the database by deleting the logfile?


No. Not unless you want to potentially destroy the entire database. The log is not an optional file. It's a critical and essential part of the database.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1395535
Posted Wednesday, December 12, 2012 3:01 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 5:03 AM
Points: 2,840, Visits: 3,975
bdeboer (12/12/2012)
When looking at our database it's 226 Gb, but the data is 167 Gb and the logfiles 59 Gb. Does this mean that I can reduce the size of the database by deleting the logfile?

I'm very new in this so can someone advise me what to do?

Thanks,
Bert
first of all welcome to Sqlservercentral , you always need to start a new thread for your problem , never add in the existing one , it often dont attract many eyes (old thread less visibility). now coming to your question ? log files is mandate part or i would say unavoidable part of any database.first spend sometime on reading these links then you will come to know why we can/dont play with log file
http://msdn.microsoft.com/en-us/library/ms190925.aspx


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1395537
Posted Wednesday, December 12, 2012 4:16 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, February 4, 2013 12:43 AM
Points: 10, Visits: 45
there are few ways with the help of them you can able to reduce your database size

1. Defrag you database
2. Reorganising the indexes
3. Partitioning the database or also table

these operations will definitely improve your server performance and also the database space

//ADMIN: Removed unrelated link
Post #1395580
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse