Expand|Select|Wrap|Line Numbers
- BACKUP DATABASE [ifas]
- TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\IFAS Backup Copy Only'
- WITH COPY_ONLY, DESCRIPTION = N'Backup COPY ONLY for restore to IFASTest ',
- RETAINDAYS = 60, NOFORMAT, INIT, NAME = N'IFAS-Full Database Backup COPY ONLY ',
- SKIP, NOREWIND, NOUNLOAD, STATS = 10
- GO
- declare @backupSetId as int
- select
- @backupSetId = position
- from
- msdb..backupset
- where
- database_name=N'ifas' and
- backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'ifas' )
- if @backupSetId is null
- begin
- raiserror(N'Verify failed. Backup information for database ''ifas'' not found.', 16, 1)
- end
- RESTORE VERIFYONLY
- FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\IFAS Backup Copy Only'
- WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
- GO
Expand|Select|Wrap|Line Numbers
- RESTORE DATABASE [ifastest]
- FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\IFAS Backup Copy Only'
- WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
- GO
[ERROR MESSAGE]
Msg 233, Level 20, State 0, Line 0
A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
[/ERROR MESSAGE]
Totally unrelated to the reason for doing the BACKUP, in between the backup and restore, I did a RESTART of the server, plus executed this script:
Expand|Select|Wrap|Line Numbers
- ALTER DATABASE [ifas] SET READ_COMMITTED_SNAPSHOT ON;
- go
- ALTER DATABASE [ifastest] SET READ_COMMITTED_SNAPSHOT ON;
- go
- select
- name
- ,is_read_committed_snapshot_on
- ,snapshot_isolation_state
- from
- sys.databases
- go
Thanks a bunch in advance.