Posted By

derebus on 09/16/10


Tagged


Versions (?)

Pasar una BD de una pc a otra


 / Published in: SQL
 

Pasar una BD de una pc a otra

  1. RESTORE FILELISTONLY
  2. FROM DISK = 'C:\bdEuroidiomas.BAK'
  3.  
  4. IF EXISTS(SELECT NAME FROM SYSDATABASES
  5. WHERE NAME = 'bdEuroidiomas')
  6. BEGIN
  7. DROP DATABASE bdEuroidiomas;
  8. END
  9. GO
  10.  
  11. RESTORE DATABASE BDEuroidiomas
  12. FROM DISK = 'C:\bdEuroidiomas.bak'
  13. WITH RECOVERY,
  14. MOVE 'euroidiomas_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\bdEuroidiomas.mdf',
  15. MOVE 'euroidiomas_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\bdEuroidiomas_log.ldf'
  16. GO

Report this snippet  

You need to login to post a comment.