Copying data gelong to only some FileGroups

  • Hello,

    I have a database divided into some filegroups (eg FG1, FG2 and FG3).

    I woluld like to copy to another database with same structure data in FG1 only.

    Is it possible?

    I have tried with RESTORE PARTIAL but it leaves objects belonging to FG2 e 3 offline, and so the database is not usable.

    Is there a way?

  • you need to restore the backup into a separate database and move the tables from filegroup 2 and 3 to Filegroup 1

    Then drop filegroups 2 and 3

    Cheers,


    * Noel

  • This query will return the list of tables that belong to FG1 file group:

    select o.name

    from sysindexes i, sysobjects o, sysfilegroups fg

    where i.id = o.id

    and i.groupid = fg.groupid

    and indid in (1,0)

    and fg.groupname = 'FG1'

  • I verified and partial restore do not turn online other tables that do not belong to FG restored (from Microsoft).

    So the only thing is to use other technique like DTS (SQL 2K0) or bcp/bulk insert.

    Thank forthe query

  • I cannot drop FGs because I have to maintain same structure to be spread between RAID for performance

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

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