Simple(?) Backup - Restore Question

May 21, 2004

Greetings,

Been lurking for a while, and new to MS-SQL, and didn't see an answer to a question that I have.

Running MS-SQL2000. SP2

Have a need to make a backup of a database at midnight on the last day of the month and to then make that data available to Accounting for end of month reporting.

The easy part was to schedule a full backup to occur at midnight on the last day of the month. The db was backed up to the file name Chorro_MonthEnd.BAK.

I then added to the scheduled job the following T-SQL:

RESTORE DATABASE [Chorro_MonthEnd] FROM DISK = N'D:Data FilesMicrosoft SQL ServerMSSQLBACKUPChorro_MonthEnd.bak'

The question(s) that I have are:

1) The data in the db Chorro_MonthEnd should be over-written with the data from the restore?

2) Since the Chorro_MonthEnd db exists, is MOVE necessary as part of the restore command? I have been told that if you don't use the MOVE command, it puts the original file names back into wherever directory structure they were backed up from. The concern is that it could overwrite the original db MDF/LDF files.

What we are trying to avoid is having someone from the IS side of the house having to be on-site to restore a db for Accounting. IS type get cranky if they don't get enough sleep :D

Thanks in advance....


Brian

View 2 Replies


ADVERTISEMENT

Transact SQL :: Backup / Restore Tools Which Can Restore Multiple Environments

Jun 25, 2015

I am looking for a SQL Backup/Restore tools which can restore multiple environments.  Here is high level requirements.

1.  We have 4 DBs, range from 1 TB - 1.5 TB Each Database.  When we restore to QA, DEV, or Staging, we usually restore 4 of them.
2.  I am looking for the speed to complete restoring between 1 - 2 hours for 4 DBs.

I am evaluating the Dephix Software but the setup is very complex and its given us a lot of issues with Windows Authentions, and failure in the middle of the backup.  I used Guess Software many years ago but can't find it on the web site any more. Speed is very important for us mean complete restoring as fast as possible.  We are on SQL 2012 and SQL 2008 R2.We are currently using NETAPP Technology and I have Redgate Backup Tool but I am mainly looking for fast Restore Process.

View 4 Replies View Related

SQL Server Admin 2014 :: Restore DB With Full Backup And Transactional Log Backup

Aug 3, 2015

Need to restore database,here's the scenario:

Data got deleted on Friday evening, need to have database restored to FRiday afternoon and also some data has been entered on Monday, which needs to be there.

View 8 Replies View Related

How To Restore A Database From Backup With A Splitted Backup File

Apr 1, 2008

I should restore a SQL Server 2005 Database from backup. The backup contains three files, named user.bak0, user.bak1 and user.bak2.

How is the syntax of the restore filelistonly and the restore database ... ?

I usualy write
restore filelistonly from disk = 'path and filenam.bak'
restore database. zy
from disk = 'path and filename.bak'
with replace,
move.....
move....

This works but I cannot use it with a splitted backup file. The files are much too big to put together to one file.

Thanks in advance for any help.

View 3 Replies View Related

How To Restore Database From Full Backup And Several Diff Backup

Oct 17, 2006

I have a full backup and several diff backup,now i want to restore

firstly,I restore full backup

RESTORE DATABASE ***
FROM DISK = 'D:databackup200610140000.bak'
WITH NORECOVERY
GO

it's working,then i don;'t know how to continue

Thanks in advance

View 3 Replies View Related

Is It Possible To Restore From A Database Backup Without A Transaction Log Backup?

Oct 14, 2007

I neglected to backup the transaction log as part of the process of backing up the database. Now i only have the backup file for the database and no transaction log backup. When i try to do a restore on the database, i get the error on a "tail log missing" message (which i'm assuming is that it's looking for the t-log backup?).

Is it possible to restore or even restore to a new database? I'm only looking to retreive data from 2 tables within the backup file.

Thanks!


SQL Server 2005 on Windows 2003 Server x64.

View 16 Replies View Related

A Simple Backup Need Help!

Apr 3, 2006

My hosting company just "upgraded" to mylittleadmin for SQL, we can no longer connect and manage using enterprise manager or local other tools. I need the ability to connect locally, so I'm changing hosting company. The problem is I need an updated backup to transfer to the new server, even tech-support can't figure out this new "upgraded" system. The only help they offered was try the "dump" command, but that only give me a Incorrect syntax near '20' error. This is what I tried using the online Query Analyser:
dump dbname
dump 20twenty

Any and all help highly appreciated....
Thanks

View 9 Replies View Related

Very Simple (n00b) - Db Backup?

Dec 8, 2005

Hey peeps, n00b here, in WAY over my head.

I have an MS SQL server running in the office, which is used for more than one application - the same server hosts databases for at least two totally seperate applications. One of these databases is called CApplication, and another iscalled CSystem, and these two together support an app called Client.

All I want to do is create CApplication2, which is an exact one-time copy of CApplication. I don't need it to update, or synchronise, or link to any other database, or anything. I want to write an interface for this DB, and I don't want to use the live one.

Do I "detach" then "copy" then "reattach" or something? If somebody could give me some rather lame step-by-step instructions I would really appreciate it - I can take this databasse offline, but I really should try to put it back online as soon as possible, and it is essential that nothing changes in between!

I'm a bit nervous about this, if I break this database I'm a dead man. Thanks guys!

View 2 Replies View Related

Hot Backup In SIMPLE Mode

Jul 20, 2005

We have a SQL Server 7.0 database running with trunc. log on chkpt andselect into/bulkcopy checked and need to develop a backup strategy.One of our DBAs insists that since the transaction log is beingtruncated, we can't do a hot backup (a FULL backup in multiuser mode)because if a transaction comes through during the backup it will leavethe backup in an inconsistent state. I'm skeptical, but I don't knowhow SQL Server 7 avoids this problem.If SQL 7 is not truncating the transaction log, it uses thetransaction log to roll forward changes that occurred during thebackup. Obviously if it's truncating the log it must have some way toapply these transactions anyway (such as not doing a checkpoint duringthe backup, backing up the log at each checkpoint, etc.).Can anyone confirm that a hot backup will be valid when trunc. log onchkpt is checked? Does anyone know how SQL 7 accomplishes this?Thanks!James

View 3 Replies View Related

Simple Backup Job Failing

May 11, 2006

Hi All,

I have a small script that is failing :

BACKUP DATABASE CorporateComplaints
TO DISK = 'E:MSSQLBACKUPInsight_Dump.BAK'
WITH INIT
-- Declare the variable to be used.
DECLARE @MyCounter INT
DECLARE @MySpid INT
DECLARE @MYSQL varchar(50)

-- Initialize the variable.
SET @MyCounter = (SELECT Count(spid) FROM SysProcesses WHERE SysProcesses.dbid =
( SELECT dbid FROM SysDatabases WHERE SysDatabases.name = 'CorporateComplaints2' ))

print'mycounter '+ cast(@MyCounter as varchar (5))

-- Test the variable to see if the loop is finished.
WHILE (@MyCounter > 0)
BEGIN
-- Kill process.
EXEC sp_refreshview ActiveProcessesView
SET @MySpid = (SELECT Min(Spid) FROM ActiveProcessesView)
SET @MYSQL = 'KILL ' + CAST (@MySpid AS Varchar )
EXEC (@MYSQL)

-- Increment the variable to count this iteration
-- of the loop.
SET @MyCounter = @MyCounter - 1
END
GO

RESTORE FILELISTONLY
FROM DISK = 'E:MSSQLBACKUPInsight_Dump.BAK'
RESTORE DATABASE CorporateComplaints2
FROM DISK = 'E:MSSQLBACKUPInsight_Dump.BAK'

WITH REPLACE,
MOVE 'CorporateComplaints_Data' TO 'E:MSSQLDATAcorpcomps2data.mdf',
MOVE 'CorporateComplaints_Log' TO 'F:MSSQLDATACorpcomplaints2Log.ldf'



error event id 17055



Can any body help wht is wrong in script. I dont understand what is there in middle part its killing some process. what is need.

what I can usderstand its taking a backup of database CorporateComplaints and restoring it to CorporateComplaints2.




View 2 Replies View Related

Simple Database Backup?

May 23, 2007


I thought I would start learning how to backup my SQL Server 2005 database using the simple recovery method. Using the SQL Server Management Studio I started the backup task. In the Back Up Database dialog box the Recovery Model is set to Full and disabled (grayed out). It does not give me the option to switch to the Simple Recovery Model. Is there a setting I need to adjust that will allow me to switch to the Simple Recover Model?

View 4 Replies View Related

Backup Log WITH NO_LOG, Change Rec Mod. To SIMPLE?

Aug 21, 2007

Hi,

I use FULL recovery model, SQL 2005. Is it possible this type of
backup ""change"" my recovery model to SIMPLE. I noticed when I
executed this:

BACKUP DATABSE db_name
TO DISK = 'path'
BACKUP LOG db_name WITH NO_LOG
DBCC SHRINKFILE ('db_name_log', truncateonly)

Now transact log grow very, very, very slow (this is symptom simple
model). But when executed this (different order):

BACKUP LOG db_name WITH NO_LOG
DBCC SHRINKFILE ('db_name_log', truncateonly)
BACKUP DATABSE db_name
TO DISK = 'path'

transact log grow normally

Would somebody explain me this, and tell me first statement change
(theoretically) my model to SIMPLE?

--
Regards,
anxcomp

View 3 Replies View Related

Simple Recovery And Full Backup

Jun 10, 2006

Hi MVPS/MS Experts:

Pardon me and my ignorance for asking this question. I just want to understand the backup architecture more clearly. According to BOL (both in SQL 2k and SQL 2k5) in simple recovery mode trasaction log backup is not possible since the log is truncated on checkpoint which is true. Also we know that FULL backup backups both the db and transaction log as well.

My question is what happens when a database is in simple recovery mode and a full backup is done. since the tran log cannot be backed up does only the db backup is done when a full backup is done?. What exactly happens behind the scenarios?. Is it that only the active log gets backed up when a full backup is done in simple recovery mode?. I am trying to understand how a full backup in simple recovery mode behaves without contradicting the full backup architecture and that the veracity of the statement (both db and tran log backup in full backup mode) holds true for a simple recovery scenario.

MVPs/ MS Experts if you could Please explain it in detail, I would really appreciate it.

Thanks

Ankith

View 6 Replies View Related

Db Backup Simple Vs. Full Recovery Mode

Feb 14, 2007

When we do a full database backup manually, we are seeing the trn file reflect the current date/time, but we are not seeing the mdf reflect the new date/time. And we are not seeing the transaction log file decrease in size. the recovery mode is set to full, do we need to change to simple to see both the mdf being backup'ed?

View 5 Replies View Related

Backup Of Ldf File In Simple Recovery Model

Mar 20, 2008



Hello,



I have a question regarding the backup for the database in Simple Recovery Model.

In this Model, I know we can restore only to the last full backup or can use differential

Backup, if implemented as a part of backup.



But my point of confusion is about the backup of '.ldf' file, should those file should be backed up in the

Maintenance Plan, if yes does it help in reducing the size of Log file?

Do we need the backup of '.ldf' in phase of Restoring?



As I mention my database has Simple Recovery Model, but the size of log file is around 20GB,

Could not understand why as in this Model, normally it automatically truncate the Log file?



Help me to clear my these doubts,



thanks,




View 5 Replies View Related

Restore Backup

May 17, 2006

I had to replace my hard drive which was going bad.  I reinstalled Sql 2005 and now need to restore the backup that I have.  I selected Restore Database and chose From Device, and selected the backup location on J: drive and selected the backup file which has no extenstion.  I checked the checkbox next to the backup set to restore.  Click OK and then I get this error message:
Restore failed for Server
System.Data.SqlClient.SqlError: Directory lookup for the file "C:Program FilesMicrosoft SQL ServerMSSQLdataMyDB_Data.MDF" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Smo)
I don't know why it is looking for a MDF file as this was never in the Backup folder.  Can someone please help me on this?  I thought I was doing the right thing making a backup all along and now I can't restore it! 

View 2 Replies View Related

Backup/Restore

Dec 17, 2001

Is it possisable to restore from tape when the backup was taken from a
different server. ServerA has the tape drive which performs the backups
to tape, but ServerB which is under a different domain wants to restore ServerA database on ServerB, both databases on the two servers are the same
is it possiable to restore a database on ServerB using ServerA file?

View 2 Replies View Related

Backup/restore

May 7, 2001

hello all !!
I suffered a crash on one of my disks on a server runing MS-sql 7.0,and found out my backupexec dosnt really restore a runing version of my database.
which solution would you recomend ,taking in acount i may have a copy of the database on another computer,which files i can restore?
thanks
yochai lam

View 2 Replies View Related

Backup /Restore

May 24, 2001

Hi I am operating my databases under "trunc log on checkpoint" mode as I do not need point of failure recoverability.I was performing a recovery test using a backup which resulted in it being unsuccessful .Error Message received was
"Recovery has failed because a nonlogged operation could not be redone.Use the RESTORE statement to restore all data in filegroup PRIMARY to a pt beyond the nonlogged changes"

Isnt sql*server supposed to prevent a non-logged operation while a backup is in progress?Also how do i prevent such a situation from recurring.
If i switch to single user mode before a backup how do i prevent exisiting users from accessing ... without bouncing my sql*server?

View 1 Replies View Related

Backup And Restore

Sep 25, 2001

Hi Everyone,

I did a restore of database the user the original database is admin where it says the user is dbo.

After i did the restore i was able to add admin as user and dbowner but when i tried to change the user it said the user already exists.

How do i create the same..enviroment as or the original system with users..i saw a problem i i drop the user and them recreate it then it cannot find the object or the object which are owned by it are lost..could any one help me with this ...so as how to and what do i need to keep track of while restoring the database and configure the server back with same user names and permissions.

Thanks.

Kavitha

View 1 Replies View Related

Backup And Restore

Sep 15, 2000

Hi,

I have two databases on two different SQL Servers,our application is updating these two databases simultaniously.So every time these two databases will be in synchronized state.
Now i want to schedule backup for these two Databases.How can i take backup of these two databases at single point of time.
so that if i restore these two backups on corresponding servers,There should not be any conflicts.

Any suggetions please....
Ananth

View 1 Replies View Related

BACKUP AND RESTORE

Sep 6, 2000

How can I backup and restore a database from one server to another. I am new in this business. I need your help please!!!

View 3 Replies View Related

Backup And Restore

Jan 29, 2001

I'm trying to backup a database to remote server first i did add a device using USE master

EXEC sp_addumpdevice 'disk', 'NetworkDevice', 'cabaanpubs.bak'

then

BACKUP DATABASE pubs TO NetworkDevice

it gives me an error saying


Server: Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'NetworkDevice'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.

I don't really understand what's goin.

basically i need to synchronize my production database so what am i planning is to take a full backup on that server everynight and then restore it back.

Can some one guide me to take a backup as well as restore on the remoteserver with syntax and what does it mean to add a device...i could not understand.

Is there any other process that's much faster to implement.

i appriciate your support and help .

View 1 Replies View Related

Restore Of Backup

Aug 30, 2000

Whenever I restore a backup on sqlserver 7.0 and create a new database from it, I always end up having problems with the users existing in the backup.

To enable those users to have access, I end up creating logins with those names and when I try granting those users Database access, I get the error message that the user already exists in the database.

Could some one tell me the right way to restore the backup and having all the users of the database also restored in the proper manner.

View 3 Replies View Related

Backup & Restore

Dec 13, 1999

WE are using sqlserver 7.0 & backing full database using Seagate backup ver 7.2 on a tape drive.

I have following questions if anybody could help

1]How do I restore a single table backup from the tape backup without restoring the full database first on the disk & then running import/export
utility to transfer/ copy that particular table to production database.
Is there any third party backup utility which allows for a single / selected table restore?

2]What are the steps or if anybody has the script for tansfering logins/users
with permisssions & without deencrypting the passwords when transfering from one server to another server.

View 1 Replies View Related

Backup And Restore

Nov 26, 2006

Hi there,
I am new to administration. i would like to create a development environment out of production database.
for this i have to backup the production database on a regular basis. then use this backup and restore it to a database on different. i can do this task, but i want to automate this task to do it on regular basis.
i would like to schedule my backup time. and immediately after backup i want to restore it to the database on other server, over writing existing data. what is the best way to do this???

thanks,
kishore

View 6 Replies View Related

SQL BAckup & REstore

Apr 20, 1999

I have a question related to SQL 6.5. We have a SMS 1.2 server which uses SQL 6.5. Two months ago, one of the NT admins did a NT backup of SMS database(sms.db) and then formatted the HD. Now, we need the SMS server back again. We installed the NT server, SMS server snd SQL server on that machine. The problem is, we now want the SQL server to recognize our SMS database (SMS.db file). We don't have any SQL backup of any database (that means, no copy of master database, no copy of other databases. IS THERE A WAY TO RECOVER SO THAT SQL SERVER RECPGNIZE THE SMS DATABASE(SMS.DB FILE)
Please help me out.
I would really appreciate that
Jazib Frahim

View 2 Replies View Related

Backup And Restore DTS

Sep 21, 2006

Does some one know how to back up a dts and then restore from a backup?

View 5 Replies View Related

Backup And Restore

Feb 2, 2004

I have a database xxxx on server a, I want to copy this DB to server b.How can I do this By back and restore.
WHere can take this back up?I want to take this to a personal folder and wanted to restore to server b from this folder.Is it possible?
Thanks.

View 2 Replies View Related

Backup And Restore

Apr 11, 2008

Hi all.,
How to take Backup for whole database and how to restore it.,
which would be the efficient way.,

View 3 Replies View Related

Backup And Restore

Apr 16, 2008

Hi,
Can a SQL server 2005 db be backed up and restored on a SQL Server 2008 db ?
Thanks

View 5 Replies View Related

Backup & Restore

Jun 2, 2006

Hi

I have 2 databases namely A & B respectively..... I have written a stored procedure that takes the backup of database A ....... Both the databases are operational .... Can I restore this Backup of Database A ...to Database B .... Is it possible. ....

I have read soimething that we can do it but with the Restore command we have to use the with move option...

I dont seem to understand this can someone please help me on this one....


Thanks .......

Kid.

View 1 Replies View Related

Backup Restore

Jan 30, 2008

I am trying to restore the backup from enterprise management studio
i have selected the source of resource from device.Its not displaying the mdf etc files in the select the backup sets to restore..

I can't proceed further.
Please suggest me..

View 6 Replies View Related







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