April 27, 2007 at 9:37 am
How to identify and restrict size of a table in db?
April 27, 2007 at 10:04 am
Are you talking about disk size or row count? sp_spaceused tablename will tell you the size of a table. As far as restricting the disk size, the only thing I can think of is to put it in it's own filegroup and limit the size of the filegroup. But it's not a very exact solution. Plus, once you hit the limit, all additions to the table will fail.
April 27, 2007 at 12:11 pm
You could put a trigger trigger on the table that counts the rows in the table... could be either an AFTER trigger that deletes what's been inserted once it hits a limit or an INSTEAD OF trigger that prevents insertion altogether.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply