Restoring Share Point DB with a different Name

Hi,

I am trying to restore a Sharepoint DB with a different name.

The MDF and LDF files are located in D:\SQL. In the restore opitons, I change the name of the MDF and LDF files and try to restore the DB with a different name.

The restore fails saying....

The file 'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\ix_Sharepoi1_SITE' cannot be overwritten. It is being used by database 'Sharepoi1_SITE'.

I am not sure what this "ix_Sharepoi1_SITE' is and why we get this error.

Can someone help.

Thanks

Santhosh




Answer this question

Restoring Share Point DB with a different Name

  • Carlos Sanchez

    This database is existing in my environment. The current name is "Sharepoi1_SITE".

    I had taken a backup of "Sharepoi1_SITE" database. Now, I am trying to restore it with a new name "newdb".

    I have changed the mdf and ldf file names to shatepoi1_site_new.mdf and ldf.



  • Danny Tuppeny

    Santhosh,

    There is an issue that will occur if you rebuild the Search database's indexes via SQL Maintenence scripts.  The key item to understand is that when they get rebuilt in this way, “Ignore Duplicate Values” gets unchecked and needs to be checked.  This is specific to the Search database.  The content datbases do not have to follow this rule.  Since you are working with a content database, you are safe to rebuild that index.  What you'll need to do is attach the new database to SQL (without restore) and remove the 'ix_Sharepoi1_SITE' index and then create the index again.  It should create as 'ix_shatepoi1_site_new' which will get rid of the conflict.  Make sure you have a copy of all the files before you delete anything--you may need to rebuild the first databases's index after doing this to regenerate it.

    -dwinter
    http://blogs.msdn.com/dwinter

  • SWGuy

    Hi

    I want to back the Share Point data installed in one server and restore it to another server. is that possible. if so please tell me how can i do this.

    Thanks

    Mahesh



  • Esqueleto

    This is the index for that database. Can you provide what the old and new names were in this example I need to verify supportability, but there is a good chance that we can rebuild the indexes and get around this--but I want to give instructions based on your situation.

    Thanks,

    -dwinter
    http://blogs.msdn.com/dwinter


  • Aamir Iqbal

    You could restore it if you were overwriting another copy. You are not doing that--you are attempting to rename it mid-stream which adds some complication to the process. If you were restoring it renamed to a totally different environment, it would likely work because the index file would be usable and not attached to another database. In your scenario though--you have created a rather unique situation where two databases will attempt to use the same index database. So you will have to resolve that before you can use it. Once it is resolved, you could back up this new database and restore it normally.
  • JavierGT

    Hi Dan,

    Thanks for your detailed explanation.

    From the above update, I understand that I cannot restore the 'Sharepoi1_SITE' database. But I can attach it as a new database (without restore).

    Am I right

    Thanks

    Santhosh



  • Restoring Share Point DB with a different Name