June 17, 2013 at 4:55 am
Hi
I have a database with 3 filegroups primary,secondary and third.
secondary marked as default.
now i have created a table on third filegroup,and inserted some data into the table
my question is where will the data get stored? secondary or third
while secondary is still marked as default
thanks
June 17, 2013 at 5:03 am
If you created the table on the 3rd filegroup then the table is on the 3rd filegroup. Default only applies when you don't specify a location.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 17, 2013 at 5:12 am
yes i have created table on 3rd by specifying the filegroup, later i marked the secondary as default and inserted data into table which is on 3rd.
where does it get stored.
thanks
June 17, 2013 at 5:14 am
i dint specify location while inserting.
June 17, 2013 at 6:25 am
You can't specify a location when inserting. You specify the location when creating the table. Wherever you specify the table to be created is where the table and all of its data is.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 17, 2013 at 6:26 am
kkarthik117 (6/17/2013)
i dint specify location while inserting.
The INSERT statement is not related to the filegroup. The creation statement of the table determines in which filegroup the object is placed. The subsequent inserts will just add the data to that object.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply