\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Keith Moore (keithwmoore)} \pdfinfo{ /Title (oracle-rac-12c.pdf) /Creator (Cheatography) /Author (Keith Moore (keithwmoore)) /Subject (Oracle RAC 12c Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{FA1F0F} \definecolor{LightBackground}{HTML}{FEF1F0} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Oracle RAC 12c Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Keith Moore (keithwmoore)} via \textcolor{DarkBackground}{\uline{cheatography.com/55548/cs/14761/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Keith Moore (keithwmoore) \\ \uline{cheatography.com/keithwmoore} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 13th March, 2018.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{1.44 cm} x{6.56 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Utilities}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Name}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} crsctl & Cluster control \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} srvctl & Server control \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} oifcfg & Network interface configuration tool \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{ocrconfig} & Administer cluster registry (OCR) and local registry (OLR) \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{ocrcheck} & Display health of Cluster or Local registry \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{ocrdump} & Dump contents of the Cluster or Local registry \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} cluvfy & Cluster verification utility \tn % Row Count 13 (+ 1) % Row 8 \SetRowColor{LightBackground} \seqsplit{olsnodes} & Print information about cluster nodes \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Startup Sequence}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Add desciption here% Row Count 1 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.52 cm} x{4.48 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Log files}} \tn % Row 0 \SetRowColor{LightBackground} Log file & Location?? \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.964 cm} x{3.876 cm} p{0.76 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Oracle Support Notes}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{MOS NOte}} & {\bf{Decscription}} & \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} 1268927.1 & RACCheck Audit Tool & \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{{\bf{Oracle Maximum Availability Architecutre}} \newline http://www.oracle.com/technetwork/database/availability/maa-reference-architectures-2244929.pdf} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.292 cm} x{5.548 cm} p{0.76 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Acronyms / Terminology}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Term}} & {\bf{Description}} & \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} GCS & Global Cache Services - Manages data block sharing between RAC instances & \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} GES & Global Enqueue Services manages enqueue resources such as locks & \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} GDS & Global Directory Service & \tn % Row Count 9 (+ 1) % Row 4 \SetRowColor{LightBackground} DRM & Dynamic Resource Mastering & \tn % Row Count 10 (+ 1) % Row 5 \SetRowColor{white} TAF & Transparent Application Failover & \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} ONS & Oracle Notification Services & \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} FAN & Fast Application Notification & \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} FCF & Fast Connection Failover & \tn % Row Count 15 (+ 1) % Row 9 \SetRowColor{white} AC & Application Continuity & \tn % Row Count 16 (+ 1) % Row 10 \SetRowColor{LightBackground} SCAN & Single Client Access Name & \tn % Row Count 17 (+ 1) % Row 11 \SetRowColor{white} CRS & Cluster Ready Services & \tn % Row Count 18 (+ 1) % Row 12 \SetRowColor{LightBackground} HAS & High Availability Services & \tn % Row Count 19 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Transparent Application Failover (TAF)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{When an instance fails, connections are restored to a surviving instance. TAF is configured in the client side connect string. \newline % Row Count 3 (+ 3) With a FAILOVER\_MODE of "session", a new connection is made to a surviving node but no other action is taken. \newline % Row Count 6 (+ 3) With a FAILOVER\_MODE of "select", the query is executed again with the existing open cursor. \newline % Row Count 8 (+ 2) In both cases, DML statements are rolled back. It is the responsibility of the application to detect and replay DML operations.% Row Count 11 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Fast Connect Notification / Failover (FAN and FCF)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{A framework that published up/down events back to the client application when a cluster reconfiguration occurs. This allows the client to quickly reestablish connections to a surviving node. \newline % Row Count 4 (+ 4) {\bf{Need to add to this}}.% Row Count 5 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Things to research and add}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Application Continuity \newline % Row Count 1 (+ 1) RAC One Node - Active/Passive clustered database. Runs on one node but will fail over or can be relocated to another node. \newline % Row Count 4 (+ 3) Load Balancing - Can be done on the client side with the LOAD\_BALANCE entry in the tnsnames.ora. It queries pmon to determine which instance to connect to. That is the old way. With 11gR2 this is best done with the scan listener. \newline % Row Count 9 (+ 5) SCAN listener - The remote\_listener parameter is set to the SCAN listener name:port \newline % Row Count 11 (+ 2) FLEX Cluster - For large clusters to reduce the number of interconnects. Has hub nodes and leaf nodes% Row Count 14 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.92 cm} x{4.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Wait events}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{RAC Wait Events}} & {\bf{Description}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} GC~Current~Block 2-Way/3-Way & This is a very long description to see\{\{nl\}\} how columns are resized of if they stay\{\{nl\}\}the same. I'm hoping column 1 will become\{\{nl\}\} smaller and this column will be wider \tn % Row Count 10 (+ 9) % Row 2 \SetRowColor{LightBackground} GC CR Block 2-Way / 3-Way & yyy \tn % Row Count 12 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{GC Current Grant 2-Way} \tn % Row Count 13 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{GC CR Grant 2-Way} \tn % Row Count 14 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{GC Current Block Busy} \tn % Row Count 15 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{GC CR Block Busy} \tn % Row Count 16 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{GC Current Block Congested} \tn % Row Count 17 (+ 1) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{GC CR Block Congested} \tn % Row Count 18 (+ 1) % Row 9 \SetRowColor{white} GC CR Request & Placeholder event \tn % Row Count 19 (+ 1) % Row 10 \SetRowColor{LightBackground} GC Current Request & Placeholder event \tn % Row Count 20 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{GC Lost block} \tn % Row Count 21 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{GCS Log Flush Sync} \tn % Row Count 22 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Put difference between 2 way and 3 way waits here \newline Can some be combined like in book \newline \newline Maybe current and CR waits can be put in two separate columns???} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{4.96 cm} p{3.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Dynamic Views}} \tn % Row 0 \SetRowColor{LightBackground} V\$xxx & xxx \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} V\$yyy & yyy \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.672 cm} x{5.168 cm} p{0.76 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Background Processes}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Process}} & {\bf{Description}} & \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} LCK(n) & Lock process n (LCK0, LCK1, etc) & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} LMD(n) & Global enqueue service daemon (Lock Manager) n \{\{nl\}\}Manages lock requests from other instances & \tn % Row Count 8 (+ 4) % Row 3 \SetRowColor{white} LMHB & Lock manager heartbeat monitor & \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} LMON & Global engueue service monitor & \tn % Row Count 12 (+ 2) % Row 5 \SetRowColor{white} LMS(n) & Global cache service n & \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{Processes can be queried by \newline `Select NAME, DESCRIPTION from v\$bgprocess where PADDR != '00';`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.292 cm} x{2.28 cm} x{4.028 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Clusterware Files}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{File Type}} & {\bf{Description}} & {\bf{Location}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} OCR & Oracle Cluster Registry & Location defined in /etc/oracle/ocr.loc and is stored on cluster file system \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} OLR & Oracle Local Registry & /etc/oracle/olr.loc. Default location is \$GRID\_HOME/cdata/\textless{}hostname\textgreater{}.olr \tn % Row Count 11 (+ 4) % Row 3 \SetRowColor{white} VD & Voting Disk & "crsctl query css votedisk" returns the disk containing the voting disk. The kfed command can be used to read the location of the voting disk file from the disk header \tn % Row Count 19 (+ 8) % Row 4 \SetRowColor{LightBackground} GPnP & Grid Plug and Play & Default location is \$GRID\_HOME/gpnp/\textless{}hostname\textgreater{}/profiles/peer/profile.xml \tn % Row Count 23 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Clusterware Architecture}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Oracle Clusterware is split into two stacks- High Availability Services (HAS) and Cluster Ready Services (CRS). Startup is done using the "crsctl start crs" command executed as the root user or automatically after a reboot. The startup process is initiated from the /etc/inittab file (Linux).. \newline % Row Count 6 (+ 6) The High Availability Services are the lower level stack (starts first). It uses the OLR and the GPnP profile since ASM and the OCR is not yet available. To find the voting disk, it gets the location from the ASM disk header for the disk group containing the VD. This does not require the ASM disk group to be mounted. \newline % Row Count 13 (+ 7) The Cluster Ready Services is the higher level stack, started by the HAS.% Row Count 15 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Clusterware Troubleshooting}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Run "crsctl check cluster" to get error messages} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}