By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Default file group

100+
P: 153
Default filegroup is the one in which all database files are created when created without specifying a filegroup, all books say.

I did this
CREATE DATABASE Akshay_DB


ALTER DATABASE Akshay_DB
ADD FILEGROUP Secondary_FG


ALTER DATABASE Akshay_DB
ADD FILE
(
NAME = NonClust,
FILENAME = 'E:\fileone.ndf',
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB
)
ON FILEGROUP Secondary_FG


MODIFY FILEGROUP Secondary_FG
DEFAULT


ALTER DATABASE Akshay_DB
ADD FILE
(
NAME = NonClust,
FILENAME = 'E:\filetwo.ndf',
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB
)


filetwo is created on primary even when Secondary_FG is the default

Why is it so ?
Mar 10 '09 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
Try separating these command within the batch by inserting GO

-- CK
Mar 10 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.