Manage max table storage space in case of excess data (size in GB) I am using SQL Server 2008 R2. I have created a database named testDB. I have a lot of tables with some log tables in. Some log tables contain over 100k records. 

I want to fix the size of those log tables, and want to move records into another database table in another location, so my database has no problem.

Is there any way to make such above steps which I want for my database?

Is there already built any such functionality in SQL Server?
There isn't a standard option to do this, but you can achieve this several ways.


create a separate db and move your log tables there. set a max file size.
create a trigger which checks row count or table size and limits inserts when value exceeded and/or deletes old data.
create a foreign key constraint on an id column pointing to a table with a set number of rows. When your log table reaches the maximum it will stop.
add a check constraint.