Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts

Friday, March 23, 2012

How to create automatic restore Prod DB backup to Test DB

The USER in question is forcing me to Restore the Production Data base backup from Sunday Night overtop of the

Test database early EVERY Monday Morning before they come in.

I can do this by hand

They do NOT want it done via replication or hand Export of production and hand Import of data. They want this to be a scheduled task.

I have gone into the DTS wizard and I am able to drop all the TEST data, objects etc.

And I can restore the PRODUCTION db to TEST, but only by hand.

Is there a way to have the DTS package read a backed up file on the disk and restore it to the TEST db.

I know this sounds lame, but that is their desire, and I'm new to MS-SQL...running MS-SQL 2000

if anyone know how to I would appreciate it, the DTS is NOT very intuitive IMO, and a bit confusing.

Sonoma

This can be done as a step on a job.
First, create a backup command and restore command in Query Analyser and verify it works.
Second, put in 2 steps on a job scheduled when you want.Sure, if first step is succes then next to second.

In other hand simplify the problem choosing a same name for name of database backup (Sure if the name is bult differently you can consider using global variable for parameter in a package , but be simple )|||

OK, Think I got it.

1. go into query analyser, create a step a./1 = Backing up the database in question: actually this step is already done, so doing a 'IF EXISTS' dir function might solve step 1/a.

2. in analyser, create step 2/b = Restoring the database but with a different name [?] or with a move function [?] to a different file in the same directory. This latter is a bit of choice I guess.

3. Make sure step 2 is dependent on step 1 success.

4. schedule job to run at desired time.

sound correct.

thanks for your help. BTW

rik

Sunday, February 19, 2012

How to copy or restore an entire database(everything) from one server to another server no

I am in a situation where I have to copy an entire database(not only
data but alos storedprocedures etc like restoring a database) from one
server to another server from time to time. I could archive by
creating a backup file from one server, copy that to the another
server and then restore a database from the backup file. but the thing
is the backfile is too big to copy it over. Are there any scripts or
whatever I run to archive this?
Thank a lot in advance,See my reply in .DTS
--
Andrew J. Kelly SQL MVP
"Leon" <yootaeho@.yahoo.com> wrote in message
news:8a817d39.0409121712.7942afab@.posting.google.com...
> I am in a situation where I have to copy an entire database(not only
> data but alos storedprocedures etc like restoring a database) from one
> server to another server from time to time. I could archive by
> creating a backup file from one server, copy that to the another
> server and then restore a database from the backup file. but the thing
> is the backfile is too big to copy it over. Are there any scripts or
> whatever I run to archive this?
> Thank a lot in advance,|||"Leon" <yootaeho@.yahoo.com> wrote in message
news:8a817d39.0409121712.7942afab@.posting.google.com...
> I am in a situation where I have to copy an entire database(not only
> data but alos storedprocedures etc like restoring a database) from one
> server to another server from time to time. I could archive by
> creating a backup file from one server, copy that to the another
> server and then restore a database from the backup file. but the thing
> is the backfile is too big to copy it over. Are there any scripts or
> whatever I run to archive this?
Is Logshipping an option? That'll be smaller files usually.
> Thank a lot in advance,|||What about snapshot replication.
HTH
Saleem@.sqlnt.com
"Leon" wrote:
> I am in a situation where I have to copy an entire database(not only
> data but alos storedprocedures etc like restoring a database) from one
> server to another server from time to time. I could archive by
> creating a backup file from one server, copy that to the another
> server and then restore a database from the backup file. but the thing
> is the backfile is too big to copy it over. Are there any scripts or
> whatever I run to archive this?
> Thank a lot in advance,
>

How to copy database to another SQL server

Hello guys,

I need to copy a database in SQL 2000 to another SQL2000 server. I tried backing up the database to a folder then restore it but it's not happening. Please help to know how to copy database to another SQL server, or a disk and restore it to another SQL server.I don't know whether this was discussed before If it was, please forgive me.

Thanks in advance.What error you got when you tried to restore from backup?

Other way is to script entire database schema and run it on another server to create empty database structure and then using either BCP/DTS to populate data.|||Hello,

Stop the sql services of a source server, copy .mdf & .ldf file to target server & then attach the db in target server as follows
1. In Enterprise manager, right click on databases & go in all tasks & then attach db
2. select .mdf file from the copied location & attach it

u will see db is copied.

Shubhangi