473,897 Members | 3,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Backup and restore database hourly: how to implement it?

I have two servers, using SQL server 2000.
I was asked for implementing hourly Backup 3 databases in one server
and restore those databases to another server.

Could anyone give me the detailed steps to do that?
Thanks a lot in advance!

Feb 15 '07 #1
13 6007

<da*****@gmail. comwrote in message
news:11******** **************@ l53g2000cwa.goo glegroups.com.. .
>I have two servers, using SQL server 2000.
I was asked for implementing hourly Backup 3 databases in one server
and restore those databases to another server.
Google log-shipping.

You really only want to do a ful restore to server B, and then transaction
log backup/restores after that.
>
Could anyone give me the detailed steps to do that?
Thanks a lot in advance!

Feb 15 '07 #2
Log shipping is a process that takes transaction logs from a primary
SQL Server and applies them sequentially on a scheduled basis to
another SQL Server.

Does this do same thing for Backup/Restore the database?? Thanks a lot
for any explaination. I do have no idea about that.
Google log-shipping.

You really only want to do a ful restore to server B, and then transaction
logbackup/restores after that.

Feb 15 '07 #3

<da*****@gmail. comwrote in message
news:11******** **************@ q2g2000cwa.goog legroups.com...
Log shipping is a process that takes transaction logs from a primary
SQL Server and applies them sequentially on a scheduled basis to
another SQL Server.

Does this do same thing for Backup/Restore the database?? Thanks a lot
for any explaination. I do have no idea about that.
Generally you don't want to do a full backup/restore due to the time.

Is there a specific reasony ou want to do a full backup/restore rather than
simply log-shipping?

>
>Google log-shipping.

You really only want to do a ful restore to server B, and then
transaction
logbackup/restores after that.


Feb 15 '07 #4
You mean logshipping could also do backup database and restore the
databases to another server also?
On Feb 14, 7:36 pm, "Greg D. Moore \(Strider\)"
<mooregr_delete t...@greenms.co mwrote:
Generally you don't want to do a fullbackup/restore due to the time.

Is there a specific reasony ou want to do a fullbackup/restore rather than
simply log-shipping?
Feb 15 '07 #5

<da*****@gmail. comwrote in message
news:11******** *************@a 75g2000cwd.goog legroups.com...
You mean logshipping could also do backup database and restore the
databases to another server also?
Generally you have to do the initial backup/restore yourself.

I've written scripts in the past to do a full backup/restore but that was a
specialized case that I replaced with a log-shipping script the first chance
I got.

I'm still unclear why you want to go the full backup/restore route rather
than using log-shipping.

>

On Feb 14, 7:36 pm, "Greg D. Moore \(Strider\)"
<mooregr_delete t...@greenms.co mwrote:
>Generally you don't want to do a fullbackup/restore due to the time.

Is there a specific reasony ou want to do a fullbackup/restore rather
than
simply log-shipping?

Feb 15 '07 #6
Actually we need replicate 3 databases from server A to server B. But
no idea why replication does not work fine.

So, my boss asked me to do hourly full backup/restore to server B,
which is kind of relication.

Now I still can schedule a job for hourly full backup on server A, but
i have no idea how to schedule a job for hourly full restore dbs to
server B.

How to make those hourly .Bak files in server A to server B, and then
do restore in server B????

BTW, thank you so much to keep helping me out!!
On Feb 15, 10:48 am, "Greg D. Moore \(Strider\)"
<mooregr_delete t...@greenms.co mwrote:
>
Generally you have to do the initialbackup/restore yourself.

I've written scripts in the past to do a fullbackup/restore but that was a
specialized case that I replaced with a log-shipping script the first chance
I got.

I'm still unclear why you want to go the fullbackup/restore route rather
than using log-shipping.


Feb 15 '07 #7


--
--
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com

<da*****@gmail. comwrote in message
news:11******** *************@v 33g2000cwv.goog legroups.com...
Actually we need replicate 3 databases from server A to server B. But
no idea why replication does not work fine.
I'd focus on fixing that.
So, my boss asked me to do hourly full backup/restore to server B,
which is kind of relication.
Questions to ask then:
1) What do you do on Server B while the restore is taking place?
2) What do you do if the backup/restore cycle takes more than an hour?

With log-shipping at least you can put the databases on server B into
"read-only" mode between log restores.
>
Now I still can schedule a job for hourly full backup on server A, but
i have no idea how to schedule a job for hourly full restore dbs to
server B.

How to make those hourly .Bak files in server A to server B, and then
do restore in server B????
What I basically did was create a job on Server A that performed the backup
and then called a job on ServerB to start the restore. (ServerB would look
to the MSDB on ServerA to find the most recentlly performed backup and
location and restore that.)

>
BTW, thank you so much to keep helping me out!!
On Feb 15, 10:48 am, "Greg D. Moore \(Strider\)"
<mooregr_delete t...@greenms.co mwrote:
>>
Generally you have to do the initialbackup/restore yourself.

I've written scripts in the past to do a fullbackup/restore but that was
a
specialized case that I replaced with a log-shipping script the first
chance
I got.

I'm still unclear why you want to go the fullbackup/restore route rather
than using log-shipping.



Feb 15 '07 #8
(da*****@gmail. com) writes:
Now I still can schedule a job for hourly full backup on server A, but
i have no idea how to schedule a job for hourly full restore dbs to
server B.
ALTER DATBASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATAHASE dh FROM DISK='locationo fbackup'
ALTER DATABASE db SET MULTI_USER

Then use Enterprise Manager or Mgmt Studio to create a job, with this
as the job step and set up a schedule.

Of course, log shipping would be better, but if the databases are small,
less then 1 GB, that's probably not worth the hassle.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Feb 15 '07 #9
The backup file is located in server A.
how should do restore in Server B to catching backup file from serer
A??

Need I copy the backup.bak file from server A to Server B, then
schedule job to restore at server B?
How to set it automatically?
On Feb 15, 2:47 pm, Erland Sommarskog <esq...@sommars kog.sewrote:
Now I still can schedule a job for hourly full backup on server A, but
i have no idea how to schedule a job for hourly full restore dbs to
server B.

ALTER DATBASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATAHASE dh FROM DISK='locationo fbackup'
ALTER DATABASE db SET MULTI_USER

Then use Enterprise Manager or Mgmt Studio to create a job, with this
as the job step and set up a schedule.
Feb 16 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4411
by: Rajesh Garg | last post by:
I will make it simpler to look... I have DB1 - as backup for day 1 LOg1 as backup of logs T1 T2 T3 T4 T5 ...some transaction on day 2 Now i backup again DB2 Log2
3
9116
by: Tim Morrison | last post by:
MSDE2000 I have an application in which I am running a TSQL command of BACKUP DATABASE and RESTORE DATABASE for the backup and restore commands for my application. For testing purposes, i did the following: 1) Ran a BACKUP DATABASE command to a file named C:\TEST.BAK. 2) Deleted the database completely. 3) Ran a RESTORE DATABASE on the same file (note, I did NOT recreate the database) Now I have the database back with all my data....
2
3091
by: Vikrant | last post by:
Friends, I have read DB2/UDB 8.x 'RESTORE DATABASE Command', with my 'limited' knowledge & skill. I think it should address my concern, but I want advice/ opinion / experience and any care I must take to restore DB2/UDB 8.x database 64 to 32 bit). (1) Due to hardware limitaion I can not have 64 bit DB2/UDB 8 on AIX 4.3.3 host. Let us call this as host vhost32. I can migrate 7.2EE FP11 32bit to 8.x 32 bit on vhost32. This is my test...
4
3824
by: Hardy | last post by:
hi gurus, now I have to backup and restore a 8 T size db2 database. from two s85 to two 670. the partitions,tablespaces of the db should be redesigned then I plan to use redirected restore. but my concern is, such big size db, I'm afraid something unexpected will destory all the effort. Who have related experience? Can you give some advice? Thanks in advance:)
1
1538
by: G. Dean Blake | last post by:
How can I backup and restore a SQLServer DB from a .net VB program? Thanks, G
1
2305
by: ad | last post by:
I want to backup and restore a database in asp.net. The backup process is successful and fail when restore with message: User does not have permission to RESTORE database 'Health'. RESTORE DATABASE is terminating abnormally the restore SQL is : restore database Health from disk = 'D:\Data\ASPNET\Health8\Backup\myback.bck' and the backup SQL is:
0
2154
by: raj.raghavan | last post by:
Hi, I have a database were all the indexes are in a seperate filegroup a few large tables are in a seperate filegroup. We take backup at different times and I have backup of primary, two filegroup and then transaction logs. The backup was successful when I restore the same backup it is erroring out with this error: Server: Msg 3135, Level 16, State 2, Line 1 The backup set in file 'E:\Manual Backup\test_primary.bak' was created by...
6
27952
by: javelin | last post by:
I'm having difficulty searching for an answer to this challenge. Can someone give me a clue on the right keywords to use to find a discussion on this subject? All of the ones I saw appear to touch on older versions. I'm working with SQL Server 2000, and need to backup and restore only tables, because the full backup/restore appears to mess up users/security, or something or another. Thanks for the assist.
3
23012
by: Bill E. | last post by:
I'm trying to restore a database backed up a production machine onto my development machine. I don't want to restore the transaction logs (there are two) because they are far too large and are unnecessary for what I'm doing. I would be happy to simply create one new log in my development environment. Therefore, I backed up the database using the No_Log option as in backup database CPTS to disk = 'd:\backups\cpts_backup_billeh.bak'...
0
9837
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11250
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10478
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8032
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5873
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4698
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3300
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.