\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{huda127} \pdfinfo{ /Title (sql-server-chairul-huda-5212100127.pdf) /Creator (Cheatography) /Author (huda127) /Subject (SQL Server - Chairul Huda 5212100127 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}{9C160C} \definecolor{LightBackground}{HTML}{FBF7F7} \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{SQL Server - Chairul Huda 5212100127 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{huda127} via \textcolor{DarkBackground}{\uline{cheatography.com/20654/cs/3388/}}} \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}huda127 \\ \uline{cheatography.com/huda127} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 25th February, 2015.\\ Updated 13th May, 2016.\\ 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*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Server Level Options}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\emph{option/min/max/def}}% Row Count 1 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.96319 cm} x{0.8354 cm} x{0.8354 cm} p{0.54301 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Configuration Option Table}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Option}} & {\bf{Minimum Value}} & {\bf{Maximum Value}} & {\bf{Default}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} access check cache bucket count (A) & 0 & 16384 & 0 \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} access check cache quota (A) & 0 & \seqsplit{2147483647} & 0 \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} ad hoc distributed queries (A) & 0 & 1 & 0 \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} affinity I/O mask (A, RR) & \seqsplit{-2147483648} & \seqsplit{2147483647} & 0 \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} affinity64 I/O mask (A, only available on 64-bit version of SQL Server) & \seqsplit{-2147483648} & \seqsplit{2147483647} & 0 \tn % Row Count 15 (+ 4) % Row 6 \SetRowColor{LightBackground} affinity mask (A) & \seqsplit{-2147483648} & \seqsplit{2147483647} & 0 \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} affinity64 mask (A, RR), only available on 64-bit version of SQL Server & \seqsplit{-2147483648} & \seqsplit{2147483647} & 0 \tn % Row Count 21 (+ 4) % Row 8 \SetRowColor{LightBackground} Agent XPs (A) & 0 & 1 & 0 \tn % Row Count 22 (+ 1) % Row 9 \SetRowColor{white} allow updates (Obsolete. Do not use. Will cause an error during reconfigure.) & 0 & 1 & 0 \tn % Row Count 27 (+ 5) % Row 10 \SetRowColor{LightBackground} backup compression default & 0 & 1 & 0 \tn % Row Count 29 (+ 2) % Row 11 \SetRowColor{white} blocked process threshold (A) & 0 & 86400 & 0 \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.96319 cm} x{0.8354 cm} x{0.8354 cm} p{0.54301 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Configuration Option Table (cont)}} \tn % Row 12 \SetRowColor{LightBackground} c2 audit mode (A, RR) & 0 & 1 & 0 \tn % Row Count 2 (+ 2) % Row 13 \SetRowColor{white} clr enabled & 0 & 1 & 0 \tn % Row Count 3 (+ 1) % Row 14 \SetRowColor{LightBackground} common criteria compliance enabled (A, RR) & 0 & 1 & 0 \tn % Row Count 6 (+ 3) % Row 15 \SetRowColor{white} contained database authentication & 0 & & 0 \tn % Row Count 8 (+ 2) % Row 16 \SetRowColor{LightBackground} cost threshold for parallelism (A) & 0 & 32767 & 5 \tn % Row Count 10 (+ 2) % Row 17 \SetRowColor{white} cross db ownership chaining & 0 & 1 & 0 \tn % Row Count 12 (+ 2) % Row 18 \SetRowColor{LightBackground} cursor threshold (A) & -1 & \seqsplit{2147483647} & -1 \tn % Row Count 14 (+ 2) % Row 19 \SetRowColor{white} Database Mail XPs (A) & 0 & 1 & 0 \tn % Row Count 16 (+ 2) % Row 20 \SetRowColor{LightBackground} default full-text language (A) & 0 & \seqsplit{2147483647} & 1033 \tn % Row Count 18 (+ 2) % Row 21 \SetRowColor{white} default language & 0 & 9999 & 0 \tn % Row Count 19 (+ 1) % Row 22 \SetRowColor{LightBackground} default trace enabled (A) & 0 & 1 & 1 \tn % Row Count 21 (+ 2) % Row 23 \SetRowColor{white} disallow results from triggers (A) & 0 & 1 & 0 \tn % Row Count 23 (+ 2) % Row 24 \SetRowColor{LightBackground} EKM provider enabled & 0 & 1 & 0 \tn % Row Count 25 (+ 2) % Row 25 \SetRowColor{white} \seqsplit{filestream\_access\_level} & 0 & 2 & 0 \tn % Row Count 27 (+ 2) % Row 26 \SetRowColor{LightBackground} fill factor (A, RR) & 0 & 100 & 0 \tn % Row Count 29 (+ 2) % Row 27 \SetRowColor{white} ft crawl bandwidth (max), see ft crawl bandwidth(A) & 0 & 32767 & 100 \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.96319 cm} x{0.8354 cm} x{0.8354 cm} p{0.54301 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Configuration Option Table (cont)}} \tn % Row 28 \SetRowColor{LightBackground} ft crawl bandwidth (min), see ft crawl bandwidth(A) & 0 & 32767 & 0 \tn % Row Count 3 (+ 3) % Row 29 \SetRowColor{white} ft notify bandwidth (max), see ft notify bandwidth(A) & 0 & 32767 & 100 \tn % Row Count 6 (+ 3) % Row 30 \SetRowColor{LightBackground} ft notify bandwidth (min), see ft notify bandwidth(A) & 0 & 32767 & 0 \tn % Row Count 9 (+ 3) % Row 31 \SetRowColor{white} index create memory (A, SC) & 704 & \seqsplit{2147483647} & 0 \tn % Row Count 11 (+ 2) % Row 32 \SetRowColor{LightBackground} in-doubt xact resolution (A) & 0 & 2 & 0 \tn % Row Count 13 (+ 2) % Row 33 \SetRowColor{white} lightweight pooling (A, RR) & 0 & 1 & 0 \tn % Row Count 15 (+ 2) % Row 34 \SetRowColor{LightBackground} locks (A, RR, SC) & 5000 & \seqsplit{2147483647} & 0 \tn % Row Count 17 (+ 2) % Row 35 \SetRowColor{white} max degree of parallelism (A) & 0 & 32767 & 0 \tn % Row Count 19 (+ 2) % Row 36 \SetRowColor{LightBackground} max full-text crawl range (A) & 0 & 256 & 4 \tn % Row Count 21 (+ 2) % Row 37 \SetRowColor{white} max server memory (A, SC) & 16 & \seqsplit{2147483647} & \seqsplit{2147483647} \tn % Row Count 23 (+ 2) % Row 38 \SetRowColor{LightBackground} max text repl size & 0 & \seqsplit{2147483647} & 65536 \tn % Row Count 25 (+ 2) % Row 39 \SetRowColor{white} max worker threads (A) & 128 & 32767 & 0 \tn % Row Count 27 (+ 2) % Row 40 \SetRowColor{LightBackground} media retention (A, RR) & 0 & 365 & 0 \tn % Row Count 29 (+ 2) % Row 41 \SetRowColor{white} min memory per query (A) & 512 & \seqsplit{2147483647} & 1024 \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.96319 cm} x{0.8354 cm} x{0.8354 cm} p{0.54301 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Configuration Option Table (cont)}} \tn % Row 42 \SetRowColor{LightBackground} min server memory (A, SC) & 0 & \seqsplit{2147483647} & 0 \tn % Row Count 2 (+ 2) % Row 43 \SetRowColor{white} nested triggers & 0 & 1 & 1 \tn % Row Count 3 (+ 1) % Row 44 \SetRowColor{LightBackground} network packet size (A) & 512 & 32767 & 4096 \tn % Row Count 5 (+ 2) % Row 45 \SetRowColor{white} Ole Automation Procedures (A) & 0 & 1 & 0 \tn % Row Count 7 (+ 2) % Row 46 \SetRowColor{LightBackground} open objects (A, RR, obsolete) & 0 & \seqsplit{2147483647} & 0 \tn % Row Count 9 (+ 2) % Row 47 \SetRowColor{white} optimize for ad hoc workloads (A) & 0 & 1 & 0 \tn % Row Count 11 (+ 2) % Row 48 \SetRowColor{LightBackground} PH\_timeout (A) & 1 & 3600 & 60 \tn % Row Count 12 (+ 1) % Row 49 \SetRowColor{white} precompute rank (A) & 0 & 1 & 0 \tn % Row Count 14 (+ 2) % Row 50 \SetRowColor{LightBackground} priority boost (A, RR) & 0 & 1 & 0 \tn % Row Count 16 (+ 2) % Row 51 \SetRowColor{white} query governor cost limit (A) & 0 & \seqsplit{2147483647} & 0 \tn % Row Count 18 (+ 2) % Row 52 \SetRowColor{LightBackground} query wait (A) & -1 & \seqsplit{2147483647} & -1 \tn % Row Count 20 (+ 2) % Row 53 \SetRowColor{white} recovery interval (A, SC) & 0 & 32767 & 0 \tn % Row Count 22 (+ 2) % Row 54 \SetRowColor{LightBackground} remote access (RR) & 0 & 1 & 1 \tn % Row Count 23 (+ 1) % Row 55 \SetRowColor{white} remote admin connections & 0 & 1 & 0 \tn % Row Count 25 (+ 2) % Row 56 \SetRowColor{LightBackground} remote login timeout & 0 & \seqsplit{2147483647} & 10 \tn % Row Count 27 (+ 2) % Row 57 \SetRowColor{white} remote proc trans & 0 & 1 & 0 \tn % Row Count 28 (+ 1) % Row 58 \SetRowColor{LightBackground} remote query timeout & 0 & \seqsplit{2147483647} & 600 \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.96319 cm} x{0.8354 cm} x{0.8354 cm} p{0.54301 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Configuration Option Table (cont)}} \tn % Row 59 \SetRowColor{LightBackground} Replication XPs Option (A) & 0 & 1 & 0 \tn % Row Count 2 (+ 2) % Row 60 \SetRowColor{white} scan for startup procs (A, RR) & 0 & 1 & 0 \tn % Row Count 4 (+ 2) % Row 61 \SetRowColor{LightBackground} server trigger recursion & 0 & 1 & 1 \tn % Row Count 6 (+ 2) % Row 62 \SetRowColor{white} set working set size (A, RR, obsolete) & 0 & 1 & 0 \tn % Row Count 9 (+ 3) % Row 63 \SetRowColor{LightBackground} show advanced options & 0 & 1 & 0 \tn % Row Count 11 (+ 2) % Row 64 \SetRowColor{white} SMO and DMO XPs (A) & 0 & 1 & 1 \tn % Row Count 13 (+ 2) % Row 65 \SetRowColor{LightBackground} transform noise words (A) & 0 & 1 & 0 \tn % Row Count 15 (+ 2) % Row 66 \SetRowColor{white} two digit year cutoff (A) & 1753 & 9999 & 2049 \tn % Row Count 17 (+ 2) % Row 67 \SetRowColor{LightBackground} user connections (A, RR, SC) & 0 & 32767 & 0 \tn % Row Count 19 (+ 2) % Row 68 \SetRowColor{white} user options & 0 & 32767 & 0 \tn % Row Count 20 (+ 1) % Row 69 \SetRowColor{LightBackground} xp\_cmdshell (A) & 0 & 1 & 0 \tn % Row Count 21 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Server Configuration Tools}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{1. Ad Hoc Remote Queries \newline % Row Count 1 (+ 1) 2. CLR enabled \newline % Row Count 2 (+ 1) 3. Remote Admin Connections (the tool refers to this setting as DAC) \newline % Row Count 4 (+ 2) 4. OLE Automation Procedures \newline % Row Count 5 (+ 1) 5. SQL Mail XPs \newline % Row Count 6 (+ 1) 6. Web Assistant Procedures \newline % Row Count 7 (+ 1) 7. Xp\_cmdshell \newline % Row Count 8 (+ 1) 8. HTTP access to SQL Server through endpoints \newline % Row Count 9 (+ 1) 9. Service Broker% Row Count 10 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Change Server Level Options}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\textasciicircum{}Use AdventureWorks2012;\textasciicircum{} \newline % Row Count 1 (+ 1) \textasciicircum{}GO\textasciicircum{} \newline % Row Count 2 (+ 1) \textasciicircum{}sp\_configure 'show advanced options', 1;\textasciicircum{} \newline % Row Count 3 (+ 1) \textasciicircum{}GO\textasciicircum{} \newline % Row Count 4 (+ 1) \textasciicircum{}RECONFIGURE;\textasciicircum{} \newline % Row Count 5 (+ 1) \textasciicircum{}GO\textasciicircum{} \newline % Row Count 6 (+ 1) \textasciicircum{}sp\_configure 'fill factor', 100;\textasciicircum{} \newline % Row Count 7 (+ 1) \textasciicircum{}GO\textasciicircum{} \newline % Row Count 8 (+ 1) \textasciicircum{}RECONFIGURE;\textasciicircum{} \newline % Row Count 9 (+ 1) \textasciicircum{}GO\textasciicircum{}% Row Count 10 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Database Level Options}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\emph{option/statement}}% Row Count 1 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.73275 cm} x{1.24425 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Auto Options}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Option}} & {\bf{Statement}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} AUTO\_CLOSE & True \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} AUTO\_CREATE\_STATISTICS & True \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} AUTO\_UPDATE\_STATISTICS & True \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} AUTO\_SHRINK & False \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} \seqsplit{Auto\_Update\_Statistics\_Asynchronously} & False \tn % Row Count 12 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.09494 cm} x{3.88206 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Database Mirroring Options}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Options}} & {\bf{Statment}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} PARTNER & FAILOVER \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} PARTNER & \seqsplit{FORCE\_SERVICE\_ALLOW\_DATA\_LOSS} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} PARTNER & OFF \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} PARTNER & RESUME \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} PARTNER & SAFETY OFF \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} PARTNER & SUSPEND \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} PARTNER & TIMEOUT 20 \tn % Row Count 10 (+ 1) % Row 8 \SetRowColor{LightBackground} WITNESS & OFF \tn % Row Count 11 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.73275 cm} x{1.24425 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Date Correlation Optimization Option}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Option}} & {\bf{Statement}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{DATE\_CORRELATION\_OPTIMIZATION} & ON \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{PAGE VERIFY Options}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Option}} & {\bf{Statement}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} PAGE\_VERIFY & TORN\_PAGE\_DETECTION \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} PAGE\_VERIFY & CHECKSUM \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Emergency Mode Options}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Options}} & {\bf{Statement}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} PAGE\_VERIFY & CHECKSUM \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} PAGE\_VERIFY & TORN\_PAGE\_DETECTION \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.03597 cm} x{1.94103 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{PARAMETERIZATION Options}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Options}} & {\bf{Statement}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} PARAMETERIZATION & FORCED \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} PARAMETERIZATION & SIMPLE \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.73275 cm} x{1.24425 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SQL Options}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Options}} & {\bf{Statement}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{READ\_COMMITTED\_SNAPSHOT} & OFF \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} ANSI\_NULLS & OFF \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} ANSI\_PADDING & OFF \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} ANSI\_WARNINGS & OFF \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} ARITHABORT & OFF \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} \seqsplit{CONCAT\_NULL\_YIELDS\_NULL} & OFF \tn % Row Count 10 (+ 2) % Row 7 \SetRowColor{white} QUOTED\_IDENTIFIER & OFF \tn % Row Count 12 (+ 2) % Row 8 \SetRowColor{LightBackground} NUMERIC\_ROUNDABORT & OFF \tn % Row Count 14 (+ 2) % Row 9 \SetRowColor{white} RECURSIVE\_TRIGGERS & OFF \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.73275 cm} x{1.24425 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{CURSOR Options}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Options}} & {\bf{Statement}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{CURSOR\_CLOSE\_ON\_COMMIT} & OFF \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} CURSOR\_DEFAULT & GLOBAL \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Create Table Database}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{CREATE TABLE {[}dbo{]}.{[}Categories{]}( {[}CategoryID{]} {[}int{]} IDENTITY(1,1) NOT NULL, {[}CategoryName{]} {[}nvarchar{]}(15) COLLATE \seqsplit{SQL\_Latin1\_General\_CP1\_CI\_AS} NOT NULL, {[}Description{]} {[}ntext{]} COLLATE \seqsplit{SQL\_Latin1\_General\_CP1\_CI\_AS} NULL, {[}Picture{]} {[}image{]} NULL ) ON {[}SECONDARY{]} TEXTIMAGE\_ON {[}SECONDARY{]}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Create a database snapshot}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{USE master; GO CREATE DATABASE northwind\_snapshot1115 ON}} ( {\emph{NAME = northwind, FILENAME = 'C:\textbackslash{}Program Files\textbackslash{}Microsoft SQL Server\textbackslash{}MSSQL\textbackslash{}Data\textbackslash{}nwindsparse1.ss'),}} {\emph{( NAME = northwind\_data2, FILENAME = 'C:\textbackslash{}Program Files\textbackslash{}Microsoft SQL}} {\emph{Server\textbackslash{}MSSQL\textbackslash{}Data\textbackslash{}nwindsparse2.ss')}} {\bf{ AS SNAPSHOT OF northwind; GO}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Change Database-Level Options}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{ALTER DATABASE \textless{}database\_name\textgreater{} SET \textless{}options\textgreater{} \textless{}statement\textgreater{}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Reverting Database}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{USE master; GO CREATE DATABASE AdventureWorks\_130PM ON}} {\emph{( NAME = AdventureWorks\_data,}} {\emph{FILENAME = 'C:\textbackslash{}Program Files\textbackslash{}Microsoft SQL Server\textbackslash{}MSSQL.2\textbackslash{}MSSQL\textbackslash{}Data\textbackslash{}aw1.ss')}} {\bf{AS SNAPSHOT OF AdventureWorks;}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}