Return to Snippet

Revision: 31956
at September 17, 2010 01:50 by derebus


Updated Code
RESTORE FILELISTONLY
FROM DISK = 'C:\bdEuroidiomas.BAK'

IF EXISTS(SELECT NAME FROM SYSDATABASES
WHERE NAME = 'bdEuroidiomas')
BEGIN
	DROP DATABASE bdEuroidiomas;
END
GO

RESTORE DATABASE BDEuroidiomas
FROM DISK = 'C:\bdEuroidiomas.bak'
WITH RECOVERY,
	MOVE 'euroidiomas_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\bdEuroidiomas.mdf', 
	MOVE 'euroidiomas_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\bdEuroidiomas_log.ldf'
GO

Revision: 31955
at September 16, 2010 09:00 by derebus


Initial Code
IF EXISTS(SELECT NAME FROM SYSDATABASES
WHERE NAME = 'bdEuroidiomas')
BEGIN
	DROP DATABASE bdEuroidiomas;
END
GO

RESTORE DATABASE BDEuroidiomas
FROM DISK = 'C:\bdEuroidiomas.bak'
WITH RECOVERY,
	MOVE 'euroidiomas_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\bdEuroidiomas.mdf', 
	MOVE 'euroidiomas_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\bdEuroidiomas_log.ldf'
GO


RESTORE FILELISTONLY
FROM DISK = 'C:\bdEuroidiomas.BAK'

Initial URL

                                

Initial Description
Pasar una BD de una pc a otra

Initial Title
Pasar una BD de una pc a otra

Initial Tags

                                

Initial Language
SQL