How Do I Recover Database From A Detached Backup Device?
Nov 29, 2007
I ran into a problem today where I had to pull a backup file from an older tape. The file was originally is a backup that was stored in a device like :
EXEC sp_addumpdevice
'disk', --type
'c2000_BackupDevice', --logical name
'\UNCPathackupFile.bak' --physical location
I put the file from the tape on a File Server and then tried to create a new backup device pointing to the file. That's easy enough, but when I try to restore from it I get an device error saying it's offline.
How can I get that device attached to my server and then extract the backup files stored inside it?
Please advise b/c this is an interesting problem I hadn't anticipated and it argues that I should change my backup strategy .
Thanks for any advice/experience you can provide,
alex8675
View 2 Replies
ADVERTISEMENT
Jul 14, 2003
Hi all:
In order to test database restore, I create a backup driver and puporse delete one table, then I try to restore my databse use backup, but the delete table donot show up.
Thank you
View 5 Replies
View Related
Jun 13, 2014
I created a new database and want to recover data from a backup this script
use master
go
restore database new
from disk='D:
ew.bak'
go
but get an error
Message 3141, Level 16, State 0, Line 1
The database to be restored was named 'ats342'. Reissue the statement using the WITH REPLACE option to overwrite the 'new' database.
Message 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
View 1 Replies
View Related
Dec 7, 2004
Hello,
Every hour I make a backup of the log files of a database to a backup device. Each backup is appended to this backup device.
Now to restore at a point in time I normally use the following script;
RESTORE DATABASE mcs_carolus
FROM disk='E:sqlserver_databasesmcs_carolus_data.bak'
WITH REPLACE,
NORECOVERY
go
RESTORE LOG MCS_CAROLUS
FROM disk='E:sqlserver_databasesmcs_carolus_log.bak'
WITH FILE = 1, NORECOVERY
GO
RESTORE LOG MCS_CAROLUS
FROM disk='E:sqlserver_databasesmcs_carolus_log.bak'
WITH FILE = 2, NORECOVERY
GO
RESTORE LOG MCS_CAROLUS
FROM disk='E:sqlserver_databasesmcs_carolus_log.bak'
WITH FILE = 3, NORECOVERY
GO
RESTORE LOG MCS_CAROLUS
FROM disk='E:sqlserver_databasesmcs_carolus_log.bak'
WITH FILE = 4, NORECOVERY
GO
RESTORE LOG MCS_CAROLUS
FROM disk='E:sqlserver_databasesmcs_carolus_log.bak'
WITH FILE = 5, NORECOVERY
GO
RESTORE LOG MCS_CAROLUS
FROM disk='E:sqlserver_databasesmcs_carolus_log.bak'
WITH FILE = 6, NORECOVERY
GO
RESTORE LOG MCS_CAROLUS
FROM disk='E:sqlserver_databasesmcs_carolus_log.bak'
WITH FILE = 7, RECOVERY,STOPAT = 'Nov 25, 2004 11:59 AM'
Is there a simpler way of restoring without going through this long process.
Regards,
Albert
View 1 Replies
View Related
May 10, 2001
This is probably a simple question but I have to ask it anyway. When backing up I can backup to a file on my local drive but I also can create a device to the same location on my local drive. Is this doing the same thing. If I so desire to backup to the local drive(bear with me) what is the difference between creating a device and a file called mybackup or just choosing to backup to a file called mybackup? Should I always create a device? I know these are dumb question but....
Jason
View 1 Replies
View Related
Dec 7, 2001
How do we know the list of all the backups that are present in a particualr backup device like file# and time of backup taken etc for the purose of restore?
When I run :
RESTORE HEADERONLY FROM BackupDeviceName
it doesn't give that info. Can anyone tell me the exact command to list all the files of a backup device so that I can restore the right one??
Thanks.
Shalini.
View 2 Replies
View Related
Mar 5, 2008
I feel that I have done something stupid here.I used SSMSE to detach my database so that I could create a copy - no problem here.But then in SSMSE I right-clicked Databases, chose attach and expected to see my original database. But there are no databases shown in the attach window!I have tried to find the original database in SSMSE but nothing I do allows me to see it. However, Windows Explorer shows me that the files are still where they were when I detached them.Please help - this is driving me crazy.ThanksChris
View 2 Replies
View Related
Nov 1, 2006
Hello,
I currently have an application that uses a Access/JET database for a desktop application. The application is single-user and outside of a few corrupt MDBs occasionally, the setup is working fine.
I am thinking about switching out from using the Access database to using a SQL Server Express detached database. I'm not sure if this is a "proper" usage of a detached database, but I've verified that I can access and query a detached one...
Is this something that is recommended? Are there any performance issues associated with it (I believe the detached would be faster than the JET database.) What kind of maintainence would be needed for the SQL Server file? (I currently have a "Repair and Compact" option for the Access file...anything along those lines needed?) Is there anything else I should be aware of?
Thank in advance!
View 4 Replies
View Related
Oct 1, 2007
Dear All,
i've detached my database. how to attache thesame again?
Vinod
Even you learn 1%, Learn it with 100% confidence.
View 10 Replies
View Related
Nov 11, 2007
Hello all,
I'm using SQL 2005 Express edition. I'm currently connecting to the database file directrly (from ASP.NET) and that db file is not attached to the server.
My question is this:
What is the difference ? Will the performance improve if the db is attached and I connect to it throught the server ? I'm really not sure what the difference is.
Thanks
View 5 Replies
View Related
Nov 11, 2007
Hello all,
I'm using SQL 2005 Express edition. I'm currently connecting to the database file directrly (from ASP.NET) and that db file is not attached to the server.
My question is this:
What is the difference ? Will the performance improve if the db is attached and I connect to it throught the server ? I'm really not sure what the difference is.
Thanks
View 3 Replies
View Related
Oct 10, 2007
I have detached the database via sp_detach_db in a job, (I was trying to use a job to detach the database, then make copies of the mdf file, then attach the databases as different copies, somehow the job failed due to file locked) I tried to delete the physical files, but they were still locked. I tried several times, two of them I was able to delete the mdf files, but not the ldf file. The other one both mdf file and ldf file can not be deleted. I was not able to see the database via Management studio.
Can anyone help?
Thanks
View 3 Replies
View Related
Aug 19, 2015
I am using SQL 2012 SE. I am trying to move .mdf and .ndf files after a database is detached. Here is my code that is just to copy the mdf file. I am testing it against this file now and if it worked then I would do the move ldf file the same way.
EXEC master.dbo.sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO
EXEC master.dbo.sp_configure 'xp_cmdshell', 1
RECONFIGURE WITH OVERRIDE
DECLARE @cmd nvarchar(4000)
[Code] ...
The only message is I see while the query is executing is :Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
If I manually copy over the file it takes 30 seconds since the file is only 2GB and the script takes 45 minutes and still executing.
View 7 Replies
View Related
Apr 13, 2007
I am facing the Database recovery problems sicne I have lost my MSDB db , only i have the Complete db backup and transactional backup.
How do i can recover the database since i don't have the MSDB database
View 3 Replies
View Related
Sep 6, 2007
I work on sql server 2000.
Is it possble to recover just one table from the database backup ???
I am new to this.
Please let me know.
thanks
View 1 Replies
View Related
Sep 25, 2000
Is there any benefit in creating a backup device and using that in the backup statement over just using a disk file in the backup statement. It seems like extra work to create the backup device with sp_addumpdevice with the file location. Whereas I could just specify the file location right in the BACKUP statement by specifying DISK as the backup device.
View 1 Replies
View Related
Apr 16, 2004
I dump my databases to backup devices each night.
However would like to purge old backups - say older than a week - from the device.
Is it a case that I have to drop and re-create the devices every 7 days or can SQL do this for me?
I have seen the RETAINDAYS claus but it applies to tape backups only?
Thanks
View 1 Replies
View Related
Jul 20, 2005
In SQL 2000, is there an advantage to defining and using a backupdevice versus just backing up to disk?Currently, I've got a SQL Backup job set to run once per day, withtransaction log backups running every hour. The db and backups arewritten directly to folders on an external disk array. I've neverconfigured an actual Backup Device within SQL. Does creating a BackupDevice offer any advantages not available with my current backupmethod?Thank you for any help.Jason
View 1 Replies
View Related
Oct 2, 2001
Hi
I have a question concerning backup / restore / recover of a MS-SQL-Server-Database.
Following configuration exists:
MS-SQL-Server running on NT
OS, Server located on a mirrored Raid 0 Disk -> C:
Transactionlog-Files (.ldf) on the same physical mirrored Disk -> E:
Database-Files (.mdf) located on a separate pyhisical Disk (Disk-Set, Raid 5) -> D:
I take a full backup every night of all databases, no Transaction-Log backup is made during a day (never)
Assuming following situation:
During a day one Database became corrupt. The physical-file (.ldf) of corrupted database is still accessible
on Drive E:
1. Step: I make a copy of the .ldf-File and put it on a secure place or in an other directory
2. Step: I restore the DB from the last full backup
3. Step: ???? How is it now possible to recover from the physical available .ldf-File? I know it should be
possible but I don't now how.
Has anybody tips or suggestion or has someone ever had a similar situation? Feedback would be appreciated.
Kind regards
Gabi
View 3 Replies
View Related
Jun 9, 2004
Hello, everyone:
Does any body have the experience to execute data warehouse backup/recover? What I want to know is how to backup/recover database in data warehouse and cubes.
Thanks.
ZYT
View 5 Replies
View Related
Feb 23, 2004
Hi all,
I want to store bakup file on the computer on netword, so make a backup device on the other computer, it ok. after that i make an full backup, there is an error : "Can not open the bakup device " .
please show me,
best regard.
View 2 Replies
View Related
Mar 15, 2004
Hi
is there a stored procedure which allows me to query if there is an existing backup device? or which gives me a listing of existing backup devices?
Thanks!
View 2 Replies
View Related
Mar 26, 2004
Hi,
request you all to clear mine one doubt that,
Can creating a backup device for sql backup reduce the backup time comparing to giving full backup path.
Cheers!!
View 1 Replies
View Related
Jun 18, 2007
I asked this question before but never received a decent answer. When a restore fails, what are the steps to re-start the restore? This should be a very common issue and for the life of me I have been unable to find it in BOL or the MS site! Please let me in on the secret!!
Thanks
View 3 Replies
View Related
Sep 21, 2000
I have a transaction log which is backed up 5 times a day to a device.
The Transaction log is growing quite quickly in between each backup. The backup device is also growing at a much quicker rate.
realistically i would like to only keep 2 weeks worth of transaction log backups in the device.
for the transaction log backup i have tried the following transact-Sql
'Backup Log [imsv23] to [imsv23_TL_2] with RetainDays = 7, Init, NoUnload, Name = N'imsv23 TL V2', NoSkip,Stats=10,Noformat'
but due to all of the contents in the backup set not having expired the backup fails.
i need to reduce the size of the backup device. all of the backup sets have expiry dates but none of them are being deleted from device.
so my problem is 1 i need to remove the excessive backups from the device
2 i need to set up the automatic backups so that these datasets are removed when the expiry date is reached.
thanks in advance
View 3 Replies
View Related
Jul 27, 2001
If it can, is there some special way to set it up? I can only be successful setting up a tape drive.
Thanks,
Brian
View 2 Replies
View Related
Jan 13, 2005
Hi Folks,
I have a SQL Server 7.0 with and exteranl SCSI tape device.
When I attempt to backup a database in EM the tape device is being greyed out.
I have add the backup device using sp_dumpdevice and made sure that it is in sysdevices table. It will not allow me to add this backup device from the drop down.
1. Why does EM not see this device ?
2. If I try to back this up using T-SQL will I be able to use the registared tape device.
Thanks Folks
View 2 Replies
View Related
May 21, 2007
I'm trying to set a backup job to back up my databases to a server other than the server where Sql server is installed. The only options I can see are the local drives on my sql server when I try to set a location or backup device. If I want my backups to go to another server , How do I do that. Currently I'm trying to use a UNC path like \ServerNameBackups. When I try to use a UNC path I get an invalid directory error.
I'm fairly new to SQL Server as you can tell!
Can anyone help me? (I'm using sql server 2000)
Thanks
GEM
View 7 Replies
View Related
Mar 23, 2004
I am a newbie in SQL Server Administration. I decided to make the move within my company that no one else wanted.
I have SQL Server 2000 running at this time; users are connecting and using it. My question I guess pertains to the backups.
I have two drives setup for data and transactions logs (D: E:)
My backups are running but backups are being sent to the d:systems datamssqlackup folder. once backups are comlete I normally copy the backups to a network share that is being backed up nightly to tape.
My question is this:
How do i create a device location under backup properties to point to a network share? i would like for the backups to go straight to a network drive so i do not have to copy the backups every morning when i come in.
View 8 Replies
View Related
Mar 29, 2004
I want to be able to take a backup device to another server and then restore the last backup file within the device.
My script creates the backup device using the filename of the file from the other server but when I do the restore it only restores the first file in the device.
How can I get it to restore the last file? In EA I can do a manual resotre and look inside the device and choose say backup number 2.
How can I do this in a script?
Thanks
View 2 Replies
View Related
May 16, 2008
Hi,
I was wondering if someone could help me. I'm having problems using backup in Enterprise Manager, the backup continually fails and points to a hardware problem. However, I have been able to backup files using different software to tape which rules out hardware.
I'm trying to create a new backup device incase the problem lies there but I receive the error 'error15061: Add device request denied. A physical device named '%s' already exists'
Any ideas?
Cheers
View 1 Replies
View Related
May 17, 2007
I want to create a backup device for the tape drive.
So I go in "Server Objects"=>"Backup Devices" and create a new device. Problem is: In "Destination" I can't select "Tape:".
The ntbackup.exe program recognizes the tape drive, but SQL2005 not.
I have this:
-SQL2005 Enterprise edition 64bit.
-Tape drive HP StorageWorks Ultrium 960.
Someone knows how I can create a backupdevice for the tape?
Thanks
IF Debugging = removing bugs from program THEN programming := putting bugs in program;
View 4 Replies
View Related
Mar 16, 2008
hi all!
appending new backup on a same device - yes or no?
if somebody can tell me, is ok to constantly create new backus on a same device? i'm asking that, because in that case, defice file it will grow and grow.
is there any limit or suggestions how many appending is recomended, cause of file growth?
tnx in adv!
View 1 Replies
View Related