Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ System-level alias vs Oracle ADR functionality     - dd command: do hard disk IO performance test (Linux)

- Linux vi command list (Linux)

- Clojure programming languages: take full advantage of the Clojure plug-in Eclipse (Programming)

- Android recyclerview cardview (Programming)

- C ++ based foundation: the difference between C and C ++ (Programming)

- Disk partition MBR (Linux)

- Linux System Administrator Network Security Experience (Linux)

- Ubuntu 14.04 to install Blender 2.71 (Linux)

- OpenSSL to generate public and private key (Linux)

- KVM usb passthrough configuration (Linux)

- Linux environment has been running Tomcat how to deploy the new Tomcat (Server)

- Talk about the Linux ABI compatibility Application (Linux)

- Oracle 11R2 Grid Infrastructure execute root.sh script rootcrs.pl execution failed treatment (Database)

- To install the Git and Github under Ubuntu (Linux)

- Video editing captions under Linux (Linux)

- Haproxy multi-domain certificate HTTPS (Server)

- Ubuntu system cp: omitting directory problem (Linux)

- socket busy poll of Linux kernel 3.11 to avoid sleep switch (Linux)

- Enterprise Hadoop cluster architecture - NFS installation (Server)

- Ubuntu install virtual machine software VirtualBox 4.3.10 (Linux)

  System-level alias vs Oracle ADR functionality
  Add Date : 2017-08-31      
  Oracle 11g introduced in the new features ADR, Automatic Diagnostic Repository
Personal understanding of this tool is able to efficiently manage some of the log files easily. For example, look at the database alert logs do not have trouble to go to the corresponding path down to find a circle, you can directly use the show alert, such as what is now in the database to see the error directly through the show problem command can be.
 Command is also very convenient to use. Direct input adrci to open a special window to use. If you do not know which command to use, you can directly use help.
$ Adrci
 ADRCI: Release - Production on Wed May 13 22:10:14 2015
 Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rights reserved.
 ADR base = "/ u02 / dg11g"
 Adrci> help
  HELP [topic]
    Available Topics:
        SET BASE
        SET ECHO
        SET EDITOR
        SHOW ALERT
        SHOW BASE
        SHOW HM_RUN
  There are other commands intended to be used directly by Oracle, type
  "HELP EXTENDED" to see the list
But in use, I found that in fact can also have a more concise way.
 In the past few days to build data guard environment, always need to constantly switch between multiple paths, if you use adrci when you must first enable the adrci command interface, and then use the specified command to view, the feeling is not enough autonomy and convenience . We can play this way.
 First of all, need to use a script. This script can display the corresponding diagnostic path.
 In order to obtain 10g after the compatibility, use the background_dump_dest this parameter can also be fully correspond to the corresponding diagnostic path.
 Suppose the script is named cdt.sh

 TAB_OWNER = `sqlplus -silent / as sysdba < < END
 Set pagesize 0 feedback off verify off heading on echo off
 Col owner_name format a20
 Col table_name format a30
 Select value from v \\ $ parameter where name = 'background_dump_dest';

 If [-z "$ TAB_OWNER"]; then
  Echo "no object exists, please check again"
  Exit 0
    Echo $ TAB_OWNER

We first realize the similar function show alert.
 We can define an alias at the system level
Alias cdt = 'cd `ksh ~ / cdt.sh`

 $ Pwd
 / Home / ora11g
 $ Cdt
 $ Pwd
 / U02 / dg11g / diag / rdbms / dg11g / DG11G / trace

This time can see the relevant trace log, alert log
 Again a few used aliases,
 Such as the need to parameter file path. We can define aliases like this.
Alias cdp = 'cd $ ORACLE_HOME / dbs'

 $ Pwd
 / Home / ora11g
 $ Cdp
 $ Pwd

For example, look at the database errors, can be so defined, we can be more flexible to specify the error log before and after a few lines of content.
Alias showerr = 'grep -A3 -B3 ORA- `ksh ~ / cdt.sh` / alert * | tail -50'

The display is as follows, this is not also show very clear.
[Ora11g @ oel1 ~] $ showerr
 License high water mark = 2
 All dispatchers and shared servers shutdown
 ORA-1507 signalled during: ALTER DATABASE CLOSE NORMAL ...
 ARCH: Archival disabled due to shutdown: 1089
 Shutting down archive processes
 Archiving is disabled
 Space available in the underlying filesystem or ASM diskgroup.
 Error 1034 received logging on to standby
 Errors in file /u02/ora11g/diag/rdbms/test11g/TEST11G/trace/TEST11G_arc1_31285.trc:
 ORA-01034: ORACLE not available
 PING [ARC1]: Heartbeat failed to connect to standby 'DG11G'. Error is 1034.
 Wed May 13 15:06:01 2015
 Starting background process CJQ0
So to sum up, in fact, we can also try a lot of features themselves, chances are also more convenient for our work, no matter how easy to use and fast is our goal.
- 20+ Best Practices article MySQL Performance Optimization (Database)
- On the Web application attack techniques Common (Linux)
- MySQL Server Time Synchronization Problem (Database)
- Install multiple Linux distributions and Fedora 21 first experience on the same hard disk (Linux)
- To compile and install OpenCV-2.3.1 FFmpeg-2.1.2 under CentOS (Linux)
- To compiler and install MariaDB-10.0.20 under CentOS 6.6 (Database)
- About AWR More Description (Database)
- How SSHfs mount a remote file system on Linux (Linux)
- Linux device driver development small example --LED lights (Programming)
- See Shell Script Linux Server network traffic (Server)
- How to install Unbound and DNSCrypt in Archlinux (Server)
- Under CentOS Linux automatic backup MySQL database daily (Database)
- Graphics of Java Tools (Programming)
- MySQL primary and secondary replicate data inconsistencies (Database)
- Linux iostat command example explanation (Linux)
- Java NIO The Glob mode Detailed (Programming)
- Linux Study of --CentOS create local yum repository (Linux)
- Java, extends and implements Usage (Programming)
- Oracle Database High-Risk Vulnerability Warning (Database)
- Linux compression and decompression command (Linux)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.