Buscar
  • Eloy Vanço

SCRIPT RESTORE BANCO DE DADOS MS-SQL

USE [master]

BACKUP LOG [PROTHEUSEPV] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup\PROTHEUSEPV_LogBackup_2022-07-06_19-20-09.bak' WITH NOFORMAT, NOINIT, NAME = N'PROTHEUSEPV_LogBackup_2022-07-06_19-20-09', NOSKIP, NOREWIND, NOUNLOAD, NORECOVERY , STATS = 5

RESTORE DATABASE [PROTHEUSHML] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup\PROTHEUS33.bak' WITH FILE = 1, MOVE N'PROTHEUSEPV' TO N'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\PROTHEUSHML.mdf', MOVE N'PROTHEUSEPV_log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\PROTHEUSHML_log.ldf', NOUNLOAD, REPLACE, STATS = 5


GO

7 visualizações0 comentário

Posts recentes

Ver tudo

Colocar no JOB do WS insira a chave "security=0", conforme exemplo abaixo: [JOB_WS_01010101] TYPE=WEBEX ENVIRONMENT=P12 INSTANCES=1,1 SIGAWEB=WS INSTANCENAME=ws ONSTART=__WSSTART ONCONNECT=__WSCONNECT