file group question?

Last Post 20 Jul 2006 11:44 AM by sanjayattray. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
sanjayattray
New Member
New Member

--
19 Jul 2006 05:45 AM
I had a table on PRIMARYFILE1 and we had a different index file group, indexfile1. Now, if i create a primary key on this table, on which file does the clustered index go. Is it on indexfile1 or PRIMARYFILE1.

i want to keep all indexes information in indexfile1 and don't want to use data file - PRIMARYFILE1.

CREATE TABLE [dbo].[authors] (
[au_id] [id] NOT NULL ,
) ON [PRIMARYfile1]
GO

my query should look like this

ALTER TABLE [dbo].[authors] WITH NOCHECK ADD
CONSTRAINT [UPKCL_auidind] PRIMARY KEY CLUSTERED
(
[au_id]
) ON [PRIMARYFILE1]
GO


OR


ALTER TABLE [dbo].[authors] WITH NOCHECK ADD
CONSTRAINT [UPKCL_auidind] PRIMARY KEY CLUSTERED
(
[au_id]
) ON [indexfile1]

sanjayattray
New Member
New Member

--
20 Jul 2006 11:44 AM
yes. but when i create primary key in indexfile1, it also moves table data file pages to indexfile1. which we don't want. we want all table data file pages to stay in PRIMARYfile1 and index file pages in PRIMARYfile1.

As I create primary it creates clustered index and all data pages moves to Indexfile1 from PRIMARYfile1.
You are not authorized to post a reply.

Acceptable Use Policy