Wednesday, January 20, 2010

Connecting to RMAN

Step 1: Set the following environment variables

ORACLE_SID
ORACLE_HOME
NLS_DATE_FORMAT

Step 2: Access to privileged OS account or user with Sysdba privilege. Only users with Sysdba privilege can connect to RMAN. Hence no need to specify as sysdba while connecting to RMAN.

$ cd $ORACLE_HOME/bin
$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jan 20 03:19:22 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: IRIS (DBID=1460454352)

If you are using password file, then specify the username and password

$ rman target sys/syspassword

If you are accessing the target database via oracle net then use connection string as follows

$ rman target sys/syspassword@

You can also connect to RMAN in two steps first by invoking the rman

$ rman

The RMAN prompt appears

RMAN>

To connect to the target datbase..

RMAN> Connect target /
RMAN> Connect target sys/syspassword
RMAN> Connect target sys/syspassword@


Once you have connected to RMAN, you can start entering the commands. The commands can be typed in single line or in multiple lines and ends with a semicolon.

RMAN> Backup
2 database;

To add comments use the # symbol. Text after the # symbol in a line is interpreted as comments


RMAN> # Backup database
Backup database # this command will backup the database
include current controlfile; # backup control file along with database

Thanks

Remote_login_passwordfile

The password file is used to authenticate the users connecting to the database as Sysdba or Sysoper. The password file is created with the orapwd utility as follows,

$ cd $ORACLE_HOME/dbs
$ orapwd file=orapw password= entries=

Where,
file = the filename where the password is stored.
password = the password for sys user
entries = the number of users that can connect as sys user at a time. This parameter is optional.

Once the password file is created you need to set the init parameter remote_login_passwordfile for the database to use it.

The possible values for the parameter is

EXCLUSIVE - Only one database can use the password file. Multiple users can exist in the password file.

SHARED - More than one database can use the password file. However only Sys users allowed to have sysdba privilege. You will receive ORA-01999 error when you grant sysdba privilege to other users.

NONE - The password file is not used.

Thanks

Friday, January 8, 2010

ASM Views

The following V$views are used for managing ASM.


View NameDescriptionInstance
V$ASM_DISKGROUPDiskgroups discovered by ASMDB
V$ASM_DISKDisks discovered by ASM including disks that are not part of any Diskgroup.DB
V$ASM_FILEASM files mounted by ASM instanceASM
V$ASM_ALIASFilename alias of the ASM FilesASM
V$ASM_OPERATIONLong running ASM operationsASM
V$ASM_TEMPLATETemplate present in diskgroup DB
V$ASM_CLIENTLists one row per each ASM instance for which the database instance has any open ASM filesDB


Thanks

Followers

Powered By Blogger
 

Oracle Database Administration. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com