Error 5123 restore BD SQL Server 2012

0

You could help me with this error, when I try to attach the bd, I select the .mdf file and it sends me this error

It is worth mentioning that before I could attach the bd, but now I get this error.

    
asked by Luis Fernando Zumaran 10.10.2018 в 02:41
source

1 answer

1

Basically, you are trying to restore the database, in the same path that there is an active database that may be used by the instance of sql server or another.

Normally in SQL Server databases. The .bak or .bk extension files are restored. You are selected an MDF extension file that corresponds to the primary (data) file of the database.

The command to create a copy is: USE AdventureWorks2012;
GO
BACKUP DATABASE AdventureWorks2012
TO DISK = 'Z: \ SQLServerBackups \ AdventureWorks2012.Bak'
   WITH FORMAT,
      MEDIANAME = 'Z_SQLServerBackups',
      NAME = 'Full Backup of AdventureWorks2012';
GO

The command to restore a copy is RESTORE DATABASE AdventureWorks2012
   FROM DISK = 'Z: \ SQLServerBackups \ AdventureWorks2012.bak'
   WITH RECOVERY;

    
answered by 10.10.2018 / 03:20
source