RE: Quick backup and restore!

RE: Quick backup and restore!

 

  

Rahimi,

James has a good idea, but I think your question was why doesn't your
service start. (I don't know :) ). But the service is not the
hardest thing to start. Use the oradim utility and create a new one,
or delete and create a new one. You can use orapwd and create a new
password also.

I suspect that if your service is on automatic startup, it is already
started? But in any event, you are recovering so you can start it
manually. As far as the listener is concerned, I would start that also
on windows first, then the service. (But don't think it matters if you
shut it down for your backups).

-----Original Message-----
From: James
[mailto:oracledba-ezmlmshield-x49587414.[Email address protected]
Sent: Wednesday, April 27, 2005 4:15 PM
To: LazyDBA Discussion
Subject: Re: Quick backup and restore!


You have a unique opportunity to teach the importance of backups.
Backups
should always top the list of priorities.

I used to teach a one semester class on database architecture using the
Oracle RDBMS. One of the major projects for the students went as
follows:

1. create a database with tablespace based on certain specs. 10
points
2. create a schema and objects 10 points
3. use PL/SQL routines to populate the scheme 10 points
4. use an export to backup the schema 10 points

- I then simulated a catastrophe by dropping their tablespaces.

5. the students were required to recover the schema from the export
30
points
6. I ran scripts to verify all objects and data were correct.
30 points

Note, failure to import after the 'catastrophe' meant the student lost
60
points out of 100 (i.e. they flunked.)
That may sound brutal; however, they were warned repeatedly that this
was
coming. It helped me emphasize the critical importance of backups.

You have an opportunity to use real life problems to do the same thing.
I
suggest you teach the students how to use export and import. Make them
responsible for keeping backups of their own data. If a failure occurs,
it
is like a pop quiz. They get 10 points for successfully recovering the
schema from export. Failure to recover means they lose points and they
lose many hours of effort.

That would be a great lesson. In the real world companies lose lots of
money and sometimes fire people if backups aren't in place.

regards,

James E. Strange

Database Systems Consultant Wellpoint IT
Office (317) 287-5423 Fax (317) 287-5428
Home 317 253-6154 Cell (317) 402-1742
Oracle Certified Professional DBA


|---------+--------------------------------------------------------->
| | "Rahimi Saeed K. " |
| | <oracledba-ezmlmshield-x48026266.[Email Address Removed] | azyDBA.com> |
| | |
| | 04/27/2005 02:42 PM |
| | |
|---------+--------------------------------------------------------->

>-----------------------------------------------------------------------
------------------------|
|
|
| To: "LazyDBA Discussion" <[Email address protected]
|
| cc:
|
| Subject: Quick backup and restore!
|

>-----------------------------------------------------------------------
------------------------|




Hello,

Hi,
I teach a database class using Oracle 9i under Windows XP at a
University
setting. Students start with a database that is created as part of the
computer image for the class (called bank). They create a lot of
structures
in this database as part of their class hands on during the semester.

Since this is a university setting, the tendency is to have a lot of
viruses
and Trojan horses attacking the servers. As a result, during a given
semester we have to re-image (using Ghost) the servers many times. Every
time, we re-image any server all the work of the students is lost since
the
image has the default empty bank database .

To help solve this problem, I have used the following scripts to have
students back up their database contents on regular basis. Once they use
the
scripts to restore, all data and control files are back but Oracle does
not
start the bank service.

What am I doing wrong? It this a valid approach, or anyone knows of a
better
approach? I cannot ask students to use RMAN since we do not get to cover
RMAN until third part of the semester.

Any help in this regard is appreciated.

Regards,
SKR

Scripts to backup
--------------------------------------------------------------
REM This command file stops the listener and the bank service.
REM The files for this DB are copied to a safe place for backup
REM

REM Stop the listener
lsnrctl stop


REM Stop the SID
oradim -shutdown -sid bank


REM copy the database admin\SID files
xcopy c:\oracle\admin\bank\*.* d:\oraclecopy\admin\bank\ /E /Y


REM Copy the oradata files - control files, ETC.
xcopy c:\oracle\oradata\bank\*.* d:\oraclecopy\oradata\bank\ /E /Y

REM Copy .ora files as well
XCOPY C:\oracle\ora92\network\admin\*.*
D:\oraclecopy\ora92\network\admin\
/E /Y

Scripts to restore
----------------------------------------------------------------
REM This command file stops the listener and the bank service.
REM The files for this DB are restored
REM

REM Stop the listener
lsnrctl stop


REM Stop the SID
oradim -shutdown -sid bank


REM copy the database admin\SID files
xcopy D:\oraclecopy\admin\bank\*.* C:\oracle\admin\bank\ /E /Y


REM Copy the oradata files - control files, ETC.
xcopy D:\oraclecopy\oradata\bank\*.* C:\oracle\oradata\bank\ /E /Y

REM Copy .ora files as well
XCOPY D:\oraclecopy\ora92\network\admin\*.*
C:\oracle\ora92\network\admin\
/E /Y


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:
http://www.lazydba.com/legal.html








CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential
and privileged information or otherwise protected by law. Any
unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the
intended recipient, please contact the sender by reply e-mail and
destroy
all copies of the original message.


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


Oracle LazyDBA home page