Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Specify the size of table

2 views
Skip to first unread message

Husam

unread,
Feb 17, 2008, 7:10:01 AM2/17/08
to
Hi EveryBody:

My question is, Is there any way to contorl the size of table in certain
database, for example If I have a database called pub and there are 10 users
for each user there is table assing to him.

Is there any way to keep each table do not excced certain size for example
10 mb?

Any help will be apprecauted

regard's

HUsam

David Portas

unread,
Feb 17, 2008, 7:27:21 AM2/17/08
to
"Husam" <Hu...@discussions.microsoft.com> wrote in message
news:B94B171D-0576-4296...@microsoft.com...


Use a separate filegroup. For example, to create a table limited to 10MB:

ALTER DATABASE pub add FILEGROUP fg01;

ALTER DATABASE pub
ADD FILE
(NAME = 'pub_data01',
FILENAME = 'c:\pub_data01.mdf',
SIZE = 10MB,
FILEGROWTH = 0)
TO FILEGROUP fg01;

CREATE TABLE tbl1
(x INT PRIMARY KEY CLUSTERED ON fg01) ON fg01;


A table has both data and index so you may or may not want to limit the size
of both. Index can be on a separate filegroup if necessary.

--
David Portas


0 new messages