Executing Operating System Commands from Within RMAN

s you can see in the two examples, you can use the host command with or without an operating
system command as a parameter. If you run the host command as part of a series of
RMAN commands, RMAN executes the host command and continues with the rest of the
commands. When you execute the host command by itself, RMAN displays the operating
system command prompt and resumes after you exit the command-line subshell.

RMAN> host 'tnsping sandeep'
2> ;


TNS Ping Utility for 32-bit Windows: Version 11.1.0.7.0 - Production on 04-APR-2010 14:43:06

Copyright (c) 1997, 2008, Oracle. All rights reserved.

Used parameter files:
D:\11gsoftware\product\11.1.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Sandeep-PC)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sandeep)))
OK (30 msec)
host command complete

RMAN>

RMAN>


OR


RMAN> host;

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Sandeep>tnsping sandeep

TNS Ping Utility for 32-bit Windows: Version 11.1.0.7.0 - Production on 04-APR-2010 14:44:37

Copyright (c) 1997, 2008, Oracle. All rights reserved.

Used parameter files:
D:\11gsoftware\product\11.1.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Sandeep-PC)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sandeep)))
OK (30 msec)

C:\Users\Sandeep>exit
host command complete

RMAN>

No comments:

Post a Comment