files and filegroups

  • 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

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 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

  • i dint specify location while inserting.

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 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.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply