Oracle Database Utilities
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 11.2.0.3 to 12.1.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.
Utility Usage Note If you are handicapped by working on a Microsoft Windows operating system most of these utilities will not function unless you open a command prompt window "AS ADMINISTRATOR" before running the utility. This is definitely true with OPATCH which must obtain a lock on the Oracle Inventory.
Executable Purpose
acfsinstall ACFS file system installation
acfsroot Start/stop ADVM/ACFS drivers
adrci Automated Diagnostic Repository Command Interpreter
afdboot ASM Filter Driver
afddriverstate Starts and stops the ASM Filter Driver: The state can be INSTALLED, LOADED, VERSION
afdinstall ASM Filter Driver
afdroot Front end for the Perl scripts that start and stop the ASM Filter Driver
afdtool ASM Filter Driver
agtctl A multithreaded extproc agent is started, stopped, and configured by an agent control utility called agtctl, which works like lsnrctl. However, unlike lsnrctl, which reads a configuration file (listener.ora), agtctl takes configuration information from the command line and writes it to a control file.
amdu ASM Disk Usage: Creates amdu_time/report.txt for ASM disk usage. Get help by amdu help=y
aqxmlctl Start and stop the OC4J server intended for iSQLPlus (AQXML) server on Windows which is deprecated
asmcmd ASM Command Line Utility
asmtool ASM utility to stamp a disk with a header
asmtoolg A utility that will step through the process of configuring new disks for use in an Automatic Storage Management (ASM) disk group. On Windows, new disks must be stamped with this tool or the command line version before they are available for use by the ASM instance. The tool can be used to add, update, or delete the stamps from disk partitions.
chopt Used to change (enable/disable) optional components

options:
dm = Oracle Data Mining RDBMS Files
ode_net = Oracle Database Extensions for .NET
olap = Oracle OLAP
partitioning = Oracle Partitioning
rat = Oracle Real Application Testing
cluvfy Cluster Verify (RAC)
CreatDep Create service name dependencies
crsdiag Cluster Ready Services Diagnostics
crtsrv Deprecated functionality related to Oracle Parallel Server
ctxhx The Ultra Search crawler uses the Oracle Text AUTO_FILTER, ctxhx, for processing of binary files. These are non-text, non-HTML files such as PDF files, Microsoft Word files, and so on. For Ultra Search to use the AUTO_FILTER, the shared library path environment variable must contain the $ORACLE_HOME/ctx/lib path.
ctxkbtc The knowledge base is the information source that Oracle Text uses to perform theme analysis, such as theme indexing, processing ABOUT queries, and to document theme extraction with the CTX_DOC package. A knowledge base is supplied for English and French.

With the ctxkbtc compiler, you can:
  • Extend your knowledge base by compiling one or more thesauri with the Oracle Text knowledge base. The extended information can be application-specific terms and relationships. During theme analysis, the extended portion of the knowledge base overrides any terms and relationships in the knowledge base where there is overlap.
  • Create a new user-defined knowledge base by compiling one or more thesauri. In languages other than English and French, this feature can be used to create a language-specific knowledge base.
ctxlc The Lexical Compiler (ctxlc) is a command-line utility that enables creation of Chinese and Japanese lexicons (dictionaries). Such a lexicon may either be generated from a user-supplied word list or from the merging of a word list with the system lexicon for that language.
ctxload Used to import a thesaurus file into the Oracle Text thesaurus tables
dbca DataBase Configuration Assistant
dbfs_client Using the DBFS Command Interface
dbgeu_run_action Diagnostic workBench Generic ddE User actions - RUN ACTION, used by DDE User Actions to capture the output of external commands
dbua DataBase Upgrade Assistant
dbv DataBase Verify
deploync Deploy NComp
dg4odbc Configures the Oracle Net listener for the ODBC Database Gateway
dg4pwd Constructs the password file for a gateway SID
dgmgrl Data Guard Manager
diagsetup 12c installation Diag Setup
disable_dnfs New 12.1.0.2
diskmon C:\Users\oracle>diskmon -help
2014-07-23 14:31:20.229 [81688] Usage:
diskmon [-w dirname] [-l logdir] [-p pipename] [-r msec] [-c msec] [-k type] [-d] [-t] [-x] [-e]
-w dirname test directory, ending with directory separator
-p pipename absolute pipe name to use
-l logdir output log directory (filename extension is .log)
-r msec timeout used in the read_msg loop
-c msec timeout used in the connection listening loop
-k type kgzf test type
-m message send simulation event to diskmon
-d turn tracing on
-t timestamp the output lines
-x ipc tracing on
-o osslib tracing on
-e in test environment
-h usage
2014-07-23 14:31:20.229 [81688] CRITICAL: Command line arguments incorrect
dropjava  
dsml2ldif LDAP
elements  
emca New 12.1.0.2
emdwgrd Script that saves and restores dbControl information if the database was downgraded. Run this script prior to upgrade to save DB Control information. After downgrading the database run this script again to restore the DB Control information.
enable_dnfs New 12.1.0.2
eusm Enterprise Manager User Security: Runs the enterprise user security admin tool
exp Export
expdp DataPump Export
extjob  
extjobo  
extproc External Procedure
extusrupgrade Upgrade Externally Authenticated SSL Users
genezi One use of this UNIX/Linux utility is the basic Instant Client (i.e. no sqlplus) you can execute LD_LIBRARY_PATH=$ORACLE_HOME/lib genezi -v to get client version. (Ref: Note:818454.1)
getcrshome Locates the Cluster ready Services home directory
gnsd Grid Naming Service Daemon
hsalloci Heterogeneous Server Agent driver for OCI
hsdepxa Heterogeneous Server Agent with XA Compliant Distributed External Process Driver
hsots Heterogeneous Server Agent with XA Compliant OTS Driver
imp Import
impdp DataPump Import
jssu Note:976049.1: "Jssu is called by the dbms_scheduler when credentials are used". User RnR in msg 11 of this thread shows one usage.
kfed Kernel Files Editor (Read ASM header e.g.: kfed read /dev/oracleasm/disks/VOL1. Type kfed -h for help. Also see below for kfod)
kfod OSM Discovery Utility
launch Program Launcher
lbuilder Local Building: Link in 12c to $ORACLE_HOME/nls/lbuilder/lbuilder
LCSSCAN  
ldapadd LDAP
ldapaddmt LDAP
ldapbind LDAP
ldapcompare LDAP
ldapdelete LDAP
ldapmoddn LDAP
ldapmodify LDAP
ldapmodifymt LDAP
ldapsearch LDAP
ldiffmigrator  
lmsgen NLS Binary Message File Generation
loadjava Utility to load Java classes into the database
loadpsp  
lsnodes List RAC Nodes
LSNRCTL Listener Control
lxegen NLS Calendar
lxinst NLS Data Installation
mkstore  
modifyEMService New 12.1.0.2
ncomp Native compiler: Compiler used when compiling PL/SQL as C
netca Network Configuration Assistant
netca_deinst Net Configuration Assistant Deinstall
nid Tool for setting a New IDentifier for a database
nmcbufp "The nmo executable is responsible for authentication for the Agent installed with DB Control." (812054.1). "[nmb and nmo are] Used for Oracle 10g Grid Control agent to collect statistics on the target server and should not be touched" (461144.1)
nmccollector  
nmefwmi  
nmei "The nmo executable is responsible for authentication for the Agent installed with DB Control." (812054.1). "[nmb and nmo are] Used for Oracle 10g Grid Control agent to collect statistics on the target server and should not be touched" (461144.1)
nmeo "The nmo executable is responsible for authentication for the Agent installed with DB Control." (812054.1). "[nmb and nmo are] Used for Oracle 10g Grid Control agent to collect statistics on the target server and should not be touched" (461144.1)
nmesrvc "The nmo executable is responsible for authentication for the Agent installed with DB Control." (812054.1). "[nmb and nmo are] Used for Oracle 10g Grid Control agent to collect statistics on the target server and should not be touched" (461144.1)
nmesrvops  
nmetm "The nmo executable is responsible for authentication for the Agent installed with DB Control." (812054.1). "[nmb and nmo are] Used for Oracle 10g Grid Control agent to collect statistics on the target server and should not be touched" (461144.1)
nmo "The nmo executable is responsible for authentication for the Agent installed with DB Control." (812054.1). "[nmb and nmo are] Used for Oracle 10g Grid Control agent to collect statistics on the target server and should not be touched" (461144.1)
nmocat "The nmo executable is responsible for authentication for the Agent installed with DB Control." (812054.1). "[nmb and nmo are] Used for Oracle 10g Grid Control agent to collect statistics on the target server and should not be touched" (461144.1)
nmupm "The nmo executable is responsible for authentication for the Agent installed with DB Control." (812054.1). "[nmb and nmo are] Used for Oracle 10g Grid Control agent to collect statistics on the target server and should not be touched" (461144.1)
ocopy Oracle Copy
odisrvreg  
oerr New in 12.1.0.2: Returns the description, cause, and action of an error from a message file when a facility code and error number are passed to it
oidca Sets environment variables such as ORACLE_HOME, JLIB_HOME, CLASSPATH, many of which are JAR related
oidprovtool OID Provisioning Tool: Used to create a subscription profile for OID subscribers such as Portal.
oifcfg Oracle Interface Configuration. Intended for use with RAC clusters
ojmxtool EM related. Get usage by running EMDROOT=EMD_Root_dir ovmxtool
ojvmjava  
ojvmtc Get usage by ojvmtc -help
OKDSTRY Kerberos utility
OKINIT Kerberos utility
OKLIST Kerberos utility
olsadmintool  
olsoidsync  
omsdown OMS Related
omsstart OMS Related
omsstop OMS Related
omtsreco  
onsctl ONS control for starting, stopping, and other management activities
OO4OCODEWIZ Oracle Objects for OLE Code Wizard for stored procedures
opatch Oracle Patch Application/Removal Utility
operfcfg Oracle Perfmon (Performance Monitor) Configuration
orabase Returns ORACLE_BASE; first appears in 11gR1; checks ORACLE_BASE in $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml on UNIX/Linux (Ref)
oracg Oracle Class Generator: XML related. Deprecated in 10g and replaced by orajaxb in 11.2.0.3
oracle  
OracleAdNetConnect OracleAdNetConnect MFC Application
OracleAdNetTest  
OraClrAgnt  
oradim Utility for configuring Windows services. Not present in any non-Windows installation
oradnfs  
orahomeuserctl New 12.1.0.2
orajaxb Oracle Java Architecture for XML Binding: XML JAXB Class Generator. Replacing oracg in 9i.
orakill Utility for killing Oracle sessions from the operating system command line
oramts_deinst  
orapipe Read Oracle XML Developer's Kit Programmer's Guide, Chapter "Pipeline Definition Language for Java"
orapki Oracle Public Key Infrastructure utility: Read Oracle Database Advanced Security Administrator's Guide, Chapter "Configuring Secure Sockets Layer Authentication"
orapwd Tool for creating and managing password files
orastack Oracle Stack Modification: Used to resize the stack of an Oracle executable file such as oracle.exe, tnslsnr.exe (one way of preventing ORA-12500). Type the command at DOS to see an excellent description. (Not equivalent to pstack available on some UNIXes used to dump stack trace of a running process, but more like Solaris command ppgsz -o stack=... except it works on file not process)
oravssw  
oraxml New 12.1.0.2
oraxsl New 12.1.0.2
orion Oracle IO Numbers for benchmarking
ott Windows NT specific: Sets jreclasspath and runs java
pafctl Provisioning Advisor Framework Control
PARDeploy Provisioning Archive Deployment
patchgen New 12.1.0.2
plshprof PL/SQL Hotspot Profiler
proc Proc*C/C++ compiler
racgimon  
racgmdb  
racgwrap Wrapper for racgmain. Control tracing by passing _USR_ORA_DEBUG to racgmain (see above).
rawutl Raw Disk Utility: rawutl -s /dev/xxx to view size
rconfig RAC Configuration Tool
registerDll New 12.1.0.2
remotedbua Runs the pre-upgrade utility remotely and invokes dbua to upgrade databases
RemoteExecService Related to ACL and remote pipes
renamedg Rename ASM Disk Group
rman Recovery Manager for backing up, recovery, and restoration of Oracle Databases
sbttest SBT Serial Backup Tape Test
schema  
schemasync  
sclsspawn  
selecthome Instead launch OUI to select Home. OUI runs selecthome.bat internally.
setsso Setup Single Sign-On for EM console
sqlldr SQL*Loader used to load files from the file system into the database and by External Tables
sqlplus Command line SQL*Plus user interface
sqlplusw Command line SQL*Plus user interface for Windows. No longer shipped after 10.2.0.5.
srvconfig Initializes, imports, and exports the Cluster Registry: See MyOracleSupport doc 953769.1
srvctl  
statusnc Status of Native Compiler: Probably checks sys.jaccelerator$status. Ref: Note:4889370
tkprof  
tnslsnr TNS Listener: This program is run from lsnrctl. Only run this program directly, as root, if you start listener on a port below 1024 on UNIX; even in this case, stopping the listener can be done with lsnrctl
tnsping Ping connections via SQL*Net. Determines the fact that SQL*Net can see a host and service
transx XML Translator: See XML Developer's Kit Programmer's Guide, Chapter "TransX Utility". Ref: Note:394803.1.
trcasst Network connections are traced to provide a detailed description of the operations performed by Oracle's internal components. The trace data is stored in an output trace file that can then be analyzed.
trcroute A non-Windows utility for tracing tnsping information
trcsess Combines multiple trace files into a single file for submission to TKPROF
uidrvci ADR related. E.g., uidrvci /u01/app/oracle/diag/rdbms/db_name/instance_name/trace getSchema INC_METER_SUMMARY, where INC_METER_SUMMARY is an .ams file under the trace/metadata subdir of the directory in the second arg. This getSchema command shows the table definition of v$incmeter_summary (summary of incident meters). Not sure what use this command really has.
umu User migration
unzip Unzip utility used by the Oracle installer
wrap Tool for encrypting PL/SQL source code prior to loading into the database
wrc Oracle Workload Replay Client: See Oracle Support doc 445116.1 and 748897.1
xml  
xmlcg XML C++ Class Generator: http://docs.oracle.com/cd/B28359_01/appdev.111/b28394/adx_cp_classgen.htm#sthref625
xmldiff Compares the trees that represent the two input documents to determine differences. Both input documents must use the same character-set encoding. The Xdiff (output) instance document has the same encoding as the data encoding (DOM encoding) of the input documents.
xmlpatch http://docs.oracle.com/cd/B28359_01/appdev.111/b28394/adx_c_diff.htm#ADXDK2550
xmlwf An extra copy of standard UNIX/Linux command (just like unzip)
xsl Undocumented
xsql  
xsqlproxy  
xvm  
zip Zip utility used by the Oracle installer
 
ACFSINSTALL
ACFS Installation C:\Users\oracle>acfsinstall -help
acfsinstall: Usage: acfsinstall {/i | /u} {/a | /o | /l} [<path>]
acfsinstall: /i     Install the driver
acfsinstall: /u     Uninstall the driver
acfsinstall: /a     Perform the operation for the ADVM driver
acfsinstall: /o     Perform the operation for the ACFS driver
acfsinstall: /l     Perform the operation for the OKS driver
acfsinstall: <path> Path to the driver. If not specified, defaults to oracleadvm.sys, oracleacfs.sys, or oracleoks.sys in the current directory
-- acfsinstall: Examples from Oracle
acfsinstall: acfsinstall /i /a (Install the ADVM driver from the current directory)
acfsinstall: acfsinstall /u /o (Uninstall the ACFS driver)
acfsinstall: acfsinstall /i /o c:\drivers\oracleacfs.sys (Install ACFS with the specified file)
 
AFDBOOT
Undocumented C:\Users\oracle>afdboot -help

C:\Users\oracle>afdboot -help
afdboot -scandisk [-afd_diskstring '<Dev_path>,<dev_path>....']
afdboot -f [File_name]
afdboot -config '<conf_param=value>,<conf_param=value>....'
TBD
 
AFDINSTALL
Undocumented C:\Users\oracle>afdinstall -help
Usage:

afdinstall
{list}

{add filtername /sys filter.sys [/all] [/device devicename1 devicename2 ...devicenameN]}

{remove filteranme}

{validate devicename1 [devicename2 ... devicenameN]}
TBD
 
AFDTOOL
Undocumented C:\Users\oracle>afdtool -help
Usage:
afdtool -add [-f] <devpath1, [devpath2,..]> <labelname>
afdtool -delete [-f] <devicepath | labelname>
afdtool -getdevlist [label] [-nohdr] [-nopath]
afdtool -filter <enable | disable> <devicepath>
afdtool -rescan [discstr1, discstr2, ...]
afdtool -stop
afdtool -log [-d <path>][-l <log_level>][-c <log_context>][-s <buf_size>]
[-m <max_file_sz>][-n <max_file_num>] [-q] [-t] [-h]
afdtool -di <enable | disable | query>
TBD
 
AMDU
ASM Disk Usage

Creates amdu_time/report.txt for ASM disk usage
C:\Users\oracle>amdu -help
al/lides Dump indirect blks unconditionally
-allides: AMDU ordinarily skips over empty indirect blocks. Specifying this option tells AMDU to dump those blocks unconditionally. Be warned that this can make the resulting AMDU dump quite large.

au/size AU size for corrupt disks
-ausize <bytes>: This option must be set when -baddisks is set. It must be a power of 2. This size is required to scan a disk looking for metadata, and it is normally read from the disk header. The value applies to all disks that do not have a valid header. The value from the disk header will be used if a valid header is found.

ba/ddisks Include disks with bad headers
-baddisks <diskgroup>: Normally disks with bad disk headers, or that look like they were never part of a disk group, will not be scanned. This option forces them to be scanned anyway and to be considered part of the given diskgroup. This is most useful when a disk header has been damaged. The disk will still need to have a valid allocation table to drive the scan unless -fullscan is used. In any case at least one block in the first two AUs must be valid so that the disk number can be determined. The options -ausize and -blksize are required since these values are normally fetched from the disk header. If the diskgroup uses external redundancy then -external should be specified. These values will be compared against any valid disks found in the diskgroup and they must be the same.

bl/ksize ASM block size for corrupt disks
-blksize <bytes>: This option must be set when -baddisks is set. It must be a power of 2. This size is required to scan a disk looking for metadata, and it is normally read from the  disk header. The value applies to all disks that do not have a valid header. The value from the disk header will be used if a valid header is found.

c/ompare Compare file mirrors
-compare: This option only applies to file extraction from a normal or high redundancy disk group. Every extent that is mirrored on more than one discovered disk will have all sides of its mirror compared. If they are not identical a message will be reported on standard error and the report file. The message will indicate which copy was extracted. A count of the blocks that are not identical will be in the report file.

dir/ectory Directory from previous dump
-directory <string>: This option completely eliminates the discovery phase of operation. It specifies the name of a dump directory from a previous run of AMDU. The report file and map files are read instead of doing a discovery and scan. The parsing of these ASCII files is very dependent on them being exactly as written by AMDU. AMDU is unlikely to work properly if they have been modified by a text editor, or if some of the files are missing or truncated. Note that the directory may be a copy FTPed from another machine. The other machine may even be a different platform with a different endianess.

dis/kstring Diskstring for discovery
-diskstring <string>: By default the null string is used for discovery. The null string should discover all disks the user has access to. Many installations specify an asm_diskstring parameter for their ASM instance. If so that parameter value should be given here. Multiple discovery strings can be specified by multiple occurrences of -diskstring <string>. Beware of shell syntax conflicts with discovery strings. Diskstrings are usually the same syntax the shell uses for expanding path names on command lines so they will most likely need to be enclosed in single quotes.

du/mp Diskgroups to dump
-dump <diskgroup>: This option specifies the name of a diskgroup to have its metadata dumped. This option may be specified multiple times to dump multiple diskgroups. If the diskgroup name is ALL then all diskgroups encountered will be dumped. The diskgroup name is not case sensitive, but will be converted to uppercase for all reports. If this option is not specified then no map or image files will be created, but -extract and -print may still work.

exc/lude Disks to exclude
-exclude <string>: Multiple exclude options may be specified. These strings are used for discovery just like the values for diskstring. Only shallow discovery is done on these diskstrings. Any disks found in the exclude discovery will not be accessed. If they are also discovered using the -diskstring strings, then the report will include the information from shallow discovery along with a message indicating the disk was excluded.

exte/rnal Assume external redundancy
-external: Normally AMDU determines the diskgroup redundancy from the disk headers. However this is not possible with the -baddisks option. It is assumed that the redundancy of the -baddisks diskgroup is normal or high unless this option is given to specify external redundancy.

extr/act Files to extract
-extract <diskgroup>.<file_number>: This extracts the numbered file from the named diskgroup, case insensitive. This option may be specified multiple times to extract multiple files. The extracted file is placed in the dump directory under the name <diskgroup>_<number>.f where <diskgroup> is the diskgroup name in uppercase, and <number> is the file number. The -output option may be used to write the file to any location. The extracted file will appear to have the same contents it would have if accessed through the database. If some portion of the file is unavailable then that portion of the output file will be filled with 0xBADFDA7A, and a message will appear on stderr.

fi/ledump Dump files rather than extract
-filedump: This option causes the file objects in the command line to have their blocks dumped to the image files rather than extracted. This can be combined with the -novirtual option to selectively dump only some of the metadata files. It may also be used to dump user files (number >= 256) so that all mirrored copies can be examined.

fo/rmer Include dropped disks
-former: Normally disks marked as former are not scanned, but this option will scan them and include their contents in the output. This is useful when it is necessary to look at the contents of a disk that was dropped. Note that dropped normal disks will not have any entries in their allocation tables and thus only the physically addressed extents will be dumped. Force dropped disks will not have status former in their disk headers and are not affected by this option. However if DROP DISKGROUP is used, the disks will have the contents as of the time of the drop, and will be in status former. Thus this option is useful for extracting files from a dropped diskgroup.

fu/llscan Scan entire disk
-fullscan: This option reads every AU on the disk and looks at the contents of the AU rather than limiting the AU's read based on the allocation table. This is useful when the allocation table is corrupt or needs recovery. An AU will be written to the image file if it starts with a block that contains a valid ASM block header. The file and extent information for the map will be extracted from the block header. Physically addressed metadata will be dumped regardless of its contents. This option is incompatible with extracting a file. It is an error to specify -extract with this option. Note that this option is likely to find old garbage metadata in unallocated AU's since there is no means of determining what is allocated. Thus there may be many different copies of the same block, possibly of different versions.

h/ex Always print block contents in hex
-hex: This prints the block contents in hex without attempting to print them as ASM metadata. This is useful when the block is known to not be ASM metadata. It avoids the ASM block header dump and ensures the block is not accidentally interpreted as ASM metadata. This option requires at least one -print option.

noa/cd Do not dump ACD
-noacd: This option limits the dumping of the Active Change Directory to just the control blocks that contain the checkpoint. There is 126 MB of ACD per ASM instance (42 MB for external redundancy). It is normally of no interest if there has been a clean shutdown or no updates for a while. This option avoids dumping a lot of unimportant data. The blocks will still be read and checked for corruption. The map file will still contain entries for the ACD extents, but the block counts will be zero.

nod/ir Do not create a dump directory
-nodir: No dump directory is created, and no files are created in it. The directory name is not written to standard out. The report file is written to standard out before any block printouts from any -print options. This option conflicts with -filedump. It is an error to specify this and extract a file to the dump directory.

noe/xtract Do not create extracted file
-noextract: This prevents files from being extracted to an output file, but the file will be read and any errors in selecting the correct output will be reported. This is most useful in
combination with the -compare option.

noh/eart Do not check for heartbeat
-noheart: Normally the heartbeat block will be saved at discovery time and checked when the disk is scanned. A sleep is added between discovery and scanning to ensure there is time for the heartbeat to be written. If the heartbeat block changes then it is most likely that the diskgroup containing this disk is mounted by an active ASM instance. An error and warning is generated but operation proceeds normally. This option suppresses this check and avoids the sleep.

noi/mage Do not create image files
-noimage: No image files will be created n the dump directory. All the reads specified by the read options will still be done. The map files may be used to find blocks on the disks themselves. In the map file, the count of blocks dumped, the image file sequence number, and the byte offset in the image file will all always be zero (C00000 S0000 B0000000000)

nom/ap Do not create map or image files
-nomap: No map file is created and no image file is created. The only output is the report file. The -noimage option is assumed if this is set since an image file without a map is useless. The options -noscan and -noread also result in no map or image files, but -nomap still reads the metadata to check for I/O errors and corrupt blocks.

nop/rint Do no print block contents
-noprint: This suppresses the printout of the block contents for blocks printed with the -print option. It is useful for getting just the block reports without a lot of data. This option requires at least one -print option.

norea/d Shallow discovery only
-noread: This eliminates any reading of any disks at all. Only shallow discovery will be done. The report will end after the discovery section. It is an error to specify this option and specify a file to extract or blocks to print. It is an error to specify this and -fullscan.

norep/ort Do not generate a report
-noreport: This suppresses the generation of the report file. It is most useful in combination with -nodir and -print to get block printouts without a lot of clutter. It is unnecessary to include this with -directory since no report is generated then anyway.

nosc/an Deep discovery only
-noscan: This eliminates any reading of any disks after deep discovery. This results in just doing a deep discovery using the disksting parameter. The report will end after the discovery section. It is an error to specify this option and specify a file to extract. It is an error to specify this and -fullscan.

nosu/bdir Do not create a dump directory
-nosubdir: No dump directory is created, but files are still created. The directory name is not written to standard out. The report file and any other dump or extract files are written to the current directory or to the directory indicated by -parentdir. This means that if multiple AMDU dumps are requested using this option, the report file will always correspond to the last dump requested.

nov/irtual Do not dump virtual metadata
-novirtual: This option eliminates reading of any virtual metadata. Only the physically addressed metadata will be read. This implicitly eliminates the ACD and extent maps so -noacd and -noxmap will be assumed.

nox/map Do not dump extent maps
-noxmap: This option eliminates reading of the indirect extents containing the file extent maps. This is the bulk of the metadata in most diskgroups. Even the entries in the map file will be eliminated.

o/utput Files to create for extract
-output <file_name>: This option specifies a different file for writing an extracted file. The file will be overwritten if it already exists. This option requires that exactly one file is
extracted via the -extract option. Required with -directory

pa/rent Parent for dump directory
-parent <path_name>: By default the dump directory is created in the current directory, but another directory can be specified using this option. The parent directory for the dump directory must already exist.

pr/int Block to print
-print <block_spec>: This option prints one or more blocks to standard out. This option may be specified multiple times to print multiple <block_spec>s. The printout contains information about how each block was read as well as a formatted printout. Multiple blocks matching the same <block_spec> may be found when scanning the disks. For example there may be multiple disks that have headers for the same diskgroup and disk number. If the block is from a mirrored file then multiple copies should exist on different disks. If multiple copies of the same block have identical contents then only one formatted printout of the contents will be generated, but a header will be printed for each copy. A <block_spec> may include a count of sequential blocks to print. A <block_spec> may specify a block either by disk or file.
<block_spec> ::= <single_block> | <single_block>.C<count>
<single_block> ::= <report_disk_block> | <group_disk_block> |
<extent_file_block> | <virtual_file_block> | <xmap_file_block>
<report_disk_block> ::=
<group_name>.N<report_number>.A<au_number>.B<block_number>
<group_disk_block> ::=
<group_name>.D<disk_number>.A<au_number>.B<block_number>
<extent_file_block> ::=
<group_name>.F<file_number>.X<physical_extent>.B<block_number>
<virtual_file_block> ::=
<group_name>.F<file_number>.V<virtual_block_number>
<xmap_file_block> ::=
<group_name>.F<file_number>.M<extent_map_block_number>

r/egistry Dump registry files
-registry: The ASM registries will be read and dumped to the image file. There will be no block consistency checks since these files do not have ASM cache headers. To dump one specific registry specify -filedump and include the file object for the registry (e.g. DATA.255).

s/pfile Extract usable spfile
-spfile: This causes extract to render the resulting file in a form that is directly usable by startup. Without this option, AMDU will extract the file as a regular ASM file including all ASM specific headers and such
TBD
 
ASMCMD
ASM CoMmanD line interface (Wrapper)

This program is a wrapper for asmcmdcore. It takes the same parameters as asmcmdcore. It first checks to see if %ORACLE_HOME% is set. If not, it prints an error messages and exits. It then invokes asmcmdcore at %ORACLE_HOME%/bin/asmcmdcore with the Perl interpreter at %ORACLE_HOME%/perl/<version>/bin/perl.
C:\app\oracle\product\12.1.0\dbhome_2\BIN>set ORACLE_HOME=/app/oracle/product/12.1.0/dbhome_2

C:\app\oracle\product\12.1.0\dbhome_1>asmcmd -help
usage: asmcmd [-V] [--nocp] [-v {errors | warnings | normal | info | debug} ] [--privilege {sysasm | sysdba} ] [-p] [--inst <instance_name>] [--discover][<command>]
help: help
TBD
 
ASMTOOL
Undocumented  
TBD
 
ASMTOOLG
Undocumented  
TBD
 
CHOPT
CHang database OPTions chopt <enable | disable> <option>
chopt enable rat
 
CREATDEP
Undocumented C:\app\oracle\product\12.1.0\dbhome_1>creatdep -help
Usage: creatdep /s <ServiceName> /d <DependServiceName>
TBD
 
DBV
Database Verify dbv USERID=username/password
segment_id=<tablespace_name.segfile.segblock>
logfile=<logging_file_name_and_path>
feedback=<integer>
help=<Y/N>
parfile=<parameter_file_name_and_path>
C:\Users\oracle>dbv -help

DBVERIFY: Release 12.1.0.1.0 - Production on Sun Jul 20 14:21:44 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

Keyword Description (Default)
----------------------------------------------------
FILE        File to Verify                 (NONE)
START       Start Block                    (First Block of File)
END         End Block                      (Last Block of File)
BLOCKSIZE   Logical Block Size             (8192)
LOGFILE     Output Log                     (NONE)
FEEDBACK    Display Progress               (0)
PARFILE     Parameter File                 (NONE)
USERID      Username/Password              (NONE)
SEGMENT_ID  Segment ID (tsn.relfile.block) (NONE)
HIGH_SCN    Highest Block SCN To Verify    (NONE)
            (scn_wrap.scn_base OR scn)
/*The following example shows a sample use of the command-line interface to this mode of DBVERIFY.

SEGMENT_ID specifies the segment to be verified. It is composed of the tablespace ID number (tsn), segment header file number (segfile), and segment header block number (segblock). These can be obtained by querying TABLESPACE_ID, HEADER_FILE, and HEADER_BLOCK from sys_user_segs. */


SELECT tablespace_id, header_file, header_block
FROM sys_user_segs
ORDER BY 1,2,3;

dbv USERID=uwclass/uwclass SEGMENT_ID=2.3.38451

DBVERIFY - Verification starting : SEGMENT_ID = 2.3.38451

DBVERIFY - Verification complete

Total Pages Examined         : 32
Total Pages Processed (Data) : 28
Total Pages Failing (Data)   : 0
Total Pages Processed (Index): 0
Total Pages Failing (Index)  : 0
Total Pages Processed (Other): 3
Total Pages Processed (Seg)  : 1
Total Pages Failing (Seg)    : 0
Total Pages Empty            : 0
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Highest block SCN            : 30027821 (0.30027821)
 
NID
DB New ID Help DBNEWID is a database utility that can change the internal database identifier (DBID) and the database name (DBNAME) for an operational database.

Prior to the introduction of the DBNEWID utility, you could manually create a copy of a database and give it a new database name (DBNAME) by re-creating the control file. However, you could not give the database a new identifier (DBID). The DBID is an internal, unique identifier for a database. Because Recovery Manager (RMAN) distinguishes databases by DBID, you could not register a seed database and a manually copied database together in the same RMAN repository. The DBNEWID utility solves this problem by allowing you to change any of the following:

* Only the DBID of a database
* Only the DBNAME of a database
* Both the DBNAME and DBID of a database

Changing the DBID of a database is a serious procedure. When the DBID of a database is changed, all previous backups and archived logs of the database become unusable. After you change the DBID, you must open the database with the RESETLOGS option, which re-creates the online redo logs and resets their sequence to 1 (see the Oracle11g Database Administrator's Guide). Consequently, you should make a backup of the whole database immediately after changing the DBID.

Changing the DBNAME without changing the DBID does not require you to open with the RESETLOGS option, so database backups and archived logs are not invalidated. However, changing the DBNAME does have consequences. You must change the DB_NAME initialization parameter after a database name change to reflect the new name. Also, you may have to re-create the Oracle password file. If you restore an old backup of the control file (before the name change), then you should use the initialization parameter file and password file from before the database name change.

Syntax:
Keyword Description Default
TARGET Username / Password None
DBNAME New database name None
LOGFILE Output log None
REVERT Revert failed change NO
SETNAME Set a new database name only NO
APPEND Append to output log NO
HELP Displays help messages NO
C:\app\oracle\product\12.1.0\dbhome_2\BIN>nid -help

DBNEWID: Release 12.1.0.1.0 - Production on Sun Jul 20 14:25:27 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

Keyword Description (Default)
----------------------------------------------------
TARGET      Username/Password              (NONE)
DBNAME      New database name              (NONE)
LOGFILE     Output Log                     (NONE)
REVERT      Revert failed change           NO
SETNAME     Set a new database name only   NO
APPEND      Append to output log           NO
HELP        Displays these messages        NO
DB New ID /* Ensure that you have a recoverable whole database backup and ensure that the target database is mounted but not open, and that it was shut down consistently prior to mounting. */

SHUTDOWN IMMEDIATE
STARTUP MOUNT

/* Invoke the DBNEWID utility on the command line, specifying a valid user with the SYSDBA privilege. */

% nid TARGET=sys/oracle123@test_db

/* To change the database name in addition to the DBID, specify the DBNAME parameter. This example changes the name to orabase: */

% nid TARGET=sys/oracle@test DBNAME=orabase

/* The DBNEWID utility performs validations in the headers of the datafiles and control files before attempting I/O to the files. If validation is successful, then DBNEWID prompts you to confirm the operation (unless you specify a log file, in which case it does not prompt), changes the DBID for each datafile (including offline normal and read-only datafiles), and then exits. The database is left mounted but is not yet usable. */

DBNEWID: Release 12.1.0.1.0 - Production on Mon Jul 21 07:28:35 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

Connected to database TEST_DB (DBID=3942195360)

Control Files in database:
/oracle/dbs/cf1.f
/oracle/dbs/cf2.f

Change database id of database SOLARIS? (Y/[N]) => y

Proceeding with operation
Datafile /oracle/dbs/tbs_01.f - changed
Datafile /oracle/dbs/tbs_02.f - changed
Datafile /oracle/dbs/tbs_11.f - changed
Datafile /oracle/dbs/tbs_12.f - changed
Datafile /oracle/dbs/tbs_21.f - changed

/* New DBID for database TEST_DB is 3942196782.
All previous backups and archived redo logs for this database are unusable
Proceed to shutdown database and open with RESETLOGS option
DBNEWID - Database changed

If validation is not successful, then DBNEWID terminates and leaves the target database intact. You can open the database, fix the error, and then either resume the DBNEWID operation or continue using the database without changing its DBID
After DBNEWID successfully changes the DBID, shut down the database */


SHUTDOWN IMMEDIATE

-- mount the database

STARTUP MOUNT

-- open the database in RESETLOGS mode and resume normal use

ALTER DATABASE OPEN RESETLOGS;

/* make a new database backup. Because you reset the online redo logs, the old backups and archived logs are no longer usable in the current incarnation of the database. */
/* The following steps describe how to change the database name without changing the DBID. */

-- 1. Ensure that you have a recoverable whole database backup
-- 2. Ensure that the target database is mounted but not open, and that it was shut down consistently prior to mounting


SHUTDOWN IMMEDIATE
STARTUP MOUNT

-- 3. Invoke the utility on the command line, specifying a valid user with the SYSDBA privilege. You must specify both the DBNAME and SETNAME parameters. This example changes the name to orabase

% nid TARGET=SYS/oracle@test_db DBNAME=orabase SETNAME=YES

/* DBNEWID performs validations in the headers of the control files (not the datafiles) before attempting I/O to the files. If validation is successful, then DBNEWID prompts for confirmation, changes the database name in the control files, and exits. After DBNEWID completes successfully, the database is left mounted but is not yet usable. */

DBNEWID: Release 12.1.0.1.0 - Production on Mon Jul 21 07:28:35 2014
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

Connected to database TEST_DB (DBID=3942196782)

Control Files in database:
/oracle/dbs/cf1.f
/oracle/dbs/cf2.f

Change database name of database TEST_DB to ORABASE? (Y/[N]) => Y

Proceeding with operation

Database name changed from TEST_DB to ORABASE - database needs to be shutdown.
Modify parameter file and generate a new password file before restarting.

DBNEWID - Successfully changed database name

/* If validation is not successful, then DBNEWID terminates and leaves the target database intact. You can open the database, fix the error, and then either resume the DBNEWID operation or continue using the database without changing the database name. */

-- 4. Shut down the database.


SHUTDOWN IMMEDIATE

-- 5. Set the DB_NAME initialization parameter in the initialization parameter file to the new database name.
-- 6. Create a new password file.
-- 7. Start up the database and resume normal use.


STARTUP
/* To revert a stalled DBID change operation, run the DBNEWID utility again, specifying the REVERT keyword. */

% nid TARGET=SYS/oracle REVERT=YES LOGFILE=$HOME/nid.log
/* connects with operating system authentication and changes only the DBID */

% nid TARGET=/

/* changing the DBID and Database Name. The following example connects as user SYS and changes the DBID and also changes the database name to test2 */

% nid TARGET=SYS/oracle@test_db DBNAME=orabase
 
OPATCH
Opatch Options Opatch is Oracle's patching utility for database, ASM, and Clusterware.
APPLY

Applies an interim patch to an Oracle Home from the current directory
DESCRIPTION
This operation applies an interim patch to an ORACLE_HOME from the current directory. The patch location can specified using the parameter patch_location. This command doesn't support System Patch.

SYNTAX
opatch apply [-connectString <List of connect strings>]
[-delay <value> ] [ -force ] [ -force_conflict ]
[-init <parameters for the init script in escaped double quotes> [-opatch_init_end] ]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC> ] [-local ] [-local_node <Local node name>]
[-minimize_downtime ] [-no_bug_superset ] [-no_inventory ]
[-no_relink] [-no_sysmod] [-ocmrf <Response file location> ]
[-oh <ORACLE_HOME> ]
[-post <parameters for the post script in escaped quotes> [-opatch_post_end] ]
[-pre <parameters for the pre script in escaped double quotes> [-opatch_pre_end] ]
[-profile_mask <Name of profile>]
[-property_file <Path to property file>]
[-ptlConnect <portal connect string>]
[-ptlPassword <portal password>]
[-ptlSchema <portal schema>]
[-remote_nodes <List of remote nodes (node1,node2)>]
[-retry <value ] [-runSql ]
[silent ] [-sqlScript <path of the sql file>] [-verbose ]
[ <Patch Location> ]


OPTIONS
-all_nodes
Apply the patch using all-node mode.

-connectString
This option can be used to specify the list of database instances on which the patch needs to be applied. The value for this option is specified as per the following syntax "SID:User:Passwd:Node". The SID is a must, others can be ignored, OPatch takes default values for it.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to patch just the local node, provide the node name as empty string.

-delay
If -retry is specified, this options tells OPatch how many seconds it should wait before attempting to lock inventory again in case of a previous failure.

-force
This option is meaningful with 'silent' option and is used to override the behavior of silent under specific circumstances.

-force_conflict
If a conflict exist which prevents the patch from being applied, the -force_conflict flag can be used to apply the patch. OPatch will remove all the conflicting patches before applying the current patch. This will override the 'silent' behavior for conflicts and hence is meaningful only when used with 'silent' option.

-init
This option is used to pass parameters to the init script. This script is executed before prerequisite checks are run. The value for this option have to be enclosed in double quotes. This option should be ended by option 'opatch_init_end'.

-invPtrLoc
Used to locate the oraInst.loc file. Needed when the installation used the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-local
Patch the local node, then update inventory of the local node. Do not propagate the patch or inventory update to other nodes.

-local_node
This option can be used to specify to OPatch the local node name to be used for RAC mode application of the patch.

-minimize_downtime
Only applied to RAC instances. User supplies the order of nodes to be patched. This option cannot be used in conjunction with -local option with a rolling patch.

-no_bug_superset
This option tells OPatch to error out if the current patch's bugs-to-fix is a super-set (or same set) of an installed patch's bugs-fixed in the Oracle Home.


-no_inventory
This option specifies not to update the inventory, it just updates the files in the system. If inventory is readable, then OPatch tries to read the inventory.

-no_relink
The nolink option does not perform any make operations. This option can be used during multiple patch applications and perform the linking step only once. OPatch does not keep track of the make operations it did not perform. It is the job of the OPatch users to make sure the execute OPatch without this option at the end, so that compilation happens once.

-no_sysmod
This option specifies not to update the files in the system. It just updates the inventory. It also will not execute the pre and post scripts.

-ocmrf
Give OPatch the absolute path to the OCM response file to be used for OCM configuration. -silent must be used in conjunction with -ocmrf if Oracle Home doesn't have OCM installed and configured.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-opatch_init_end
This option is used to mark the end of init options. Without this option everything after init till end of the command is passed into init. This option is meaningless without -init option.

-opatch_post_end
This option is used to mark the end of post options. Without this option everything after post till end of the command is passed into post. This option is meaningless without -post option.

-opatch_pre_end
This option is used to mark the end of pre options. Without this option everything after pre till end of the command is passed into pre. This option is meaningless without -pre option.

-post
This option is used to pass parameters to the post script. This script is executed after application of the patch. The value for this option have to be enclosed in double quotes. This option should be ended by option 'opatch_post_end'.

-pre
This option is used to pass parameters to the pre script. This script is executed before application of the patch. The value for this option have to be enclosed in double quotes. This option should be ended by option 'opatch_pre_end'.

-profile_mask
If the patch to be applied specifies WLS patch/patchset as prerequisites, OPatch will read the WLS default patch profile. To have OPatch read non-default patch profile, specify the patch profile name with this option.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

-ptlConnect
This option can be used to specify the connect string of the portal schema.

-ptlPassword
This option can be used to specify the password of the portal schema.

-ptlSchema
This option can be used to specify the schema of the portal repository patch.

-remote_nodes
This option can be used to specify to OPatch the list of remote nodes to be used for RAC mode application of the patch. The node names are comma separated and without spaces.

-report
Just prints out the actions without executing.

-retry
This option tells OPatch how many times it should retry in case of an inventory lock failure.

-runSql
This option can be used to specify OPatch to run the sql scripts and sql procedures if they are present in the given patch.

-silent
This suppresses any user-interaction

-sqlScript
This option can be used to specify the custom sql script to be run by OPatch after patching is completed.

-verbose
This option prints more OPatch output to the screen as well as to the log file

PARAMETERS
Patch Location
Path to the location for the patch. If the patch location is not specified, then the current directory is taken as the patch location.
TBD
CHECKAPPLICABLE DESCRIPTION
This operation checks if a given patch is applicable to one or more Oracle Homes.

For a Fusion Middleware installation, OPatch will look for Oracle Homes present under the Middleware home and registered with a single defined central inventory. If environment variable MW_HOME (or) 'mw_home' option is not defined and the ORACLE_HOME environment variable or 'oh' option is also not defined then OPatch will run the command on the applicable Middleware Home. If ORACLE_HOME environment variable is defined or the 'oh' option is given, OPatch will run the command on the referenced Oracle Home with precedence given to the 'oh' option.

Examples of patches not applicable are:
- Patches requiring components that are not installed in the Oracle Home (or) installed but not of the same version.
- Files mentioned by patch metadata could not be patched.


SYNTAX
opatch checkApplicable -ph <Patch location>
[-allhomes ]
[-invPtrLoc <Path to oraInst.loc file> ]
[-mw_home <Path of the middleware home> ]
[-oh <Path of the reference oracle home> ]


OPTIONS
-allhomes
  This option will overide all other options involved in the logic of getting the homes for test of 'checkApplicable'. This option ensures that the check is only applied to all registered homes in central inventory.

-invptrloc
Used to locate the oraInst.loc file. Needed when the installation uses the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-mw_home
Path of the Middleware Home. This takes precedence over MW_HOME environment variable.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME. This also ensures that the command runs only on this Oracle Home.

-ph
The location of the patch to be checked if it is applicable.

PARAMETERS
The location of the patch to be queried
TBD
CHECKINSTALLEDONEOFFS DESCRIPTION
This operation checks if the given patch(es) are installed on a number of Fusion Middleware Oracle Homes.

For a Fusion Middleware installation, OPatch will look for Oracle Homes present under the Middleware home and registered with a single defined central inventory. If environment variable MW_HOME (or) 'mw_home' option is not defined and the ORACLE_HOME environment variable or 'oh' option is also not defined then OPatch will run the command on the applicable Middleware Home. If ORACLE_HOME environment variable is defined or the 'oh' option is given, OPatch will run the command on the referenced Oracle Home with precedence given to the 'oh' option.

If 'domain' option is given, the command will be invoked on Fusion Middleware Oracle homes associated with a domain.


SYNTAX
opatch checkInstalledOneOffs -id <List of Patch IDs separated by commas> ]
[-domain <Name of the domain> ]
[-invPtrLoc <Path to oraInst.loc file> ]
[-mw_home <Path of the middleware home> ]
[-oh <Path of the reference oracle home> ]


OPTIONS
-id
A single Patch ID (or) comma separated list of Patch IDs.

-domain
Name of the domain.

-invptrloc
Used to locate the oraInst.loc file. Needed when the installation uses the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-mw_home
Path of the Middleware Home. This takes precedence over MW_HOME environment variable.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME. This also ensures that the command runs only on this Oracle Home.

PARAMETERS
Patch IDs separated by commas
TBD
COMPARE DESCRIPTION
Allows for comparison between two files generated by the 'opatch lsinv -xml' command. Currently, the command only takes in two such files as input.

SYNTAX
opatch compare [<file1> <file2>]

OPTIONS
-help
This will bring up this help text.

PARAMETERS
<file1> <file2>
These are the two files that will be compared.
Currently, only two file names will be accepted, and these files must have been generated by the 'opatch lsinv -xml' command.
TBD
DEPLOY DESCRIPTION
This operation deploys the following modified artifacts.

1. Life cycle operations for JEE.
2. SOA composite artifacts.

This operation assumes that the patch is already installed in the Oracle Home. So, 'id' option needs to be used to specify the patch for deployment.

Please refer the following instructions for life cycle & SOA composite deployment.

The -domain <DOMAIN_NAME> option has to be specified along with the -auto option for automated rollout to the Fusion Middleware domain.
If only a single domain has been created out of the Oracle Home you can omit specifying the domain name.
Only certain patches which have been certified by Oracle Product Support can be rolled out using this command.

OPatch will pose questions to query for information necessary for accessing the Fusion Middleware domain. They are Admin Server URL, Admin Server User, Admin Server Password, Node Manager User and Node Manager password. Node Manager User and Node Manager password are not needed for SOA composite deployment.

SYNTAX
opatch deploy -id <ID of the patch installed in Oracle Home>
[-domain <DOMAIN_NAME>] [-auto ]
[-invPtrLoc <Patch to oraInst.loc file ]
[-jre <JRE location> ]
[-mw_home <Middlware Home> ]
[-oh <Oracle Home Path> ]
[-report ]
[-silent ] [-property_file <Path to custom property file>]


OPTIONS
-domain
The name of the Fusion Middleware domain to which the artifacts affected by the patch will be redeployed.

-auto
This option is deprecated and is no-op for 'deploy'.

-id
A single Patch ID that is installed in the Oracle Home.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

For SOA deployment, the following keys are required with the necessary values.

'AdminConfigFile' - Encrypted file for Admin Server user.
'AdminKeyFile' - Encrypted file for Admin Server password.
'AdminServerURL' - Admin Server URL.

For encryption files, Please check 'storeUserConfig' WLST command for details.

For life cycle deployment, the following keys are required with the necessary values.

'AdminConfigFile' - Encrypted file for Admin Server user.
'AdminKeyFile' - Encrypted file for Admin Server password.
'AdminServerURL - Admin Server URL.
'NodeManagerConfigFile' - Encrypted file for Node Manager user.
'NodeManagerKeyFile' - Encrypted file for Node Manager password.

For encryption files, Please check 'storeUserConfig' WLST command for details.

The Key, value pair is of the format 'x=y' where 'x' is OPatch understood key and each pair is separated by newline in the property file. This option is typically used for silent operations.

-invptrloc
Used to locate the oraInst.loc file. Needed when the installation uses the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-mw_home
The Middleware Home for the Fusion Middleware install. This takes precedence over the environment variable MW_HOME.

-oh
The Oracle Home of the Fusion Middleware product which is to be used for the deploy operations. This takes precedence over the environment variable ORACLE_HOME.

-report
Just prints out the actions without execution.

-silent
Invoke the operation in silent mode. Path to custom property file may be provided which will have required inputs as name-value pairs.

If required inputs are not found, OPatch willl error out with missing key values. Please check 'property_file' option for more details.

PARAMETERS
The 'id' option should be used and it mandates that patch be installed in the Oracle Home.
TBD
HELP

Display OPatch help
opatch -help
C:\Users\oracle>opatch -h
Oracle Interim Patch Installer version 12.1.0.1.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.

Usage: opatch [ -help ] [ -report ] [ command ]

           command := apply
                      compare
                      lsinventory
                      lspatches
                      napply
                      nrollback
                      rollback
                      query
                      version
                      prereq
                      util

<global_arguments> := -help Displays the help message for the command.
                      -report Print the actions without executing.

example:
  'opatch -help'
  'opatch -help -fmw'
  'opatch apply -help'
  'opatch compare -help'
  'opatch lsinventory -help'
  'opatch lspatches -help'
  'opatch napply -help'
  'opatch nrollback -help'
  'opatch rollback -help'
&nbp; 'opatch prereq -help'
  'opatch util -help'

OPatch succeeded.
LISTCOMPOSITES DESCRIPTION
This command lists down all the SOA Composites that are deployed to a SOA Server. The option '-name' can be used to shortlist the composites of a specified name.
It operates through the Admin Server of the domain which needs to be accessible. In addition, the Node Manager is required to be configured and running on the machines which have the WebLogic Server instances installed and affected by this command. OPatch will query for information necessary for accessing the Fusion Middleware domain such as Admin Server URL, Admin Server User and Admin Server Password.

SYNTAX
opatch listComposites
[-invPtrLoc <Path to oraInst.loc file> ]
[-oh <Reference Oracle Home path> ]
[-name <Name of the composites to shortlist> ]
[-silent ][-property_file <Path to custom property file> ]


OPTIONS
-invptrloc
Used to locate the oraInst.loc file. Needed when the installation uses the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-oh
The Oracle Home to work on. This takes precedence over the environment variable ORACLE_HOME.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch For FMW components, 'AdminConfigFile', 'AdminKeyFile', location can be specified as keys with corresponding files as values. They refer to encrypted, decrypted files for Admin user and Admin password respectively.

For encryption files, Please check 'storeUserConfig' WLST command for details.

Similarly, Admin Server URL (key as 'AdminServerURL'), can be given as key with corresponding value. The Key, value pair is of the format 'x=y' where 'x' is OPatch understood key and each pair is separated by newline in the property file.

-name
The name of the composites to be shortlisted.

-silent
Invoke the operation in silent mode. Path to custom property file may be provided which will have required inputs as name-value pairs. If required inputs are not found, OPatch will exit with error message quoting the missing inputs.

PARAMETERS
There are no required parameters.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>opatch listcomposites
Oracle Interim Patch Installer version 12.1.0.1.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.


Oracle Home : C:\app\oracle\product\121~1.0\dbhome_2
Central Inventory : C:\Program Files\Oracle\Inventory
from : n/a
OPatch version : 12.1.0.1.0
OUI version : 12.1.0.1.0
Log file location : C:\app\oracle\product\121~1.0\dbhome_2\cfgtoollogs\opatch\opatch2014-07-21_15-07-08PM_1.log

Invoking utility "listcomposites"
UtilSession failed:
This command is supported for Fusion Middleware products only.

OPatch failed with error code = 73
LSDOMAINS DESCRIPTION
This command produces a list of WebLogic domains that have been created from the application and library artifacts installed in the given Fusion Middleware product Oracle Home.

The Middleware Home can be specified by using the 'mw_home' command-line option or by specifying the MW_HOME environment variable (the command-line option has higher precedence).

SYNTAX
opatch lsdomains [-invptrloc <Path to oraInst.loc> ]
[-mw_home <Path of the Middleware home> ]
[-oh <The Oracle Home within a Middleware Home> ]


OPTIONS
-invptrloc
Used to locate the oraInst.loc file. Needed when the installation uses the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-mw_home
Path of the Middleware Home. This takes precedence over MW_HOME environment variable.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

PARAMETERS
There are no mandatory parameters defined for this command.
C:\Windows\system32>opatch lsdomains
Oracle Interim Patch Installer version 12.1.0.1.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.


Oracle Home : C:\app\oracle\product\121~1.0\dbhome_2
Central Inventory : C:\Program Files\Oracle\Inventory
from : n/a
OPatch version : 12.1.0.1.0
OUI version : 12.1.0.1.0
Log file location : C:\app\oracle\product\121~1.0\dbhome_2\cfgtoollogs\opatch\opatch2014-07-21_15-08-27PM_1.log

Invoking utility "lsdomains"
UtilSession failed:
This command is supported for Fusion Middleware products only.

OPatch failed with error code = 73
LSHOMES DESCRIPTION
This command lists all the Oracle Homes pertaining to logical entities such as Host or Domain. For a Host, the list of Oracle Homes is obtained from the machine's central inventory. For a WebLogic domain, the list of homes is limited to product Oracle Homes that are installed within a top-level Middleware Home. If the 'domain' or 'domaindir' option is used the command lists the Oracle Homes that have been used to create or extend the WebLogic domain. If the 'domain' or 'domaindir' option is not given, all the homes registered with the machine's central inventory or the inventory location specified using the 'invPtrLoc' are listed. The Middleware Home can be specified by using the 'mw_home' command-line option or by using MW_HOME environment variable. When the Middleware Home is specified and the 'domain' or 'domaindir' option is not specified this command will list all the Oracle Homes within the Middleware Home that are registered with the machine's central inventory or the specified inventory location.

SYNTAX
opatch lshomes [-domain <Name of the domain> | -domaindir <Path to the WebLogic domain> ]
[-invPtrLoc <Path to oraInst.loc> ]
[-mw_home <Path of the Middleware home> ]
[-oh <Reference Oracle Home> ]


OPTIONS
-domain
The name of the domain.

-domaindir
The path to the location of the Weblogic domain.

-invptrloc
Used to locate the oraInst.loc file. Needed when the installation uses the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-mw_home
Path of the Middleware Home. This takes precedence over MW_HOME environment variable.

-oh
The reference Oracle Home to work on. This takes precedence over the environment variable ORACLE_HOME.

PARAMETERS
There are no mandatory parameters for this command.
C:\Windows\system32>opatch lshomes
Oracle Interim Patch Installer version 12.1.0.1.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.


Oracle Home : C:\app\oracle\product\121~1.0\dbhome_2
Central Inventory : C:\Program Files\Oracle\Inventory
from : n/a
OPatch version : 12.1.0.1.0
OUI version : 12.1.0.1.0
Log file location : C:\app\oracle\product\121~1.0\dbhome_2\cfgtoollogs\opatch\opatch2014-07-21_15-10-45PM_1.log

Invoking utility "lshomes"
UtilSession failed:
This command is supported for Fusion Middleware products only.

OPatch failed with error code = 73
LSINV

Crosscheck installed products and Oracle home directories
DESCRIPTION
List the inventory for a particular $ORACLE_HOME or display all installations that can be found.

SYNTAX
opatch lsinventory [-all ] [-all_nodes] [-bugs_fixed <asc | desc> ]
[-delay <value> ]
[-detail ]
[-group_by_date ]
[-inactive]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC> ]
[-local ]
[-oh <ORACLE_HOME> ]
[-patch <asc | desc> ]
[-patch_id <asc | desc> ]
[-ptlConnect <portal connect string> ]
[-ptlPassword <portal password> ]
[-ptlSchema <portal schema> ]
[-property_file <path to property file>]
[-retry <value> ]
[-translation_patch ]
[-xml <xmlFile>]


OPTIONS
-all
Report the name and installation directory for each $ORACLE_HOME found.

-all_nodes
Reports the patches installed on the given Oracle Home in all nodes of the RAC system. It also prints the oracle binary's size and checksum on all nodes. This option cannot be used in conjunction with -all, -detail, -patch.

-bugs_fixed
Reports bugs fixed by installed patches in a tabular format. Besides the bugs fixed, the report also displays the installed patches, installed times, and bug descriptions. The fixed bugs are sorted per installed patch. Default display is patches in descending order based on installed time and ascending order of bugs within each patch. You can use 'asc' (or) 'desc' with this option to enforce sort order on bugs within each patch.

You can use this option with the patch (or) patch_id option to obtain sort orders with installed patches.

-delay
If -retry is specified, this option tells OPatch how many seconds it should wait before attempting to lock inventory again in case of a previous failure.

-detail(s)
Report installed products and other details. This option cannot be used in conjunction with all option.

-group_by_date
This option tells OPatch to group all installed patches by the date they were installed in the Oracle Home.

-inactive
This option lists all the inactive patches that have been superseded by other superset patch(es) installed in the Oracle Home.

-invPtrLoc
Used to locate the oraInst.loc file. When the installation used the invPtrLoc flag. This should be the path to the oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-local
This option tells OPatch to display inventory information of the local node only.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-patch
Lists the patch IDs installed in the Oracle home in ascending (asc) or descending (desc) order, which is the default, based on installed time.

-patch_id
Lists the patch IDs installed in the oracle home in ascending (asc) or descending (desc) order based on patch numbers. The value defaults to ascending (asc).

-ptlConnect
This option is used to specify the connect string credentials of the portal schema.

-ptlPassword
This option is used to specify the password of the portal schema.

-ptlSchema
This option is used to specify the schema of the portal repository.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

-retry
This option tells OPatch how many times it should retry in case of an inventory lock failure.

-translation_patch
Report installed translation patch(es) in a tabular format.
The report displays translation patch, unique patch identifier, language code, installed time of the translation patch and base patch for any single row in the table.

-xml
This option must be followed with an xml filename, and it will generate xml output based on the current Oracle Home inventory into the filename.

PARAMETERS
This operation does not have any required parameters.
C:\Windows\system32>opatch lsinv
Oracle Interim Patch Installer version 12.1.0.1.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.


Oracle Home : C:\app\oracle\product\121~1.0\dbhome_2
Central Inventory : C:\Program Files\Oracle\Inventory
from : n/a
OPatch version : 12.1.0.1.0
OUI version : 12.1.0.1.0
Log file location : C:\app\oracle\product\121~1.0\dbhome_2\cfgtoollogs\opatch\opatch2014-07-21_15-14-24PM_1.log

Lsinventory Output file location : C:\app\oracle\product\121~1.0\dbhome_2\cfgtoollogs\opatch\lsinv\lsinventory2014-07-21_15-14-24PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 12c 12.1.0.1.0
There are 1 products installed in this Oracle Home.

Interim patches (4) :

Patch 17352756 : applied on Wed Jan 22 15:09:40 PST 2014
Unique Patch ID: 16769532
Created on 7 Sep 2013, 06:10:08 hrs PST8PDT
Bugs fixed:
17352756

Patch 16952749 : applied on Wed Jan 22 15:09:16 PST 2014
Unique Patch ID: 16733648
Created on 28 Aug 2013, 06:13:44 hrs PST8PDT
Bugs fixed:
16952749

Patch 16924879 : applied on Wed Jan 22 15:08:48 PST 2014
Unique Patch ID: 16663811
Created on 8 Aug 2013, 04:50:55 hrs PST8PDT
Bugs fixed:
16924879

Patch 16693399 : applied on Wed Jan 22 15:04:44 PST 2014
Unique Patch ID: 16661119
Created on 29 Jul 2013, 18:42:37 hrs PST8PDT
Bugs fixed:
16693399
LSINVENTORY

Crosscheck installed products, patches,  and Oracle home directories
DESCRIPTION
List the inventory for a particular $ORACLE_HOME or display all installations that can be found.

SYNTAX
opatch lsinventory [-all ] [-all_nodes]
[-bugs_fixed <asc | desc> ]
[-delay <value> ]
[-detail ]
[-group_by_date ]
[-inactive]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC> ] [-local ]
[-oh <ORACLE_HOME> ] [-patch <asc | desc> ]
[-patch_id <asc | desc> ]
[-ptlConnect <portal connect string> ]
[-ptlPassword <portal password> ]
[-ptlSchema <portal schema> ]
[-property_file <path to property file>]
[-retry <value> ] [-translation_patch ]
[-xml <xmlFile>]


OPTIONS
-all
Report the name and installation directory for each $ORACLE_HOME found.

-all_nodes
Reports the patches installed on the given Oracle Home in all nodes of the RAC system. It also prints the oracle binary's size and checksum on all nodes. This option cannot be used in conjunction with -all, -detail, -patch.

-bugs_fixed
Reports bugs fixed by installed patches in a tabular format. Besides the bugs fixed, the report also displays the installed patches, installed times, and bug descriptions. The fixed bugs are sorted per installed patch. Default display is patches in descending order based on installed time and ascending order of bugs within each patch. You can use 'asc' (or) 'desc' with this option to enforce sort order on bugs within each patch.

You can use this option with the patch (or) patch_id option to obtain sort orders with installed patches.

-delay
If -retry is specified, this option tells OPatch how many seconds it should wait before attempting to lock inventory again in case of a previous failure.

-detail(s)
Report installed products and other details. This option cannot be used in conjunction with all option.

-group_by_date
This option tells OPatch to group all installed patches by the date they were installed in the Oracle Home.

-inactive
This option lists all the inactive patches that have been superseded by other superset patch(es) installed in the Oracle Home.

-invPtrLoc
Used to locate the oraInst.loc file. When the installation used the invPtrLoc flag. This should be the path to the oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-local
This option tells OPatch to display inventory information of the local node only.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-patch
Lists the patch IDs installed in the Oracle home in ascending (asc) or descending (desc) order, which is the default, based on installed time.

-patch_id
Lists the patch IDs installed in the oracle home in ascending (asc) or descending (desc) order based on patch numbers. The value defaults to ascending (asc).

-ptlConnect
This option is used to specify the connect string credentials of the portal schema.

-ptlPassword
This option is used to specify the password of the portal schema.

-ptlSchema
This option is used to specify the schema of the portal repository.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

-retry
This option tells OPatch how many times it should retry in case of an inventory lock failure.

-translation_patch
Report installed translation patch(es) in a tabular format. The report displays translation patch, unique patch identifier, language code, installed time of the translation patch and base patch for any single row in the table.

-xml
This option must be followed with an xml filename, and it will generate xml output based on the current Oracle Home inventory into the filename.

PARAMETERS
This operation does not have any required parameters.
-- windows
c:\> set oracle_home=c:\oracle\product\12.1.0\db_1

c:\> cd c:\oracle\product\12.1.0\db_1\OPatch\opatch lsinventory -all

-- linux
sudo su - oracle

export ORACLE_HOME=/app/oracle/product/12.1.0/db_1

cd $ORACLE_HOME/OPatch

./opatch lsinventory -details

./opatch lsinventory -bugs_fixed
LSPATCHES DESCRIPTION
List and verify patch metadata specified by patch ID (installed in ORACLE_HOME) or patch location.

SYNTAX
opatch lspatches [-bugs] [-id <patch ID> ]
[-invPtrLoc <Path to oraInst.loc> ] [-jre <LOC> ]
[-oh <ORACLE_HOME> ] [ <patch location> ]
[-qfile <file path> ] [-required ] [-verify]

OPTIONS
-bugs
Print bugs info for every patch.

-id
This option specifies the patch number. It must be registered in the Oracle Home inventory. It can be any numeric sequence or combined with language. Ex. 11111, 11111/zh_CN. It can't support multiple patch IDs.

-invPtrLoc
Used to locate the oraInst.loc file. When the installation uses the invPtrLoc flag, the value should indicate the path to oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-qfile
Specify the relative path to Oracle Home of the file to determine the latest patch that touches this file.
Ex. On Linux: admin/rdbms/catcpu.sql
On Windows: admin\rdbms\catcpu.sql
OPatch can tell which latest patch touches the file catcpu.sql in Oracle Home.

-required
This option will print key metadata only. This includes the following metadata: required components, prereq patches, executables to shutdown and support platforms.
This option should be accompanied by either option -id <PATCH_ID> or <PATCH_LOCATION>.

-verify
This option would verify if the specified patch ID or patch location is registered in Oracle Home inventory or not. Besides, it will verify if all patch files are ok in $ORACLE_HOME. This option should be accompanied by either option -id <PATCH_ID> or <PATCH_LOCATION>.This option doesn't support System Patch.
Ex. opatch lspatches -id 111 -verify
    opatch lspatches /scratch/test/111 -verify
TBD
NAPPLY

Applies a set of patches at one time
DESCRIPTION
This operation is used to Apply a set of patches at a time.
Use -silent to apply the patches in silent mode. This command doesn't support System Patch.

SYNTAX
opatch napply [patch_location] [-id comma-separated list of patch IDs]
[ -all_nodes ]
[-connectString <List of connect strings>]
[-delay <value> ]
[ -force ]
[ -force_conflict ]
[-idFile <path of the file that has list of patch IDs ]
[-init <parameters for the init script in escaped double quotes> [-opatch_init_end] ]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC> ]
[ -local ]
[ -local_node <Local node name> ]
[-minimize_downtime ] [-no_bug_superset ]
[-no_inventory ]
[-no_relink]
[-no_sysmod]
[-ocmrf <Response file location> ]
[-oh <ORACLE_HOME> ]
[ -phBaseDir <Path to the directory that contains list of patch directories> ]
[ -phBaseFile <Path to the file containing the location of the patches to be applied> ]
[-post <parameters for the post script in escaped double quotes> [-opatch_post_end] ]
[-pre <parameters for the pre script in escaped double quotes> [-opatch_pre_end] ]
[-profile_mask <Name of profile>]
[ -property_file <Path to property file> ]
[-ptlConnect <portal connect string>]
[-ptlPassword <portal password>]
[-ptlSchema <portal schema>]
[ -remote_nodes <List of remote nodes (node1,node2)> ]
[-retry <value> ]
[-runSql]
[-silent ]
[-skip_subset] [-skip_duplicate]
[-sqlScript <path of the sql file>]
[-verbose ]


OPTIONS
-all_nodes
Apply the patch using all-node mode.

-connectString
This option can be used to specify the list of database instances on which the patch needs to be applied. The value for this option is specified as per the following syntax "SID:User:Passwd:Node". The SID is a must, others can be ignored, OPatch takes default values for it.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to patch just the local node, provide the node name as empty string.

-delay
If -retry is specified, this options tells OPatch how many seconds it should wait before attempting to lock inventory again in case of a previous failure.

-force
This option is meaningful with 'silent' option and is used to override the behavior of silent under specific circumstances.

-force_conflict
If a conflict exist which prevents the patch from being applied, the -force_conflict flag can be used to apply the patch.
OPatch will remove all the conflicting patches before applying the current patch. This will override the 'silent'
behavior for conflicts and hence is meaningful only when used with 'silent' option.

-id
Use 'lsinventory' option to display all patch ids. Each one-off patch is indicated by its id. A comma separated list of patches can be given to select the patches to be applied. For translation patches, the patch id should be of the format
<Patch ID>/<Language code>.

-idFile
The input to be given is a file location that contains a list of apply patch ids separated by commas or white spaces. This option cannot to be in conjunction with 'id' option. For translation patches, the patch id should be of the format <Patch ID>/<Language code>.

-init
This option is used to pass parameters to the init script. This script is executed before prerequisite checks
are run. The value for this option have to be enclosed in double quotes. The parameters will be common parameters
which will be passed to init scripts of all patches being applied. This option should be ended by option 'opatch_init_end'.

-invPtrLoc
Used to locate the oraInst.loc file. Needed when the installation used the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-local
Patch the local node, then update inventory of the local node. Do not propagate the patch or inventory update to other nodes.

-local_node
This option can be used to specify to OPatch the local node name to be used for RAC mode application of the patch.

-minimize_downtime
Only applied to RAC instances. User supplies the order of nodes to be patched. This option cannot be used in conjunction with -local option with a rolling patch.

-no_bug_superset
This option tells OPatch to error out if the current patch's bugs-to-fix is a super-set (or same set) of an installed patch's bugs-fixed in the Oracle Home.

-no_inventory
Bypass the inventory for reading and updates.

-no_relink
The nolink option does not perform any make operations. This option can be used during multiple patch.
applications and perform the linking step only once. OPatch does not keep track of the make operations it did not perform. It is the job of the OPatch users to make sure the execute OPatch without this option at the end, so that compilation happens once.

-no_sysmod
This option specifies not to update the files in the system. It just updates the inventory. It also will not execute the pre and post scripts.

-ocmrf
Give OPatch the absolute path to the OCM response file to be used for OCM configuration. -silent must be used
in conjunction with -ocmrf if Oracle Home doesn't have OCM installed and configured.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-opatch_init_end
This option is used to mark the end of init options. Without this option everything after init till end of the command is passed into init. This option is meaningless without -init option.

-opatch_post_end
This option is used to mark the end of post options. Without this option everything after post till end of the command is passed into post. This option is meaningless without -post option.

-opatch_pre_end
This option is used to mark the end of pre options. Without this option everything after pre till end of the command is passed into pre. This option is meaningless without -pre option.

-phBaseDir
Used to specify a directory containing patch directories (or) zip files.

-phBaseFile
If <patch_location> is not specified, use this option to point OPatch to a file containing a list of patches
to be n-applied. Each line in the file points to a location of a patch.

-ptlConnect
This option can be used to specify the connect string of the portal schema.

-ptlPassword
This option can be used to specify the password of the portal schema.

-ptlSchema
This option can be used to specify the schema of the portal repository patch.

-post
This option is used to pass parameters to the post script.
This script is executed after application of the patch.
The value for this option have to be enclosed in double quotes. The parameters will be common parameters which will be passed to post scripts of all patches being applied.
This option should be ended by option 'opatch_post_end'.

-pre
This option is used to pass parameters to the pre script. This script is executed before application of the patch. The value for this option have to be enclosed in double quotes. The parameters will be common parameters which will be passed to pre scripts of all patches being applied. This option should be ended by option 'opatch_pre_end'.

-profile_mask
If the patch to be applied specifies WLS patch/patchset as prerequisites, OPatch will read the WLS default patch profile. To have OPatch read non-default patch profile, specify the patch profile name with this option.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

-remote_nodes
This option can be used to specify to OPatch the list of remote nodes to be used for RAC mode application of the patch. The node names are comma separated and without spaces.

-report
Just prints out the actions without executing.

-retry
This option tells OPatch how many times it should retry in case of an inventory lock failure.

-runSql
This option can be used to specify OPatch to run the sql scripts and sql procedures if they are present in the given patch.

-silent
This suppresses any user-interaction.


-skip_duplicate
This skips patches to be applied that are duplicates of other patches installed in the Oracle Home. Two patches are duplicates if they fix the same set of bugs.

-skip_subset
This skips patches to be applied that are subset of other patches installed in the Oracle Home. One patch is a subset of another patch if the former fixes a subset of bugs fixed by the latter.


-sqlScript
This option can be used to specify the custom sql script to be run by OPatch after patching is completed.

-verbose
This option prints more OPatch output to the screen as well as to the log file.

Example:
'opatch napply <patch_location>' to apply all patches under <patch_location> directory

'opatch napply <patch_location> -id 1,2,3' to apply patches 1, 2, and 3 which are present under <patch_location> directory.

'opatch napply <patch_location> -skip_subset -skip_duplicate' to apply all patches under <patch_location> directory.
OPatch will skip duplicate patches and subset patches (patches under <patch_location> that are subsets of patches installed in the Oracle Home).

'opatch napply <patch_location> -id 1,2,3 -skip_subset -skip_duplicate' to apply patches 1, 2, and 3 which are under <patch_location> diretory. OPatch will skip duplicate patches and subset patches (patches under <patch_location> that are subsets of patches installed in the Oracle Home).

'opatch napply <patch_location> -idfile /tmp/list.txt' where list.txt contains a list of patch IDs to be applied. The list should be separated by a space or comma.
For example: 1 2 3.

'opatch napply <patch_location> -id 1/fr,2/de' to apply patches 1 (french patch), 1 (german patch) which are present in the <patch_location> directory.
TBD
NROLLBACK

Rollback a set of patches at one time
DESCRIPTION
This operation is used to Rollback a set of patches at a time.
Use -silent to Rollback the patches in silent mode.

SYNTAX
opatch nrollback -id <comma-separated list of patch IDs>
[ -all_nodes ]
[-connectString <List of connect strings>]
[-delay <value>] -id <Comma separated list of patch IDs>
[-idFile <file location containing a list of rollback IDs separated by commas or white spaces>
[-init <parameters for the init script in escaped double quotes> [-opatch_init_end] ]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC> ]
[-local]
[-local_node <Local node name>]
[-no_inventory]
[-no_relink]
[-no_sysmod]
[-oh <ORACLE_HOME> ]
[-post <parameters for the post script in escaped double quotes>[ -opatch_post_end] ]
[-pre <parameters for the pre script in escaped double quotes> [-opatch_pre_end] ]
[-property_file <Path to property file>]
[-ptlConnect <portal connect string>]
[-ptlPassword <portal password>]
[-ptlSchema <portal schema>]
[-remote_nodes <List of remote nodes (node1,node2)>]
[-retry <value>]
[-runSql]
[-silent]
[-sqlScript <path of the sql file>]
[-verbose]



OPTIONS
-all_nodes
Rollback the patch using all-nodes mode.

-connectString
This option can be used to specify the list of database instances on which the patch needs to be applied. The value for this option is specified as per the following syntax "SID:User:Passwd:Node". The SID is a must, others can be ignored, OPatch takes default values for it.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to patch just the local node, provide the node name as empty string.

-delay
If -retry is specified, this option tells OPatch how many seconds it should wait before attempting to lock inventory again in case of a previous failure.

-id
Use 'lsinventory' option to display all patch ids. Each one-off patch is indicated by its id. To rollback a patch the id for that patch must be supplied. A comma separated list of patches to be rolled back must be given. For translation patches, the patch id should be of the format <Patch ID>/<Language code> (ex: 1234/fr)

-idFile
Use 'lsinventory' option to display all patch ids. Each one-off patch is indicated by its id. To rollback a patch, the id for that patch must be supplied. The input to be given is a file location that contains a list of rollback patch ids separated by commas or white spaces. For translation patches, the patch id should be of the format <Patch ID>/<Language code>. This option cannot to be in conjunction with 'id' option.

-init
This option is used to pass parameters to the init script. This script is executed before prerequisite checks are run. The value for this option have to be enclosed in double quotes. The parameters will be common parameters which will be passed to init scripts of all patches being rolled back. This option should be ended by option 'opatch_init_end'.

-invPtrLoc
Used to locate the oraInst.loc file. Needed when the installation used the invPtrLoc flag. This should be the path to the oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-local
Roll back then update inventory of the local node. Do not propagate the patch or inventory update to other nodes.

-local_node
This option can be used to specify to OPatch the local node name to be used for RAC mode rollback of the patch.

-no_inventory
This option specifies not to update the inventory, it just updates the files in the system. If inventory is readable, then OPatch tries to read the inventory.
NOTE: -phBaseDir or -phBaseFile has to be used to specify the patch location(s).

-no_relink
Do not perform the make operations in the patch. This option can be used during multiple patch removals and perform the compilation step only once.

-no_sysmod
This option specifies not to update the files in the system. It just updates the inventory. It also will not execute the pre and post scripts.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-opatch_init_end
This option is used to mark the end of init options. Without this option everything after init till end of the command is passed into init. This option is meaningless without -init option.

-opatch_post_end
This option is used to mark the end of post options. Without this option everything after post till end of the command is passed into post. This option is meaningless without -post option.

-opatch_pre_end
This option is used to mark the end of pre options. Without this option everything after pre till end of the command is passed into pre. This option is meaningless without -pre option.

-post
This option is used to pass parameters to the post script. This script is executed after removal of the patch. The value for this option have to be enclosed in double quotes. The parameters will be common parameters which will be passed to post scripts of all patches being rolled back. This option should be ended by option 'opatch_post_end'.

-pre
This option is used to pass parameters to the pre script. This script is executed before removal of the patch. The value for this option have to be enclosed in double quotes. The parameters will be common parameters which will be passed to pre scripts of all patches being rolled back. This option should be ended by option 'opatch_pre_end'.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

-ptlConnect
This option can be used to specify the connect string of the portal schema.

-ptlPassword
This option can be used to specify the password of the portal schema.


-ptlSchema
This option can be used to specify the schema of the portal repository patch.

-remote_nodes
This option can be used to specify to OPatch the list of remote nodes to be used for RAC mode rollback of the patch. The node names are comma separated and without spaces.

-report
Just prints out the actions, without executing.

-retry
This option tells OPatch how many times should retry in case of an inventory lock failure.

-runSql
This option can be used to specify OPatch to run the sql scripts and sql procedures if they are present in the given patch.

-silent
This suppresses any user-interaction and defaults any Y|N question to Y. This option is not supported on RAC yet.

-sqlScript
This option can be used to specify the custom sql script to be run by OPatch after patching is completed.

-verbose
This option prints more OPatch output to the screen as well as to the log file.

Example:
'opatch nrollback -id 1,2,3' to roll back patches 1, 2, and 3 that have been installed in the Oracle Home.
'opatch nrollback -id 1/fr,2/de to rollback patches 1 with language 'fr', 2 with language 'de' that have been installed in the Oracle Home.
TBD
PREREQ

Run patch prerequisite checks on an ORACLE_HOME
DESCRIPTION
This operation runs the prerequisite checks on an ORACLE_HOME. This command doesn't support System Patch.

SYNTAX
opatch prereq <command> [-id <Comma separated list of patch IDs>]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC>]
[-local_node <Local node name>]
[-oh <ORACLE_HOME> ]
[-ph <Path to the single patch location>]
[-phBaseDir <Path to the dir containing all patches>]
[-phBaseFile <Path to the file containing the location of the patches to be applied>]
[-property_file <Path to property file>]
[-remote_nodes <List of remote nodes (node1,node2)>]
[-sid <Comma separated list of database SIDs>]
[-connectString <List of connect strings>]


COMMANDS
CheckActiveFilesAndExecutables
Check if there are any file(s) that are active, which are touched by the patch to be applied or rolled back.

CheckActiveServices
Check for the services that are active.
Note: Applicable for Windows platforms only.

CheckApplicable
Check for the presence of the required components in the ORACLE_HOME and check if all the actions of the given patch(es) are applicable.

CheckApplicableProduct
Check if the patch is applicable for the given Oracle Home. If the patch is marked for stand-alone homes, then it can not be applied on normal oui-based home and vice versa. Also, a patch can be marked as a hybrid patch, where it is applicable for both homes.

CheckCentralInventoryForOH
Check if the given ORACLE_HOME is registered in the central inventory specified by the oraInst.loc file.

CheckCentralInventoryForRWSession
Check if a RW (read-write) session can be created for the given central inventory.

CheckCentralInventoryLocation
Validate the Central Inventory location. Check if it has the correct directory structure and has the inventory.xml with read permissions.

CheckComponents
Check for the presence of the required components in the ORACLE_HOME.

CheckConflictAgainstOH
Check if there are any conflicts between the patch(es) to be applied and the patch(es) in the OH.

CheckConflictAgainstOHWithDetail
Check if there are any conflicts between the patch(es) to be applied and the patch(es) in the OH, by giving out the detailed information about the conflicts/supersets.

CheckConflictAmongPatches
Check if there are any conflicts among the patch(es) to be applied.

CheckConflictAmongPatchesWithDetail
Check if there are any conflicts among the patch(es) to be applied, by giving out the detailed information about the conflicts/supersets.

CheckFileVersions
Check if the copy actions of Fusion Applications patch(es) have alleast one or more file version(s) greater than the version(s) installed in the Oracle Home.

CheckFusionAppsCompatible
Check if OUI for the Oracle Home supports patching of Fusion applications.

CheckForCRSHomeIfRAC
Check if the given Central Inventory has a CRS Home registered with it, if it is a RAC setup.

CheckForIdenticalPatchInOracleHome
Check if the given list of patch(es) are identical with respect to the patch(es) installed in the Oracle Home.

CheckForInputValues
Check if the input values provided to OPatch are enough for OPatch to proceed further.

CheckForNoOpPatches
Check if any of the patch(es) provided by the user are no-op. patches. A no-op patch. cannot be applied to the Oracle Home and can be skipped. This prereq will fail for no-op. patches.

CheckIfOHLockedForPatching
Check if the ORACLE_HOME is locked for patching by any previous unsuccessful OPatch Session.

CheckInstalledOneOffs
Check if all the patches provided by the user to rollback are present in the given Oracle Home.

CheckMinimumOPatchVersion
Check if all the patches provided by the user satisfy the requirement of minimum OPatch version for the OPatch currently being used.

CheckOneOffSuperset
Check if the given input Fusion Applications patch list are all candidates for one-off (or) singleton supersets.
This prereq does not do any checks among the input patch list.

CheckOracleHome
Check if the given ORACLE_HOME is valid. Check if it has the inventory files with proper permissions.

CheckOraInstLocation
Check if the oraInst.loc file is proper and has the read permissions.

CheckOUILocation
Check the ORACLE_HOME for the presence of OUI.

CheckOUIVersionCompatible
Check if the OUI in the ORACLE_HOME is compatible for the OPatch.

CheckPatchApplicableOnCurrentPlatform Check if the given patch(es) is applicable on the current platform.

CheckPatchApplyDependents
Check if all the patch(es) required by the patch(es) currently being installed is present in the Oracle Home or not.

CheckPatchRollbackDependents
Check if there are any patch(es) in the Oracle Home that are depending on the patch(es) being currently rolled back.

CheckPatchShipHome
Check if the given patch to be applied has the proper structure and has the correct permissions for all the files.

CheckRACNodeList
Check if all the nodes in the RAC setup are valid, up and reachable.

CheckRemoteCommandInvocable
Check if commands can be invoked on the remote machines.

CheckRemoteCopyAndRemove
Check if files can be copied to and removed from the remote machines.

CheckRequiredLibs
Check if all the required OUI libraries are present in the given ORACLE_HOME.

CheckRollbackable
Check if the given patch(es) can be rolled back from the ORACLE_HOME.

CheckRollbackSid
Check if the given patch(es) can be rolled back from the ORACLE_HOME using the given SIDs.

CheckStandAloneHome
Check if the Oracle Home is a stand-alone home or a normal oui-based home.

CheckSystemCommandAvailable
Check if all the commands required for applying or rolling back the given patch are present in the system.

CheckSystemSpace
Check if enough system space is available for the patch(es) to be applied.

CheckUserAdminPrivilege
Check is the user is 'root'.
Note: OPatch should not be invoked by 'root', if so then this check fails.

CheckPatchingModel
Check if the patching model of all incoming patch(es) is compatible with that of the Oracle Home.

OPTIONS
-connectString
This option can be used to specify the list of database instances and remote nodes. The value for this option is specified as per the following syntax "SID:User:Passwd:Node". The SID is a must, others can be ignored, OPatch takes default values for it.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to specify just the local node, provide the node name as empty string. This option cannot be used along with 'sid' option.

-id
This option can be used to specify the patch IDs of all the patches that are to be rollbacked from the given OH.

-invPtrLoc
Used to locate the oraInst.loc file. Needed when the installation used the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-local_node
This option can be used to specify to OPatch the local node name to be used for RAC mode application of the patch.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-ph
This option can be used to specify the path to the patch location.
Ex: /tmp/101010

-phBaseDir
This option can be used to specify the path to base dir where all the patches to be applied are kept.
Note: The directory should contain only non-duplicate patches in zipped or unzipped format.

-phBaseFile
This option can be used to specify complete path to the file containing the location of the patches to be applied.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

-remote_nodes
This option can be used to specify to OPatch the list of remote nodes to be used for RAC mode application of the patch. The node names are comma separated and without spaces.

-sid
This option can be used to specify the SIDs of the database instances. This option can be used only for local system operations.
TBD
QUERY

Loads and prints patch information
DESCRIPTION
This operation loads and prints out various information about a patch. Parameter patch_location points to where a patch is located. For example, if you specify "path", there should be sub-dir. "etc/config" under "path".

SYNTAX
opatch query [-all] [-is_auto_patch] [-is_translatable_patch]
[-get_base_bugs]
[-get_component]
[-get_os]
[-get_date]
[-get_patch_language]
[-get_patch_type]
[-get_patching_model]
[-get_product_family]
[-has_sql]
[-is_online_patch]
[-is_rolling_patch]
[-is_system_patch]
[-jre <LOC> ]
[-oh <LOC> ]
[ <patch_location> ]


OPTIONS
-all
Get everything available about a patch. This is equivalent to setting all available options.This command doesn't support System Patch.

-is_auto_patch
This option says 'true' if the patch is auto-enabled, 'false' otherwise. This command doesn't support System Patch.

-is_system_patch
This option says 'true' if the patch is a System Patch, 'false' otherwise.

-is_translatable_patch
This option says 'true' if the patch is translatable, 'false' otherwise. This option doesn't support System Patch.

-get_base_bug
Get bugs fixed by the patch. This option doesn't support System Patch.

-get_component
Get components touched by the patch. This option doesn't support System Patch.

-get_date
Get patch creation date and time. This option doesn't support System Patch.

-get_os
Get platforms for which this patch could be applied. This option doesn't support System Patch.

-get_patch_type
Get the patch type. This command doesn't support System Patch.

-get_patching_model
Get the patching model. This option doesn't support System Patch.

-get_patch_language
Get the language supported by the patch. This option doesn't support System Patch.

-get_product_family
Get the product family to which the patch belongs. This option doesn't support System Patch.

-has_sql
This option says 'true' if the patch has sql related actions, 'false' otherwise. This option doesn't support System Patch.

-is_sql_patch
This option says 'true' if the patch is a sql patch, 'false' otherwise. This command doesn't support System Patch.

-is_online_patch
This option says 'true' if the patch is a online patch, 'false' otherwise. This option doesn't support System Patch.

-is_rolling_patch
This option says 'true' if the patch is a rolling patch, 'false' otherwise. This option doesn't support System Patch.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

PARAMETERS
The location of the patch to be queried. If the patch location is not specified, then the current directory is taken as the patch location.
TBD
ROLLBACK

Rollback a one-off patch as indicated by the reference id
DESCRIPTION
Roll back an existing patch indicated by the reference-id. This command doesn't support System Patch.

SYNTAX
opatch rollback -id <ID> [-connectString <List of connect strings>]
[-delay <value>]
[-init <parameters for the init script in escaped double quotes> [-opatch_init_end] ]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC> ]
[-local]
[-local_node <Local node name>]
[-no_inventory]
[-no_relink]
[-no_sysmod]
[-oh <ORACLE_HOME>] [-ph <Patch Location>]
[-post <parameters for the post script in escaped double quotes>[ -opatch_post_end] ]
[-pre <parameters for the pre script in escaped double quotes> [-opatch_pre_end] ]
[-property_file <path to property file>]
[-ptlConnect <portal connect string>]
[-ptlPassword <portal password>]
[-ptlSchema <portal schema>]
[-remote_nodes <List of remote nodes (node1,node2)>]
[-retry <value>]
[-runSql]
[-silent]
[-sqlScript <path of the sql file>] [-verbose]
[all_subpatches]


OPTIONS
-all_nodes
Roll back the patch using all-nodes mode.

-connectString
This option can be used to specify the list of database instances on which the patch needs to be applied. The value for this option is specified as per the following syntax "SID:User:Passwd:Node". The SID is a must, others can be ignored, OPatch takes default values for it.
Ex: oracle:dba:dba:mymachine,oracle1:::
NOTE: If the system is not part of RAC setup, then to patch just the local node, provide the node name as empty string.

-delay
If -retry is specified, this option tells OPatch how many seconds it should wait before attempting to lock inventory again in case of a previous failure.

-id
Use 'lsinventory' option to display all patch id's. Each one-off patch is indicated by its id. To roll back a patch the id for that patch must be supplied. For translation patches, Please specify <id>/<language code> (ex: 1234/fr).

-init
This option is used to pass parameters to the init script. This script is executed before prerequisite checks are run. The value for this option have to be enclosed in double quotes. This option should be ended by option 'opatch_init_end'.

-invPtrLoc
Used to locate the oraInst.loc file. Needed when the installation used the invPtrLoc flag. This should be the path to the oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-local
Roll back then update inventory of the local node.
Do not propagate the patch or inventory update to other nodes.

-local_node
This option can be used to specify to OPatch the local node name to be used for RAC mode rollback of the patch.

-no_inventory
This option specifies not to update the inventory, it just updates the files in the system. If inventory is readable, then OPatch tries to read the inventory.
NOTE: ph has to be used to specify the patch location.

-no_relink
Do not perform the make operations in the patch. This option can be used during multiple patch removals and perform the compilation step only once.

-no_sysmod
This option specifies not to update the files in the system. It just updates the inventory. It also will not execute the pre and post scripts.

-oh
The oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-opatch_init_end
This option is used to mark the end of init options. Without this option everything after init till end of the command is passed into init. This option is meaningless without -init option.

-opatch_post_end
This option is used to mark the end of post options.Without this option everything after post till end of the command is passed into post. This option is meaningless without -post option.

-opatch_pre_end
This option is used to mark the end of pre options. Without this option everything after pre till end of the command is passed into pre. This option is meaningless without -pre option.

-ph
Specify the valid patch directory area. Rollback will use the command types found in the patch directory to identify what commands are to be used for the current operating system.

-post
This option is used to pass parameters to the post script. This script is executed after removal of the patch. The value for this option have to be enclosed in double quotes. This option should be ended by option 'opatch_post_end'.

-pre
This option is used to pass parameters to the pre script. This script is executed before removal of the patch. The value for this option have to be enclosed in double quotes. This option should be ended by option 'opatch_pre_end'.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

-ptlConnect
This option can be used to specify the connect string of the portal schema.

-ptlPassword
This option can be used to specify the password of the portal schema.

-ptlSchema
This option can be used to specify the schema of the portal repository patch.

-remote_nodes
This option can be used to specify to OPatch the list of remote nodes to be used for RAC mode rollback of the patch. The node names are comma separated and without spaces

-report
Just prints out the actions, without executing.

-retry
This option tells OPatch how many times should retry in case of an inventory lock failure.

-runSql
This option can be used to specify OPatch to run the sql scripts and sql procedures if they are present in the given patch.

-silent
This suppresses any user-interaction and defaults any Y|N question to Y. This option is not supported on RAC yet.

-sqlScript
This option can be used to specify the custom sql script to be run by OPatch after patching is completed.

-verbose
This option prints more OPatch output to the screen as well as to the log file

-all_subpatches
This option is valid ONLY for composite patches. It allows the user to rollback all subpatches of a composite series in one shot.

PARAMETERS
Patch ID of the patch to be rolled back unless the command is invoked within a patch area. For translation patches, it will be <Patch ID>/<Language code>.
TBD
START DESCRIPTION
This command allows Fusion Middleware runtime entities to be started. This command operates through the Admin Server of the domain which needs to be accessible. In addition, the Node Manager is required to be configured and running on the machines which have the WebLogic Server instances installed and affected by this command.

OPatch will pose questions to query for information necessary for accessing the Fusion Middleware domain such as Admin Server URL, Admin Server User, Admin Server Password, Node Manager User and Node Manager Password.

SYNTAX
opatch start [-domain <DOMAIN_NAME> ]
[-invPtrLoc <path to oraInst.loc> ]
[-oh <Reference Oracle Home path> ]
[-report ]
-targets <List of Targets>
[-target_type <Target Type> ]
[-silent ] [-property_file <Path to custom property file> ]


OPTIONS
-domain
The name of the Fusion Middleware domain for which the specified targets will be started.

-invptrloc
Used to locate the oraInst.loc file. Needed when the installation uses the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-oh
The Oracle Home to work on. This takes precedence over the environment variable ORACLE_HOME.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch For FMW components, 'AdminConfigFile', 'AdminKeyFile', 'NodeManagerConfigFile' and 'NodeManagerKeyFile' location can be specified as keys with corresponding files as values. They refer to encrypted, decrypted files for Admin user, Admin password, Node Manager user and Node Manager password. Similarly, Admin Server URL (key as AdminServerURL), Domain Home (key as DomainHome) and Applications Directory (key as ApplicationsDir) can be given as keys with corresponding values. The Key, value pair is of the format 'x=y' where 'x' is OPatch understood key and each pair is separated by newline in the property file.

For encryption files, Please check 'storeUserConfig' WLST command for details.

-report
Just prints out the actions without execution.

-targets
The list of targets to be started.

-target_type
The type of target to be started. Only supported target type is 'fmwServer'. This option is *deprecated*.

-silent
Invoke the operation in silent mode. Path to custom property file may be provided which will have required inputs as name-value pairs. If required inputs are not found, OPatch will exit with error message quoting the missing inputs.

PARAMETERS
The required parameter is targets
TBD
STOP DESCRIPTION
This command allows Fusion Middleware runtime entities to be stopped. This command operates through the Admin Server of the domain which needs to be accessible. In addition, the Node Manager is required to be configured and running on the machines which have the WebLogic Server instances installed and affected by this command.

OPatch will pose questions to query for information necessary for accessing the Fusion Middleware domain such as Admin Server URL, Admin Server User, Admin Server Password, Node Manager User and Node Manager Password.

SYNTAX
opatch stop [-domain <DOMAIN_NAME> ]
[-invPtrLoc <Path to oraInst.loc file> ]
[-oh <Reference Oracle Home path> ]
[-report ]
-targets <List of Targets>
[-target_type <Target Type> ]
[-silent ] [-property_file <Path to custom property file> ]


OPTIONS
-domain
The name of the Fusion Middleware domain for which the specified targets will be stopped.

-invptrloc
Used to locate the oraInst.loc file. Needed when the installation uses the -invPtrLoc flag. This should be the path to the oraInst.loc file.

-oh
The Oracle Home to work on. This takes precedence over the environment variable ORACLE_HOME.

-property_file
The user defined property file for OPatch to use. The path to the property file should be absolute. This property file takes precedence over the one that is supplied with OPatch.

For FMW components, 'AdminConfigFile', 'AdminKeyFile', 'NodeManagerConfigFile' and 'NodeManagerKeyFile' location can be specified as keys with corresponding files as values. They refer to encrypted, decrypted files for Admin user, Admin password, Node Manager user and Node Manager password. Similarly, Admin Server URL (key as AdminServerURL), Domain Home (key as DomainHome) and Applications Directory (key as ApplicationsDir) can be given as keys with corresponding values.

The Key, value pair is of the format 'x=y' where 'x' is OPatch understood key and each pair is separated by newline in
the property file.

For encryption files, Please check 'storeUserConfig' WLST command for details.

-report
Just prints out the actions without execution.

-targets
The list of targets to be stopped.

-target_type
The type of target to be stopped. Only supported target type is 'fmwServer'. This option is *deprecated*.

-silent
Invoke the operation in silent mode. Path to custom property file may be provided which will have required inputs as name-value pairs. If required inputs are not found, OPatch will exit with error message quoting the missing inputs.

PARAMETERS
The required parameter is targets
TBD
UTIL

Invokes a utility on an ORACLE_HOME
DESCRIPTION
This operation invokes the chosen utilities on an ORACLE_HOME.
This command doesn't support System Patch.

SYNTAX
opatch util [ -help ] [ COMMAND ]

Use opatch util [ COMMAND ] -help to get help on a particular command.

COMMANDS
ApplySql
Apply sql, sql procedure related actions for patches, which are already applied using Apply or NApply operation.

CheckMinimumOpatchVersion
Check if patch is compatible with the given user input version.

CheckComponents
Check if the given patch is suitable for the Oracle Homes registered in the central inventory by components check.

Cleanup
Remove the backup for restore area of the given patch or for all the patches.

CopyListedDirs
Recursively copy all directories listed in ORACLE_HOME/.patch_storage/<ID>/rac/copy_dirs.txt to remote nodes.

CopyListedDirsTest
Recursively copy a single directory to remote nodes.

CopyListedFiles
Copy all files listed in ORACLE_HOME/.patch_storage/<ID>/rac/copy_files.txt to remote nodes.

CopyListedFilesTest
Copy a single file to remote nodes.

DisableOnlinePatch
Disable and remove the specified online patch(es) on the given database instances.

EnableOnlinePatch
Install and enable the specified online patch(es) on the given database instances.

GetPatchLevel
Return the patching level on Local Grid Home.

InstallOCM
Install and configure OCM.

IsShared
Returns true if running on shared environment, else it returns false.

LoadXML
Prompt for path/name of the XML file, then check if the XML is correct.

RemoveListedDirs
Recursively remote directories listed in ORACLE_HOME/.patch_storage/<ID>/rac/remove_dirs.txt on remote nodes.

RemoveListedDirsTest
Recursively remove a directory on remote nodes.

RemoveListedFiles
Remove files listed in ORACLE_HOME/.patch_storage/<ID>/rac/remove_files.txt on remote nodes.

RemoveListedFilesTest
Remove a single file on remote nodes.

RestoreOH
Restore the OracleHome to the previous state.

RollbackSql
Rollback sql, sql procedure related actions for patches, which are already rolled back using Rollback or NRollback operation.

RunAnyCommand
Run any command on remote nodes.

RunLocalMake
Invoke re-link on the local node. Commands are stored in ORACLE_HOME/.patch_storage/<ID>/make.txt.

RunRemoteMake
Invoke re-link on remote nodes. Commands are stored in ORACLE_HOME/.patch_storage/<ID>/rac/make_cmds.txt.

SaveConfigurationSnapshot
Save configuration snapshot of current GI home to specified file. ORACLE_HOME shall point to GI home. Default snapshot file is ORACLE_HOME/cfgtoollogs/opatch/sysconfig/configData.txt.

UpdateRemoteNodes
Propagate/Remove files/directories to/on remote nodes using files under ORACLE_HOME/.patch_storage/<ID>/rac/*.

UpdateOPatchVersion
Update the version of OPatch in the inventory of Oracle Home.

Verify
Using the defined ORACLE_HOME and given patch location via -ph, the program will check to make sure the patch was applied to the ORACLE_HOME.

Example: 'opatch util verify -ph /tmp/patchLoc'
c:\> set oracle_home=c:\oracle\product\12.1.0\db_1

c:\> cd c:\oracle\product\12.1.0\db_1\OPatch\opatch util verify -ph /stage/patch
VERSION

Oracle Patch Utility: Version
DESCRIPTION
Print the version of OPatch for a particular $ORACLE_HOME or display all OPatch version in the Central Inventory.

SYNTAX
opatch version [-all]
[-invPtrLoc <Path to oraInst.loc>]
[-jre <LOC>] [-oh <ORACLE_HOME>]
[-v2c <5-digit version> -oui_loc <Custom OUI Location> -ph <Patch Location> -ohs <list of Oracle Homes separated by commas]
[-help] [-h]


OPTIONS
-all
This option displays versions of OPatch(es) of all Oracle Homes registered in the Central Inventory.

-invPtrLoc
Used to locate the oraInst.loc file. When the installation used the invPtrLoc flag. This should be the path to the oraInst.loc file.

-jre
This option tells OPatch to use JRE (java) from the specified location instead of the default location under Oracle Home.

-oh
The Oracle home to work on. This takes precedence over the environment variable ORACLE_HOME.

-v2c
The standard 5-digit version to compare. If this option is specified with an valid version which made by no more than 5 numbers separated by '.', those oracle homes with valid version will be break up to two parts, one is those oracle homes which have opatch version higher or equal to the value of this option, and the other is those with lower version.

-ph
The patch location from where the Minimum OPatch Version (if defined) will be picked. If a valid patch location is provided, will take the required minimum opatch version from the patch and set it as the standard opatch version to be compared to.

-ohs
List of Oracle Homes to be considered. Please provide them separated by commas.

-help (or) -h
Display valid options can be attached to this opereation.

PARAMETERS
This operation does not have any required parameters.
c:\> set oracle_home=c:\oracle\product\12.1.0\db_1

c:\> cd c:\oracle\product\12.1.0\db_1\OPatch\opatch version
Patching OPATCH From time-to-time it may be necessary to patch the OPatch utility in order to apply the most recent patches. When you need to visit Oracle Support and look for patch 6880880. This patch page will let you select your version and operating system and download the most recent OPatch for your version.

Copy the a staging directory, unzip it to read the readme file and then follow the readme file's directions which will likely be to copy the .zip file to $ORACLE_HOME and unzip it there after first making a backup copy of the files currently in the $ORACLE_HOME/OPatch directory.
 
ORASTACK
Windows Modify Reserved Stack Size orastack <executable> <stack_size>
orastack
-- read the comments from the above command

orastack oracle.exe 500000
orastack tnslsnr.exe 500000
 
TRCASST
Format listener trace files trcasst <switch> <tracefile_name>

Syntax:
Switch Description
-e Displays error information. Valid options to use with –e include: Valid options listed below.

Switch Description Default
0 Translate NS error numbers Yes
1 Display only error translation  
2 Display error numbers without translation  
-l Displays services and TTC information. Valid options listed below.

Switch Description Default
-a Displays data for all connections in trace file  
-i Displays the trace data for a particular ID from the –la option.  
-s Displays a summary of statistics. This includes total bytes sent and received, maximum open cursors, total calls, parse counts, and more.  
-o Displays services and TTC (Two Task Common) information. Valid options listed below.

Switch Description Default
-c Summary of connection information  
-d Detailed connection information Yes
-q SQL commands (used in combination with "u")  
-t Detailed TTC information Yes
-u Summary of TTC information  
-s Statistics Default
C:\Documents and settings\oracle>set trc_level ADMIN

-- connect to the database and perform some actions via SQL*Net

C:\Documents and settings\oracle>set trc_level OFF

C:\Documents and settings\oracle> trcasst c:\oracle\diag\tnslsnr\perrito4\listener\trace\ora_7520_10328.trc
 
TRCSESS
Trace file consolidation. Merges multiple trace files into a single file for running through TKPROF The code for this utility is in $ORACLE_HOME/bin.

trcsess [output=output_file_name]
        [session=session_id]
        [clientid=client_id]
        [service=service_name]
        [action=action_name]
        [module=module_name]
        [trace_files]
C:\Users\oracle>trcsess
oracle.ss.tools.trcsess.SessTrcException: SessTrc-00002: Session Trace Usage error: Wrong parameters passed.
trcsess [output=<output file name >] [session=<session ID>] [clientid=<clientid>]
[service=<service name>] [action=<action name>] [module=<module name>] <trace file names>

output=<output file name> output destination default being standard output.
session=<session Id> session to be traced.
Session id is a combination of session Index & session serial number e.g. 8.13.
clientid=<clientid> clientid to be traced.
service=<service name> service to be traced.
action=<action name> action to be traced.
module=<module name> module to be traced.
<trace_file_names> Space separated list of trace files with wild card '*' supported.
conn uwclass/uwclass@pdbdev

SQL> SELECT sid, serial#
2 FROM v$session
3 WHERE sid IN (SELECT sid FROM v$mystat WHERE rownum = 1);

       SID    SERIAL#
---------- ----------
       147       8613

-- create two trace files ... first a 10053
ALTER SESSION SET tracefile_identifier = 'test_trace1';
ALTER SESSION SET EVENTS '10053 trace name context forever, level 1';
select count(*) from airplanes where delivered_date > sysdate+1000;
select count(*) from airplanes where delivered_date <= sysdate+1000;
ALTER SESSION SET EVENTS '10053 trace name context OFF';

-- then a 10046
ALTER SESSION SET tracefile_identifier = 'test_trace2';
ALTER SESSION SET EVENTS '10046 trace name context forever, level 12';
select count(*) from airplanes where delivered_date > sysdate+1000;
select count(*) from airplanes where delivered_date <= sysdate+1000;
ALTER SESSION SET EVENTS '10046 trace name context OFF';

-- finally use trcsess to merge them for TKPROF analysis
trcsess output=c:\tmp\mytrace.trc session=147.8613 c:\oracle\diag\rdbms\orabase\orabase\trace\*test_trace*.trc
 
WRAP
Wrap a PL/SQL object

See also DBMS_UTILITY
wrap iname=input_file oname=output_file
SELECT ascii('D') FROM dual;
SELECT ascii(' ') FROM dual;

-- create as a text file c:\temp\unwrapped.sql
CREATE OR REPLACE FUNCTION unwrapped (namein IN VARCHAR2) RETURN NUMBER AUTHID DEFINER IS
 c  PLS_INTEGER := 0;
 j  PLS_INTEGER;
 l  PLS_INTEGER;
BEGIN
  l := LENGTH(namein);

  FOR i IN 1.. l LOOP
    c := c + ASCII(SUBSTR(namein, i, 1));
  END LOOP;
  RETURN c;
END unwrapped;
/

-- create as a text file c:\temp\wrapped.sql
CREATE OR REPLACE FUNCTION wrapped (namein IN VARCHAR2) RETURN NUMBER AUTHID DEFINER IS
 c  PLS_INTEGER := 0;
 j  PLS_INTEGER;
 l  PLS_INTEGER;
BEGIN
  l := LENGTH(namein);

  FOR i IN 1.. l LOOP
    c := c + ASCII(SUBSTR(namein, i, 1));
  END LOOP;
  RETURN c;
END wrapped;
/

wrap iname=c:\temp\wrapped.sql oname=c:\temp\output.sql

SQL> @c:\temp\unwrapped.sql
SQL> @c:\temp\output.sql

set pagesize 0

SELECT text
FROM user_source
WHERE name = 'UNWRAPPED'
ORDER BY line;

SELECT text
FROM user_source
WHERE name = 'WRAPPED'
ORDER BY line;
 
XSL
Undocumented Usage: xsl [switches] <stylesheet> <instance>
or xsl -f [switches] [document filespec]
Switches:
-B <BaseUri>     Set the Base uri for XSLT processor.
                   BaseUri of http://pqr/xsl.txt resolves pqr.txt to http://pqr/pqr.txt
-e <encoding>    Specify default input file encoding (-ee to force)
-E <encoding>    Specify output/data/presentation encoding
-f               File - Interpret <document> as filespec, not URI
-G <xptr exprs>  evaluates XPointer scheme examples give in a file
-h               Help - show this usage help (-hh for more options)
-i <n>           Number of times to iterate the XSLT processing
-l <language>    Language for error reporting
-o <XSLoutfile>  Specify output file of XSLT processor
-v               Version - show parser version and exit
-V <var> <value> To test top level variables in CXSLT
-w               Whitespace - preserve ALL whitespace
-W               Warning - stop parsing after a warning
TBD

Related Topics
DBMS_DDL
DBMS_DB_VERIFY
DBMS_QOPATCH
DBMS_UTILITY
Functions
Procedures

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2014 Daniel A. Morgan All Rights Reserved