Home » RDBMS Server » Backup & Recovery » how to recovery database from tape to test db
icon5.gif  how to recovery database from tape to test db [message #120323] Thu, 19 May 2005 02:24 Go to next message
rzmni
Messages: 8
Registered: May 2005
Junior Member
i want to test recovery database from tape to test db because my production db can't stop..so anyone pls tell me wat step i should take?i'm using oracle 9i
Re: how to recovery database from tape to test db [message #120334 is a reply to message #120323] Thu, 19 May 2005 03:33 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
HI

R u planning to test this database on same machine which is hosting the production database?

If No, restore database backup from tape to ur filesystem on test environment, & startup the databse normally using ur backup parameter file.
U may need to rename files present in datbase due to different file architecture in ur test environment.
This will take place at mount stage of database.
Use: Alter datbase rename <filename> to <filename> for this.

If yes, in startup parameter file, change the instance name to a name different from the instance name of ur production database and the n follow the steps as mentoned earlier.


Regds
Girish
Re: how to recovery database from tape to test db [message #120338 is a reply to message #120323] Thu, 19 May 2005 03:41 Go to previous messageGo to next message
rzmni
Messages: 8
Registered: May 2005
Junior Member
on the same machine but other database
Re: how to recovery database from tape to test db [message #120393 is a reply to message #120338] Thu, 19 May 2005 08:02 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Best option is to check it on different setup as oracle doesn't allow running two databases with same name on same setup.
So either u need to change the name of ur database or choose a different set up for testing ur backup fro recovery purpose.
Re: how to recovery database from tape to test db [message #120460 is a reply to message #120323] Thu, 19 May 2005 21:49 Go to previous messageGo to next message
rzmni
Messages: 8
Registered: May 2005
Junior Member
emm my boss said...backup to other machine..so girish.rohini or anyone..did u have the script..can u share with me?tqs..
Re: how to recovery database from tape to test db [message #120513 is a reply to message #120460] Fri, 20 May 2005 04:59 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>.did u have the script..can u share with me?tqs
You havent mentioned what type and method of backup it is.
NO information about Oracle Version anD OS.
And you have to understand a little about recovery concepts.
Please read docs.

Have a little peek in the faq section in the website.
YOu may bet a headstart.
Re: how to recovery database from tape to test db [message #120735 is a reply to message #120323] Mon, 23 May 2005 07:36 Go to previous messageGo to next message
nabeelkhan
Messages: 73
Registered: May 2005
Location: Kuwait
Member

As Mahesh said, post information about ur backup method, DB version and OS...

Plus...

Do you want to test this on a different box or the same production box? Is test box identical to production one (including os and file system)?


For Girish

Im afraid that i didn't got you wat u said below:

Quote:

as oracle doesn't allow running two databases with same name on same setup.


One database per instance... you could have multiple instance runnin with all different databases on a single box.. depends on machine it self!

Quote:


So either u need to change the name of ur database or choose a different set up for testing ur backup fro recovery purpose.


Use a different box rite?

Please Girish correct me if Im wrong...

Cheers,
NK
Re: how to recovery database from tape to test db [message #120741 is a reply to message #120735] Mon, 23 May 2005 08:36 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
HI NK

My Quote:
as oracle doesn't allow running two databases with same name on same setup.


[& NK said]One database per instance... you could have multiple instance runnin with all different databases on a single box.. depends on machine it self!

Girish: True, we can have multiple instances on single machine & each instance can have its own database.
My query is "Can we have same name for those simultaneously running databases, does Oracle really support running multiple databases with same name on a single machine? Actually, when I tried it our, if gave me error. I tried it on Win2k System"

My Quote:
So either u need to change the name of ur database or choose a different set up for testing ur backup fro recovery purpose.



[NK said]Use a different box rite?

Girish: Yes. Use a different machine with, if possible, same configuration as on the production machine.

Regds
Girish
icon12.gif  Re: how to recovery database from tape to test db [message #120865 is a reply to message #120323] Tue, 24 May 2005 06:12 Go to previous messageGo to next message
nabeelkhan
Messages: 73
Registered: May 2005
Location: Kuwait
Member

Quote:

"Can we have same name for those simultaneously running databases, does Oracle really support running multiple databases with same name on a single machine?


Yes you can Smile

Quote:

Actually, when I tried it our, if gave me error. I tried it on Win2k System"



Cz you cant have Identical Service names on Windoz!

A database is a set of files (data, redo, ctl and so on)
An instance is a set of processes (SMON, PMON, DBWR, etc) and a shared memory segment (SGA).

A database may be mounted and opened by many INSTANCES (Parallel Server) concurrently.
An instance may mount and open ANY database however it may only open a single database at any time.

If you used DBCA on Windows to create additional databases you will notice that it will create a new service called "OracleService<SID>", now if you try to give the same sid as the previous one windoz will fine that in registry and will through an error. On windoz it registers the necessary services that can be used to start an instance when you want.

When you stop the service, the INSTANCE is gone. So, DBCA isn't creating an instance, it creates a database (set of files). The instance is fleeting, do a shutdown and instance is no more.

Each sid in each oracle_home must be unique actually. but it would be a really bad practice to have the same sids in different oracle homes.

On windows, it is probably 100% true that the sid must be unique on a machine due to service name

On unix, everything is possible. The two oracle homes are totally unaware of eachothers existence, totally separate.

Please correct, me if im wrong..
Re: how to recovery database from tape to test db [message #120909 is a reply to message #120865] Tue, 24 May 2005 10:55 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
HI

The sid i used were different. I used orcl & orcl1 on Win2k.
on unix too u need to have separate SIDs.

On unix, everything is possible. The two oracle homes are totally unaware of eachothers existence, totally separate.
Even on Windows they are separate. U can have n number of homes even on Win2k machine.


Regds
Girish
icon12.gif  Re: how to recovery database from tape to test db [message #121091 is a reply to message #120323] Thu, 26 May 2005 00:33 Go to previous messageGo to next message
nabeelkhan
Messages: 73
Registered: May 2005
Location: Kuwait
Member

okay lets see this:

However.

easy to prove "not correct" on the "sid must be unique". the
ORACLE_HOME+ORACLE_SID must be unique on unix (it is the key to the shared memory segment), but that is it.

facts:

o 9ir1 in /home/ora9ir1
o 9ir2 in /home/ora9ir2

Had an existing database in both. Oracle_sid is ora9ir2 in the oracle 9ir2 install. I want (for whatever reason) two database instances up and running with that sid.

So, I log into the ora9ir1 account.

I export ORACLE_SID=ora9ir2.

I then:
[ora9ir1@xtkyte-pc dbs]$ mv spfileora9ir1.ora spfileora9ir2.ora
[ora9ir1@xtkyte-pc dbs]$ mv orapwora9ir1 orapwora9ir2
[ora9ir1@xtkyte-pc ora9ir1]$ cd $ORACLE_HOME/admin
[ora9ir1@xtkyte-pc admin]$ ln -s ora9ir1/ ora9ir2

(and that is it -- really, nothing more)

Startup both 9ir1 and 9ir2 and lets see what we have:


[tkyte@xtkyte-pc admin]$ su -
Password:

[root@xtkyte-pc root]# ps -auxwwee | grep pmon_ora9ir2

ora9ir1 31262 0.0 0.3 201056 7400 ? S 07:57 0:00 ora_pmon_ora9ir2
HOSTNAME=xtkyte-pc.us.oracle.com SHELL=/bin/bash TERM=xterm HISTSIZE=1000
LD_PRELOAD=/home/ora9ir1/libcwait.so USER=ora9ir1
LD_LIBRARY_PATH=/home/ora9ir1/lib ORACLE_SID=ora9ir2
PATH=/home/tkyte/bin:/home/ora9ir1/bin:/home/tkyte/bin:/home/ora9ir1/bin:/bin:/
usr/bin:/usr/ccs/bin:/usr/ucb::/usr/X11R6/bin:/home/ora9ir1/bin
MAIL=/var/spool/mail/ora9ir1 _=/usr/bin/rlwrap PWD=/home/ora9ir1
INPUTRC=/etc/inputrc LANG=en_US.UTF-8 SQLPATH=/home/tkyte/src/sqlstuff
HOME=/home/ora9ir1 SHLVL=2 LOGNAME=ora9ir1
ORACLE_PROC_MAKEFILE=/home/ora9ir1/precomp/demo/proc/demo_proc.mk
ORACLE_HOME=/home/ora9ir1 ORA_NET2_DESC=7,10

ora9ir2 31312 0.0 0.4 402660 8232 ? S 07:57 0:00 ora_pmon_ora9ir2
HOSTNAME=xtkyte-pc.us.oracle.com SHELL=/bin/bash TERM=xterm HISTSIZE=1000
LD_PRELOAD=/home/ora9ir2/libcwait.so USER=ora9ir2
LD_LIBRARY_PATH=/home/ora9ir2/lib ORACLE_SID=ora9ir2
PATH=/home/tkyte/bin:/home/ora9ir2/bin:/bin:/usr/bin:/usr/ccs/bin:/usr/ucb::/us
r/X11R6/bin:/usr/java/j2sdk1.4.2_04/bin/:/home/ora9ir2/bin
MAIL=/var/spool/mail/ora9ir2 _=/home/ora9ir2/bin/sqlplus PWD=/home/ora9ir2
INPUTRC=/etc/inputrc LANG=en_US.UTF-8 SQLPATH=/home/tkyte/src/sqlstuff
HOME=/home/ora9ir2 SHLVL=2 LD_ASSUME_KERNEL=2.4.19 LOGNAME=ora9ir2
ORACLE_PROC_MAKEFILE=/home/ora9ir2/precomp/demo/proc/demo_proc.mk
ORACLE_HOME=/home/ora9ir2 ORA_NET2_DESC=7,10

[root@xtkyte-pc root]#



Now, that aside, you do NOT want to install the software multiple times A version should be INSTALLED EXACTLY ONCE on a machine. A single software install can support multiple instances and databases -- each with their own SID
(hey, they could have the same db name if you wanted but that was be a really bad idea too -- the goal is to organize things, not to make things more confusing)

Why do you believe you want to install multiple times??
Re: how to recovery database from tape to test db [message #121192 is a reply to message #121091] Thu, 26 May 2005 15:00 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Theres no need to install Oracle multiple times, unless of-course the two versions that are to be installed are different.

Also, NK thanks for clearing this concept:
ORACLE_HOME+ORACLE_SID must be unique on unix.

But still not sure with having 2 different databases with same name on same machine. Have to check it...

Regds
Girish
icon14.gif  Re: how to recovery database from tape to test db [message #121432 is a reply to message #120323] Sun, 29 May 2005 00:53 Go to previous messageGo to next message
nabeelkhan
Messages: 73
Registered: May 2005
Location: Kuwait
Member

Hi Girish,

Quote:

Girish:
ORACLE_HOME+ORACLE_SID must be unique on unix.


Noops it dont have to be unique if you want to spin the ball Wink

Again dude Im tellin ya its possible... now lets see this ...

Oracle doesn't recommend any customer to install multiple databases with same name on different ORACLE_HOMEs (in a system). Though it is practically possible, there is no specific documentation available for installing the same as orcale doesn't recommend.

I have tested on LINUX box, finally I can be able to start two DB's (10g and 9iR2) with same ORACLE_SID (ora10g) and DB_NAME (ora10g) from different ORACLE_HOMEs. Till now no one has implemented/requested this kind of setup because this leads to lot of confusions. As I suggested that this is bad idea to have multiple databases with same name in a system. It is practically possible but not recommended in real time.

There are no other special considerations to be taken care of to implement this kind of setup.

I am here specifying the steps to achieve this setup.

1. Install and create two ORACLE_HOME's in a system (Note: 1023317.6 < HOW DO YOU CREATE TWO SEPARATE ORACLE_HOMES ON A SINGLE MACHINE? >)

2. Create two databases with same ORACLE_SID in these two different ORACLE_HOMEs.

3. Open a new login session and set environmental variables ORACLE_HOME & ORACLE_SID pointing to first database and then start first database.
export ORACLE_HOME=<Path to 1st oracle_home>
export ORACLE_SID=<SID name>

4. Open a new login session and set environmental variables ORACLE_HOME & ORACLE_SID pointing to second database and then start second database.
export ORACLE_HOME=<Path to 2nd oracle_home>
export ORACLE_SID=<SID name>

Please note that whatever ORACLE_HOME your environment variable is set to will be the ORACLE_HOME that you are working with. You can only deal with one ORACLE_HOME at a time.


Hope this helps you Smile

Thanks,
NK
Re: how to recovery database from tape to test db [message #121446 is a reply to message #121432] Sun, 29 May 2005 13:21 Go to previous message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Okies sir

Well, thanx for the detailed description.

Regds
Girish
Previous Topic: RMAN Maintenance
Next Topic: What is test database ?
Goto Forum:
  


Current Time: Thu Apr 18 05:06:10 CDT 2024