473,440 Members | 1,672 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,440 software developers and data experts.

SQL Server 2005 - Restore failed

I did a COPY_ONLY backup of a production DB. The BACKUP worked fine, here's the code:

Expand|Select|Wrap|Line Numbers
  1. BACKUP DATABASE [ifas] 
  2.   TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\IFAS Backup Copy Only' 
  3.   WITH COPY_ONLY, DESCRIPTION = N'Backup COPY ONLY for restore to IFASTest  ',  
  4.   RETAINDAYS = 60, NOFORMAT, INIT, NAME = N'IFAS-Full Database Backup COPY ONLY ', 
  5.   SKIP, NOREWIND, NOUNLOAD, STATS = 10
  6. GO
  7. declare @backupSetId as int
  8. select 
  9.   @backupSetId = position 
  10. from 
  11.   msdb..backupset 
  12. where 
  13.   database_name=N'ifas' and 
  14.   backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'ifas' )
  15. if @backupSetId is null 
  16.   begin 
  17.     raiserror(N'Verify failed. Backup information for database ''ifas'' not found.', 16, 1) 
  18.   end
  19. RESTORE VERIFYONLY 
  20.   FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\IFAS Backup Copy Only' 
  21.   WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
  22. GO
  23.  
I then tried to restore the backup to an existing test version of the DB. The restore failed. Here's the code:
Expand|Select|Wrap|Line Numbers
  1. RESTORE DATABASE [ifastest] 
  2.   FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\IFAS Backup Copy Only' 
  3.   WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
  4. GO
  5.  
The RESTORE failed with this message:
[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
  1. ALTER DATABASE [ifas] SET READ_COMMITTED_SNAPSHOT ON;
  2. go
  3. ALTER DATABASE [ifastest] SET READ_COMMITTED_SNAPSHOT ON;
  4. go
  5. select
  6.   name
  7.  ,is_read_committed_snapshot_on
  8.  ,snapshot_isolation_state
  9. from
  10.   sys.databases
  11. go
  12.  
Does anyone know what the problem is?
Thanks a bunch in advance.
Jun 24 '10 #1
2 2675
Jerry Winston
145 Expert 100+
The snapshot is the problem. You can't drop, detach, or restore a source database when a snapshot is present. Try removing the snapshots and trying it again. If this works, let me know.
Jun 28 '10 #2
I was able to restore that database without removing the snapshot. It just took several attempts. The DB is being used for training, so I am unable to re-try the restore at this time. When I do, I'll post another message.
Jun 29 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tim | last post by:
Hello, We do not run SQL Server in our shop, but I'm starting to be tasked with analyzing SQL Server databases from outside shops. I will need to open .MDF files sent to me. Can I do this using...
3
by: Arpan | last post by:
I recently installed SQL Server 2005 (Management Studio Express) along with SQL Server 2005 Express (Configuration Manager) in my Win2K Pro m/c & use IIS 5.0 to run ASPX projects. I could add my...
1
by: kataoki | last post by:
Hi, This is the log file for my SP1 on 2005 install. Can anyone please look at this and tell me if this looks normal? I'm concerned about the following in the log: "Failed to read registry...
1
by: edmundleungs | last post by:
In our veritas netbackup for DB2 on AIX, the backup could be done successfully and the backup image would be listed using bplist on the AIX client. I have made several backup image, but only one...
3
by: Lee T. Hawkins | last post by:
I am having a number of problems over the last two full days trying to get an ASP.NET 2.0 application to connect to a SQL Server 2005 database... First off, I built this application w/ Visual...
2
by: l0b0 | last post by:
I'm working on a restore procedure for the case where all MDF files are missing, but the LDF files are all intact. A full backup is done every 24 hours, and a log backup is done every 3 hours....
1
by: JA | last post by:
I am moving my site to a host that has SQL Server 2005. I am pretty good with Access, but I don't know much about SQL Server. I'm currently using SQL Server 2000, and I access it with Access...
2
by: Don Li | last post by:
Info: the machine's OS is XP Professional with SP2 sql server 2000 developer's edition installed and running a bit of 'history' last night I first tried to install sql server 2005 express but...
0
by: powernet88 | last post by:
I encountered a problem when I installed SQL server 2005, Can anyone help? There is a waring message in System configuration Check When I tried to install SQL server 2005: Warning: SQL Server...
1
by: cryogeneric | last post by:
Hello everybody, I'm not all that familiar with backing up and restoring databases on SQL 2005 and I have a question. First, let me give you a little insight into how we're setup and what we want...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.