Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RMAN question 1

Status
Not open for further replies.

maswien

Technical User
Sep 24, 2003
1,286
CA

Hi,

We don't use RMAN for backup or recovery. We want test the RMAN to switch our backup to using RMAN. We use veritas netbackup also. Any idea on how to combine the RMAN with the veritas netbackup?

Thanks
 
maxwien,

good idea!

I use veritas and hit a snag. There are two products, one of which is the enterprise scale item, (and interfaces directly with RMAN) and the other is the more humble version which doesn't.

To take these out of the picture, and assuming that you have the disk space, do your RMAN backup to disk, and then use Veritas for an OS based backup to tape. That way you don't need the expensive software with the Oracle interface, if you only have the cheaper version. I'm sorry, but I can't remember which is which right now (I'm not at work).

Also, I recommend that you stage the changeover. Get RMAN working, and practice a few recoveries, to make sure that it works ok and that you can used it. After a couple of weeks, abandon your existing backups and just use RMAN.

Regards

Tharg

Grinding away at things Oracular
 


Thanks a lot thargtheslayer !!

What you told me is really helpfull, I have another question: can I schedule a backup within RAMN? how to?


 
Maswien,

you should create OS files which start an RMAN backup for each of your databases. Then create another OS file which sequentially calls these individual files.

Either schedule a job or use OS scheduling capabilities to automatically start the master script at some quiet time, when load on the server is light (I use 02:17 a.m.) when everyone is asleep and the databases are doing nothing significant.

This should produce all your backups for you. Then schedule your OS backup for say 03:13 a.m., by which time RMAN will have finished. You need to observe the automated backups for a few days, to make sure that RMAN has finished before the OS backup starts. If you have a huge data volumn, parallel the backups.

Job done (at least for today)

Regards

Tharg

Grinding away at things Oracular
 

Thanks Tharg,

Now I already tried to use the rman, I want test restoring the control file, from the documentation, the database should be startup nomount, but the rman won't connect to the target database if it's in nomount. I'm confused, what's wrong?


 
maswien,

I've never heard of such a thing - RMAN is a powerful account which has sysdba privilege. I can only suggest that you do what I do, use RMAN to shutdown and then startup the database.

I started RMAN and entered the commands shown below
Code:
E:\>rman target /@dev_1

Recovery Manager: Release 9.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: DEV_1 (DBID=2695228559)

RMAN> spool log to 'e:\oracle\rman_session.txt';
RMAN> shutdown;
RMAN> startup mount;
RMAN> backup database plus archivelog;
RMAN> sql 'alter database open';
RMAN> exit;

For demonstration purposes, In sequence, I used RMAN to:-

spool activity to a log file
shutdown the database
mount the database
do a full backup
open the database (using the sql syntax to run sql from RMAN)
quit

This produced the log file below

Code:
Spooling started in log file: e:\oracle\rman_session.txt

Recovery Manager: Release 9.2.0.1.0 - Production

RMAN> 
using target database controlfile instead of recovery catalog
database closed
database dismounted
Oracle instance shut down

RMAN> 
connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     135338868 bytes

Fixed Size                      453492 bytes
Variable Size                109051904 bytes
Database Buffers              25165824 bytes
Redo Buffers                    667648 bytes

RMAN> 

Starting backup at 31-OCT-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
skipping archive log file E:\ORACLE\ARCHIVE_LOGS\DEV_1\-1599738737_1_8.DBF; already backed up 1 time(s)
skipping archive log file E:\ORACLE\ARCHIVE_LOGS\DEV_1\-1599738737_1_9.DBF; already backed up 1 time(s)
skipping archive log file E:\ORACLE\ARCHIVE_LOGS\DEV_1\-1599738737_1_10.DBF; already backed up 1 time(s)
skipping archive log file E:\ORACLE\ARCHIVE_LOGS\DEV_1\-1599738737_1_11.DBF; already backed up 1 time(s)
skipping archive log file E:\ORACLE\ARCHIVE_LOGS\DEV_1\-1599738737_1_12.DBF; already backed up 1 time(s)
skipping archive log file E:\ORACLE\ARCHIVE_LOGS\DEV_1\-1599738737_1_13.DBF; already backed up 1 time(s)
skipping archive log file E:\ORACLE\ARCHIVE_LOGS\DEV_1\-1599738737_1_14.DBF; already backed up 1 time(s)
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=15 recid=15 stamp=605267440
channel ORA_DISK_1: starting piece 1 at 31-OCT-06
channel ORA_DISK_1: finished piece 1 at 31-OCT-06
piece handle=E:\ORACLE\RMAN_BACKUPS\DEV_1\BACKUP_0LI179JQ_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 31-OCT-06

Starting backup at 31-OCT-06
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=E:\ORACLE\ORADATA\DEV_1\SYSTEM01.DBF
input datafile fno=00002 name=E:\ORACLE\ORADATA\DEV_1\UNDOTBS01.DBF
input datafile fno=00011 name=E:\ORACLE\ORADATA\DEV_1\AUDIT_DATA01.DBF
input datafile fno=00005 name=E:\ORACLE\ORADATA\DEV_1\EXAMPLE01.DBF
input datafile fno=00012 name=E:\ORACLE\ORADATA\DEV_1\WINPATH01.DBF
input datafile fno=00006 name=E:\ORACLE\ORADATA\DEV_1\INDX01.DBF
input datafile fno=00010 name=E:\ORACLE\ORADATA\DEV_1\XDB01.DBF
input datafile fno=00009 name=E:\ORACLE\ORADATA\DEV_1\USERS01.DBF
input datafile fno=00003 name=E:\ORACLE\ORADATA\DEV_1\CWMLITE01.DBF
input datafile fno=00004 name=E:\ORACLE\ORADATA\DEV_1\DRSYS01.DBF
input datafile fno=00007 name=E:\ORACLE\ORADATA\DEV_1\ODM01.DBF
input datafile fno=00008 name=E:\ORACLE\ORADATA\DEV_1\TOOLS01.DBF
channel ORA_DISK_1: starting piece 1 at 31-OCT-06
channel ORA_DISK_1: finished piece 1 at 31-OCT-06
piece handle=E:\ORACLE\RMAN_BACKUPS\DEV_1\BACKUP_0MI179JU_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:26
Finished backup at 31-OCT-06

Starting backup at 31-OCT-06
using channel ORA_DISK_1
specification does not match any archive log in the recovery catalog
Finished backup at 31-OCT-06

Starting Control File and SPFILE Autobackup at 31-OCT-06
piece handle=E:\ORACLE\RMAN_BACKUPS\DEV_1\CAB_C-2695228559-20061031-01 comment=NONE
Finished Control File and SPFILE Autobackup at 31-OCT-06

RMAN> 
sql statement: alter database open

RMAN> 

Recovery Manager complete.

As you can see, I used RMAN itself to shutdown and mount the database. There is no need to run a separate sqlplus session to do so. This also guarantees that you are shutting down the correct database.

Let me know how you get on.

Regards

Tharg



Grinding away at things Oracular
 

Thanks Tharg,

I have the connecting problem when I run rman using my workstation and the target database is on a unix server. Am I not supposed to run the rman to do recovery from a workstation?
 
maswien,

yes, it's fine to run RMAN from a workstation. I ran the session just posted from my desktop PC. If you can't connect to the server, start a command prompt and then startup RMAN, then the problem is with privileges and permissions on the server - not RMAN.

Check that you have been granted sufficient privileges on the server.

Regards

Tharg

Grinding away at things Oracular
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top