[dba-SQLServer] Temporary Table - Impact on SQL Db size

Michael Maddison michael at ddisolutions.com.au
Sun Dec 2 16:35:37 CST 2007


Hi Borge,

You can create a job to shrink then db and/or the log file.
You must backup the files before you can shrink the db file and truncate
the log file.

Data Files.
SQL will grow the data file when it needs to based on the parameters you
set when the db is created, by
default the value is 10%.  Growing the db is 'expensive' and will lock
the db while it occurs.  A common practice
is to set the start size at the size required for 1 years activity and
grow it if required during downtime.

Log Files.
Log transactions in the db and can grow very fast.  Backup and truncate
as required.

The above is a very simplistic explanation of how SQL manages its files.
In general DBA's don't worry too much
about db size, they just keep adding more disks ;-)  Logs size is
managed because its part of the backup routine.

HTH


Michael M

Subject: [dba-SQLServer] Temporary Table - Impact on SQL Db size

Hi all,

SQL2005 :
If I daily create a table, populate it with a bunch of data, use it to
perform some updates and then drop it - will this just keep growing the
database or will SQL Server manage the disk space.... I am asking the
question as my experience with Access Dbs is that ever so often you had
to compact the Db if you did something like this.... Does SQL Server
handle this better, i.e. without user intervention?

Regards
Borge

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com





More information about the dba-SQLServer mailing list