SQL 2012 Restore Issue

  • SQL 2012 Restore Issue.

    Anybody ever experience this I’m trying to restore a copy of DB ‘Y’ from another server.

    I already database named DB ‘Y ‘ on the test server. I’m trying to create another copy of the database from the backup and call it DB ‘ABC’. But I get exclusive access to ABC could not be obtained.

    DB ABC doesn’t exist on this server, so for me the error makes no sense. All other restores work fine as long as the original db name isn’t the same as any other dbs on the server

  • Have you altered the names of the data- and logfiles of the new ABC database? They can't be the same as the physical names of the existing Y databases.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • No. But the restore works via T-SQL with no amendments to the logical names.

    Funny issue.

  • I don't refer to the logical names, but to the physical names. The filenames of the new database can not be the same as existing filenames.

    Because you use a backup of database Y the files will default probably be something like Y.MDF and Y.LDF. These files could allready exist as part of the existing Y database. Change the restore command to alter the name of the files to ABC.MDF and ABC.LDF.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Post the restore command.

    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 they too have been altered via the GUI.

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

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