Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ System-level alias vs Oracle ADR functionality     - How to install Go1.5 source development environment on Mac (Server)

- Boot-Repair Tool - repair of frequent start-up problems (Linux)

- Video editing captions under Linux (Linux)

- Let Linux boot methods to enter characters interface and set FrameBuffer resolution methods (Linux)

- [Android] Eclipse does not update the Android SDK Manager solution [using GoAgent] (Programming)

- Package the Python script file into an executable file (Programming)

- Linux System Getting Started Tutorial: Installing Git on Linux (Linux)

- Ubuntu user use PPA to install Uget 2.0.5 (Linux)

- Struts2 form of non-use component tags (Programming)

- Linux system ARP attack solution (Linux)

- MySQL Server Time Synchronization Problem (Database)

- Construction CA certificate using OpenSSL command line (Server)

- The most common and most effective security settings under linux (Linux)

- Oracle can not change the tablespace to backup mode in non-archive mode (Database)

- Python script running in the background (Programming)

- exp / imp Export Import version of the problem and the ORA-6550 error (Database)

- How to Install Cantata MPD 1.3.3 for Ubuntu and Derived Version Users (Linux)

- A well-known but rarely used skills: object pool (Programming)

- Drawing from the Android source code analysis View (Programming)

- How to Upgrade Ubuntu GNOME 14.10 to GNOME 3.16 Desktop (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 11.2.0.1.0 - 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:
        CREATE REPORT
        ECHO
        EXIT
        HELP
        HOST
        IPS
        PURGE
        RUN
        SET BASE
        SET BROWSER
        SET CONTROL
        SET ECHO
        SET EDITOR
        SET HOMES | HOME | HOMEPATH
        SET TERMOUT
        SHOW ALERT
        SHOW BASE
        SHOW CONTROL
        SHOW HM_RUN
        SHOW HOMES | HOME | HOMEPATH
        SHOW INCDIR
        SHOW INCIDENT
        SHOW PROBLEM
        SHOW REPORT
        SHOW TRACEFILE
        SPOOL
  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';
 Exit;
 END`

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

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
 /u01/app/ora11g/product/11.2.0/dbhome_1/dbs

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
 ALTER DATABASE CLOSE NORMAL
 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.
     
         
         
         
  More:      
 
- Protect against network attacks using Linux system firewall (Linux)
- Ubuntu system process is bound CPU core (Linux)
- findmnt- Looking mounted file system (Linux)
- Oracle TAF Analysis (Database)
- Defensive programming in PHP (Programming)
- Simple to use Linux GPG (Linux)
- Fedora 22 users to install the VLC media player (Linux)
- Ubuntu dual-card system configuration method (Server)
- How to upgrade the kernel to 3.13.7 on Ubuntu / Linux Mint (Linux)
- Struts2 study notes -Valuestack (value stack) and OGNL expression (Programming)
- Servlet 3.0 interfaces of AsyncListener (Programming)
- How to determine whether the Linux server was hacked (Linux)
- Bootable ISO image using GRUB (Linux)
- Zabbix using Omsa monitor hardware information of Dell server (Server)
- Acquaintance C ++: the most simple C ++ program (Programming)
- MogileFS system installation configuration example (Server)
- Android main thread message system (Handler Looper) (Linux)
- HBase cluster installation and deployment (Server)
- Oracle Enterprise Linux 64-bit install apache-tomcat-7.0.53 step (Server)
- How to build Memcached Docker container (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.