Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 A Big Database. A Big problem?

Author  Topic 

joni
Yak Posting Veteran

50 Posts

Posted - 2007-03-29 : 11:35:10
Hi gurus,

I have a database with more than 80 GB in a only Datafile (Primary). I would like to know how can I do to spread this database in many Datafiles in many discs like in Oracle for example. My database is in SQL Server 2000.

Thanks,

Joni

sql_er
Constraint Violating Yak Guru

267 Posts

Posted - 2007-03-29 : 11:36:22
I think you can create filegroups.
Go to Top of Page

Wang
Starting Member

48 Posts

Posted - 2007-03-29 : 12:05:45
Just add another file.

BOL: Alter Database
Examples
A. Add a file to a database
This example creates a database and alters it to add a new 5-MB data file.
...
ALTER DATABASE Test1
ADD FILE
(
NAME = Test1dat2,
FILENAME = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\t1dat2.ndf',
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB
)
GO

Go to Top of Page

joni
Yak Posting Veteran

50 Posts

Posted - 2007-03-29 : 12:22:30
OK, but if I just add a new filegroup I steel having a database with 80 GB in a unic filegroup. I want do spread my 80 GB in anothers filegroups. How can I do this?
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-03-29 : 13:44:45
If you add another drive to the filegroup SQL Server will spread the data across the drives and will improve performance.

************************
Life is short. Enjoy it.
************************
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-03-29 : 15:03:59
Would'nt you have to also ALTER the tables to point them to the new groups?

Another strategy would be to use partitioned views for your tables a distibute the partitions across



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Wang
Starting Member

48 Posts

Posted - 2007-03-30 : 08:58:01
you add the new files to the existing filegroup. Any growth from there is spread over the files. usign different growth rates you can skew it. There is also an option to empty a file, this chucks the data onto different files int he same group.
Go to Top of Page

joni
Yak Posting Veteran

50 Posts

Posted - 2007-03-30 : 15:24:36
Is easy to implement this change?
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-03-30 : 18:04:06
Check out Books On Line for ALTER Database..


************************
Life is short. Enjoy it.
************************
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-03-31 : 10:46:00
quote:
Originally posted by dinakar

Check out Books On Line for ALTER Database..


************************
Life is short. Enjoy it.
************************



MVP? Not to be mean, but that's very helpful

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-03-31 : 14:49:20
quote:
Originally posted by X002548

quote:
Originally posted by dinakar

Check out Books On Line for ALTER Database..


************************
Life is short. Enjoy it.
************************



MVP? Not to be mean, but that's very helpful

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam





I generally try to provide a direction so the OP can do some research and figure out on his own based on the direction, rather than post code directly. This helps the OP in the long run.
If you dont like it thats fine. And that has nothing to do with me being an MVP or not.

************************
Life is short. Enjoy it.
************************
Go to Top of Page

Wang
Starting Member

48 Posts

Posted - 2007-04-02 : 05:38:45
quote:
Originally posted by joni

Is easy to implement this change?



As long as you don't @@@@ it up, yep.
Go to Top of Page
   

- Advertisement -