Restoring SQLserver Database From A Backup Device

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


ADVERTISEMENT

Restoring Log From Backup Device-Urgent

Jun 28, 2000

Hi All,
I am trying to restore transaction log using T_SQL:
restore log transfer from transfer_log with file = 2 ,norecovery

and also I was Trying--
restore log transfer from disk = 'c:mssql7ackupransfer_log.dat' with file = 2,norecovery

I am getting this error Message-

Server: Msg 4306, Level 16, State 2, Line 1
The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.

Any Ideas,Please Let me Know ASAP

Thank You ALL--

View 3 Replies View Related

Database Restoring Problem In Sqlserver 2005

May 2, 2008

Hello

I had created database of name ILM. after some days i renames my database in SSMSE.



by right clicking on ILM

selecting rename option

type the name CIS

Then i take backup of CIS

Problem is that

I have formated the derive where sqlserver was installed.

i only have backup file

plz tell me how i can restore database using this backup file.
i was struct plz help me soon
regards
jawad g

View 18 Replies View Related

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 View Related

SQL Server Admin 2014 :: Restoring A Database Even If No Database Or Backup Encryption

Sep 3, 2014

I did tried the encryption on server "A" for database "AdventureWorks2012". Then I tried to restore to server "B". There was the certificate issue, and I thought "of course : it's encrypted ! Let's deactivate it". So here I go "ALTER DATABASE AdventureWorks2012 SET ENCYRPTION OFF".I look at sys.databases : not encrypted.I backup using no encryption, I verify using msdb.dbo.backupset : not encrypted.

I move my backup to my other server where encryption was never configured (so no certificate, nothing...), and I have the error :
Msg 33111, Level 16, State 3, Line 1

Cannot find server certificate with thumbprint '0xFA130E58C999C4919B8975999C83A75A403B11D8'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

View 6 Replies View Related

Restoring Database From Backup File

Oct 30, 2007

Hi all,
My question is:
If I need to restore a database when all I have is the backup file, do I need to recreate all the tables, or is it possible to restore into a new database ?
Is it possible to restore a sql server 2000 database into a sql server 2005 database ?
Thanks in advance.

View 2 Replies View Related

Restoring SQL7 Database From SQL 6.5 Backup

Mar 29, 2000

I am trying to replicate a client's environment on my home development machine in order to develop some reports. At the client (SQL 6.5) I did a complete backup to a .dat file. How can I restore from this file into my home (SQL 7) server to create a duplicate database?? I tried restoring from a device, specified the file, but I get an "not a valid tape format ....." error. Help!

View 5 Replies View Related

Problem In Restoring A Backup In A Different Database

Aug 27, 2000

HI everybody,

I hv taken a backup of 'pubs' DB both 'full backup' and 'differential backup', and I have created a new DB called 'TEST'. Now I want to restore the 'pubs' db's backup files into 'TEST' DB(Full backup followed by Differential Backup).

I want to do this in 'T-SQL' not through 'Enterprise Manager'. The following is the command I have given,

"restore database test from pubs_backup with norecovery,file=5,replace"

Error:
======
Server: Msg 4038, Level 16, State 1, Line 1
Cannot find file ID 5 on device 'pubs_backup'.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.


Can anyone please help me to solve this.

tks in advance
Srinivasan

View 1 Replies View Related

Need Help Restoring Database From Older Backup

May 1, 2008

I am in the process of moving a database to a new location. My problem is that I do not have the most recent full backup file. I have a previous full backup file and I also have all of the transaction log backups from the time of the old backup to the present time.

My question is, do I need the most recent backup to restore the database, or can I do it with the older backup plus the transaction log backups?

Thanks in advance.

View 14 Replies View Related

Restoring SQL Database With Failed Backup

Mar 28, 2007

I am needing to restore a SQL server 7 database. I had a backup, but the media it was on has failed. I have copies of the folder the original database was in (.mdf files and such), but I was wondering if there is a way to re-integrate these files in order to pick up where we left off. Thank you.

View 3 Replies View Related

Tail Log Backup - Database In Restoring State

Oct 29, 2007

When performing a tail log backup to an online database through SSMS, the database is placed in restoring state. Is there a proper procedure to take the database out of restoring state after the backup is completed?

View 1 Replies View Related

Restoring DB With Many Device Files

Jun 28, 2000

Hi All

I have taken ownership of a SQL 7 Server that has many DB's with each DB's devices spread all over the 6 disks that exists in the Server.

e.g.

DB - Reference has

Data devices on D (20mb), E(40mb) , F(60mb) drives

and Logs having a similar spread.

Now what I want to do is to restore a full backup of the database into a new db but with only one data device and one log. So that basically the server is tidied up. The reason the devices are spread is not due to performance reasons.

The QUESTION IS : How do I restore a full back up of a db with many devices in to a NEW db with only 1 data device and 1 log device.


Thanks

Steve
sfarmer@edfman.com

View 2 Replies View Related

Read MS SQL 2000 Backup File Without Restoring The Database

Sep 6, 2007

I want to read certain data from the backup file of MS SQL 2000 without restoring the database backup file. Based on the data selected I will manage the further functionality such as restoration of the backup file.
Is it possible to read some data from MS SQL 2000 backup file without restoring? If yes then please let me know how?

View 8 Replies View Related

Restoring A Backup Of A Subscriber Database To A New Database

Dec 1, 2006

I have a Subscriber database updated using transactional
replication and want to create a copy for development & testing. The Distribution database is running on the
same 2005 instance as the Subscriber and the Publication database on another
server running SQL Server 2005.



If I use a TSQL script to run the restore, the database is
restored to a usable state but I get the following messages:









Msg 15247, Level 16, State 1, Procedure
sp_MSrepl_check_job_access, Line 112
User does not have permission to perform this action.
The replication agent job [job name] was not removed because
it has a non-standard name; manually remove the job when it is no longer in use.
(I€™ve removed the job name from the message)
RESTORE DATABASE successfully processed 46219 pages in
935.413 seconds (0.404 MB/sec).



It looks like an attempt is being made to restore
replication information too. I note that
the RESTORE statement has a KEEP_REPLICATION options which implies (I would have
thought) that by default the replication information is not be restored.



Incidentally, before implementing replication, backing up
the live database and restoring the backup to a new database took < 7
minutes but running the same process with a Subscriber database backup takes
about 15 minutes.



I€™d be interested to know if anyone has any idea what I€™m
overlooking or doing wrong.



ThanksTim

View 7 Replies View Related

SQL Tools :: Management Studio Not Showing All Backup Sets When Restoring A Database?

Oct 16, 2015

I am backing up a database as follows:

backup database PPLicense to disk = 'D:License.bak'

I have run this 5 times. If I know run this command:

restore headeronly from disk = 'D:License.bak'

I can see 5 entries returned this all looks good. In SQL Management studio I try and restore this database by selecting the file. The Restore Database dialog only shows the last backup set position i.e. position 5 and now the 4 before it. Why is this not showing the 4 previous backups?

I am using SQL Server 2012 SP 2 (Version 11.0.3460).

View 3 Replies View Related

Newbie Question Regarding Backup Device And Backup Foile

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

How To Get The Backup History Details From A Backup Device?URGENT!!

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

After Restoring MASTER Database, Can't Start SQLServer Service: Configuration Block Version 0 Is Not A Valid Version Number

Jul 16, 2007

Now, I checked and verified that my backup version of SQL Server is the same as the version installed on the computer I'm restoring too.



I have SQL Server on a production machine that I backed up and want to test a full restore on a dev machine to make sure it will work when I need it to.



Now that I've run the restore command on my tape backup and go to restart the SQL server service I receive:

Configuration block version 0 is not a valid version number. SQL Server is exiting. Restore the master database or reinstall.



I'm afraid I don't understand why this is happening. If the builds are the same, then shouldn't restoring the MASTER database have worked normally and I'd be able to restart the service now?



Any thoughts or suggestions?

View 4 Replies View Related

BACKUP To Backup Device Or Disk

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

Delete Backup From Backup Device?

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

Why Use A Backup Device Vs. Backup To Disk?

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

DB Engine :: Compressed Backup While Restoring Backup File

Sep 8, 2015

I got full backup on daily schedule its taking more space on Drive because each file has more than 25GB.I am using SLQ server 2008R2 so I'm looking to take the backup with compression instead of uncompressed Backup. What are the impacts of compressed backup. Is there any problems with compressed backup while restoring the backup file.

View 8 Replies View Related

Backup Device??

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

Backup Device

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

SQL Backup Device

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

Deleting From A Backup Device

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

Can SQL 2000 Use A CD-RW As A Backup Device?

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

Tape Backup Device Not Seen In EM

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

Sql Backup Device Using UNC Path

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

Backup Device Locations Help

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

Restore Last Backup From A Device

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

Trying To Create A Backup Device

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

Backup Device For Tape Not Possible

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







Copyrights 2005-15 www.BigResource.com, All rights reserved