Mirroring for a database with partitioned tables

  • I have a 2TB database with database mirroring configured with no witness. The database has partitioned tables and each partition has its own filegroup and data files. The table has some partitions that do not have any data but still consume on an avg 15GB of data file. I want to remove these data files by merging/dropping the partitions.

    Will this merge/drop of the partitions be automatically applied on the mirror? Also, If I add a new partition that has a new datafile, what will happen to the mirror?

    If not, could any one of you suggest an appropriate method that does not require to re-do the entire mirroring.

  • are the drive\file paths identical on both servers?

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • The file names are the same. But some of the files are in different location.

  • Mohammed Imran Ali (4/10/2012)


    But some of the files are in different location.

    That's a problem, see my article at this link[/url]

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle (4/10/2012)


    That's a problem, see my article at this link[/url]

    Thanks Perry for the article.

    The new partitions when they are created gets its own filegroup and is placed on the similar directories in PRINCIPAL and MIRROR. There are some old partitions that do not have any data and we need to clean them up. Some of them are in a different directory and some are in similar directories.

    Will the merging of the partitions and removing the data files impact the mirroring session?

    Could you suggest a way to clean them up without impacting the DB Mirroring?

  • Mohammed Imran Ali (4/10/2012)


    Thanks Perry for the article.

    You're welcome, I hope it helps.

    Mohammed Imran Ali (4/10/2012)


    The new partitions when they are created gets its own filegroup and is placed on the similar directories in PRINCIPAL and MIRROR. There are some old partitions that do not have any data and we need to clean them up. Some of them are in a different directory and some are in similar directories.

    Will the merging of the partitions and removing the data files impact the mirroring session?

    Could you suggest a way to clean them up without impacting the DB Mirroring?

    I've never tried it myself. However, when issuing an ALTER DATABASE REMOVE FILE statement you specify the logical filename and not the physical filename, so no reason why it shouldn't work. As for the filegroup you just specify the Filegroup name to remove, adding and removing a filegroup generally have no impact as my article mentions it's the add file command that's the problem when the paths between both servers are different.

    My best advice to you would be to set up a sandbox and test it out before modifying your live system, you need to be comfortable with the process and you can't get this from a forum post.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks for the article so helpful.

    “When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris

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

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