\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{Nicholade} \pdfinfo{ /Title (serverteknologi-database.pdf) /Creator (Cheatography) /Author (Nicholade) /Subject (Serverteknologi Database 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}{7DCCFA} \definecolor{LightBackground}{HTML}{EEF8FE} \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{Serverteknologi Database Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Nicholade} via \textcolor{DarkBackground}{\uline{cheatography.com/62330/cs/16133/}}} \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}Nicholade \\ \uline{cheatography.com/nicholade} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 12th February, 2021.\\ Updated 22nd June, 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*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Made by}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Nevzat Tokmak}} \newline % Row Count 1 (+ 1) {\bf{Nicholas Johansson}} \newline % Row Count 2 (+ 1) {\bf{Rune Andreasen}} \newline % Row Count 3 (+ 1) \textasciicircum{}Serverteknologi Database\textasciicircum{}% Row Count 4 (+ 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}{Relation Database}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\emph{A relational database is a set of formally described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database tables. The standard user and application programming interface (API) of a relational database is the Structured Query Language (SQL). SQL statements are used both for interactive queries for information from a relational database and for gathering data for reports.}}} \tn % Row Count 9 (+ 9) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Reference: \seqsplit{https://en.wikipedia.org/wiki/Microsoft\_SQL\_Server}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{MS SQL Architecture}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{External Protocols}} & Shared memory - Named pipes - TCP/IP - Virtual Interface Adapter (VIA) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{Database Engine}} & Database Tables/Indexes - Type System Transactions - Events/Exception Triggers - TSQL - Stored Procedure - SQLCLR \tn % Row Count 8 (+ 5) % Row 2 \SetRowColor{LightBackground} {\bf{Storage Engine}} & Transaction Services \& File Manager (Utilities) – Buffer Manager \& Lock Manager (Access Methods) \tn % Row Count 12 (+ 4) % Row 3 \SetRowColor{white} {\bf{Query Processor}} & Parser - Optimizer - SQL Manager - Database Manager - Query Executer \tn % Row Count 15 (+ 3) % Row 4 \SetRowColor{LightBackground} {\bf{SQL OS API}} & Lock Manager – Synchronization Services – Thread Scheduler – Buffer Pool – Memory Manger – I/O Manager \tn % Row Count 20 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Reference: \seqsplit{http://udayarumilli.com/sql-server-architecture-qa-3/}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Database Design and Resource use}} \tn % Row 0 \SetRowColor{LightBackground} Database planning & Planning the database is very important in terms of creating a resourceful and working database. Even though it seems obvious – It can be one of the most demanding tasks, when creating a relational database. \tn % Row Count 8 (+ 8) % Row 1 \SetRowColor{white} \seqsplit{Documentation} & The importance of documentation of a database, will make it easier for maintaining and altering changes further ahead in the database. \tn % Row Count 13 (+ 5) % Row 2 \SetRowColor{LightBackground} Naming conventions & Even if you consider naming your tables, columns etc. to be easy – It is very important to use clear and understandable name giving for your database – So it can be understood by everyone who need to work on the database. \tn % Row Count 22 (+ 9) % Row 3 \SetRowColor{white} Normalize & It very important to know the rules of normalization in terms of relational database structure. If the principles of normalization are done right. Your database will be efficient and logical to everyone. It is very important that your normalization is done right up to the Third Normalization. \tn % Row Count 33 (+ 11) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Database Design and Resource use (cont)}} \tn % Row 4 \SetRowColor{LightBackground} Data types & Giving your design the right data types is crucial for a working database. Therefore is very important to give your columns in your database the most appropriate data type for each and give you better understanding of the data. \tn % Row Count 9 (+ 9) % Row 5 \SetRowColor{white} Primary keys & It is very important in terms of relational database, that your primary and natural key is set correctly. Be sure that you define a primary key and natural key for your tables – It can be very important when you start to break up your tables when you start to normalize. \tn % Row Count 20 (+ 11) % Row 6 \SetRowColor{LightBackground} Data Integrity & Data integrity is very important when you work with RDBMS and it is one of the core functions to uphold the data integrity in your database. \tn % Row Count 26 (+ 6) % Row 7 \SetRowColor{white} Indexing & A proper indexing is a key to a successful database. It can be very complexed to index your database and deserves quite focus when creating your database. \tn % Row Count 32 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Database Design and Resource use (cont)}} \tn % Row 8 \SetRowColor{LightBackground} Testing & Testing your relational database is very important and can be crucial to avoid system failures. Quality assurance is there for key in database creating. \tn % Row Count 6 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Reference: \seqsplit{https://www.quora.com/What-are-good-resources-to-learn-Database-design-best-practices}} \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}{Install SQL Server}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Hardware Minimum Requirements}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{SQL Server requires a minimum of 6 GB of available hard-disk space.} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{SQL Server requires Super-VGA (800x600) or higher resolution monitor.} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Memory: Express Edition 512 MB, All other Editions 1 GB} \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Processor Speed: x64 Processor: 1.4 GHz} \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Processor Type: x64 Processor: AMD Opteron, AMD Athlon 64, Intel Xeon with Intel EM64T support, Intel Pentium IV with EM64T support} \tn % Row Count 11 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Install SQL Server}}} \tn % Row Count 12 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`Run setup.exe from your media -\textgreater{} Installation -\textgreater{} Choose "New SQL Server stand-alone installation or add features to an existing installation" -\textgreater{} Next -\textgreater{} Check I agree to the terms -\textgreater{} Next`} \tn % Row Count 16 (+ 4) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Advance to Install Setup Files and check for updates, if not move on and check your installation is correct. Click Next.} \tn % Row Count 19 (+ 3) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`On Installation type choose new or add features to existing and click Next -\textgreater{} Advance -\textgreater{} Name your Instance ID -\textgreater{} Create Service Account -\textgreater{} Advance to Install page -\textgreater{} Reboot when Required to -\textgreater{} Your installation is now complete`} \tn % Row Count 24 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\seqsplit{https://docs.microsoft.com/en-us/sql/sql-server/install/hardware-and-software-requirements-for-installing-sql-server?view=sql-server-2017}} \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}{Configure Windows Firewall}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Open TCP port 1433}} \newline % Row Count 1 (+ 1) Run netsh.exe with admin permissions \newline % Row Count 2 (+ 1) `firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = SUBNET profile = CURRENT`% Row Count 5 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Tabeller}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{MASTER}} & The master database records all the system-level information for a SQL Server system. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{MODEL}} & The model database is used as the template for all databases created on an instance of SQL Server. \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} {\bf{MSDB}} & The msdb database is used by SQL Server Agent for scheduling alerts and jobs and by other features such as SQL Server Management Studio, Service Broker and Database Mail \tn % Row Count 13 (+ 6) % Row 3 \SetRowColor{white} {\bf{TEMPDB}} & The tempdb system database is a global resource that is available to all users connected to the instance of SQL Server or connected to SQL Database. Tempdb is used to hold: {\emph{Temporary user objects that are explicitly created}}. {\emph{Internal objects that are created by the database engine.}} {\emph{tempdb is re-created every time SQL Server is started}} \tn % Row Count 24 (+ 11) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Add users (RDMS)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Powershell}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`\$newUser = New-RDMUser -Name "LoginName" -CreateSQLServerLogin -IntegratedSecurity`} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{GUI}}} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\emph{SSMS \textgreater{} "SQL-Server" \textgreater{} Right click on Security \textgreater{} New - Login }}} \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Creating an user in Query}} \newline `CREATE LOGIN "USERNAME"` \newline `WITH PASSWORD = 'Pa\$\$w0rd'` \newline The Password need to follow the Windows policy requirement \newline `GO` \newline `CREATE USER "USERNAME" FOR LOGIN "USERNAME"` \newline `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}{User Permissions (RDMS)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Powershell}} \newline % Row Count 1 (+ 1) `Set-RDMUserProperty -User \$newUser -Property "Add" -Value \$TRUE` \newline % Row Count 3 (+ 2) `Set-RDMUserProperty -User \$newUser -Property "Edit" -Value \$TRUE` \newline % Row Count 5 (+ 2) `Set-RDMUserProperty -User \$newUser -Property "Delete" -Value \$TRUE` \newline % Row Count 7 (+ 2) {\bf{GUI}} \newline % Row Count 8 (+ 1) {\emph{SSMS \textgreater{} "SQL-Server" \textgreater{} Databases \textgreater{} "Database" \textgreater{} Security \textgreater{} Users \textgreater{} Right Click on an user \textgreater{} Permissions \textgreater{} Owned Schemas}} \newline % Row Count 11 (+ 3) {\bf{Alter User with Query}} \newline % Row Count 12 (+ 1) `EXEC sp\_addrolemember ' "SCHEMAS" ', ' "USERNAME" '`% Row Count 14 (+ 2) } \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}{Backup of Database}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Create a Full Backup}} \newline % Row Count 1 (+ 1) Go to your Database in Object Explorer \newline % Row Count 2 (+ 1) `Right click NORTHWIND -\textgreater{} Tasks -\textgreater{} Back UP -\textgreater{} OK` \newline % Row Count 3 (+ 1) {\emph{It creates our backup and sets it to default location}} \newline % Row Count 5 (+ 2) {\bf{Create a Full Backup to non-default location}} \newline % Row Count 6 (+ 1) Go to your Database in Object Explorer \newline % Row Count 7 (+ 1) `Right click NORTHWIND -\textgreater{} Tasks -\textgreater{} Back UP` \newline % Row Count 8 (+ 1) `From here go to Destination -\textgreater{} General -\textgreater{} Select Disk from Drop-down menu` \newline % Row Count 10 (+ 2) Click Remove until all existing backup files have been removed. \newline % Row Count 12 (+ 2) Click Add and enter your desired Path. \newline % Row Count 13 (+ 1) {\emph{It creates our backup and sets it to your changed path}}% Row Count 15 (+ 2) } \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}{Recovery of Database}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Recovery of Full Database Backup}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\emph{Right click NORTHWIND -\textgreater{} Restore Database... -\textgreater{} From Device -\textgreater{} Add -\textgreater{} Browse your file -\textgreater{} OK -\textgreater{} Select point to restore}}} \tn % Row Count 4 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Optimize Database Operations}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{In SSMS open SQL Activity Monitor by pressing}} \newline % Row Count 1 (+ 1) CTRL + ALT + A \newline % Row Count 2 (+ 1) {\bf{View Log Files gathered from SQL}} \newline % Row Count 3 (+ 1) \%ProgramFiles\%\textbackslash{}Microsoft SQL Server\textbackslash{}130\textbackslash{}Setup Bootstrap\textbackslash{}LOG\textbackslash{}% Row Count 5 (+ 2) } \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}{Import \& Export Database MS Tool}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Import and Export Wizard}} \newline % Row Count 1 (+ 1) Run the SQL server 2016 Import and Export Data Wizard \newline % Row Count 3 (+ 2) {\emph{Click Next -\textgreater{} Pick Excel as Data source -\textgreater{} Choose Destination SQL server and modify the settings -\textgreater{} Choose Copy Data -\textgreater{} Next -\textgreater{} Pick your Table to copy -\textgreater{} OK -\textgreater{} Check Run Immediately -\textgreater{} Finish}}% Row Count 7 (+ 4) } \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}{Setup Replication}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{1. Configure Distributor and publisher}} \newline % Row Count 1 (+ 1) {\emph{SSMS \textgreater{} "SQL-Server" \textgreater{} Right click Replication \textgreater{} Configure Distribution \textgreater{} Act as own Distributor \textgreater{} When asked for publisher add second server}} \newline % Row Count 4 (+ 3) {\bf{2. Creating Snapshot Publication}} \newline % Row Count 5 (+ 1) {\emph{SSMS \textgreater{} "Publisher Server" \textgreater{} Replication \textgreater{} Right click Local Publications \textgreater{} New publications \textgreater{} Use following server \textgreater{} Add \textgreater{} Select Distributor \textgreater{} Select Database \textgreater{} Snapshot Publication \textgreater{} Choose Tables \textgreater{} Create Snapshot Immediately}} \newline % Row Count 10 (+ 5) {\bf{3. Create Subscription}} \newline % Row Count 11 (+ 1) {\emph{SSMS \textgreater{} "Publisher server" \textgreater{} Replication \textgreater{} Local Publications \textgreater{} Right click the new replication \textgreater{} New Subscription \textgreater{} Add Subscription \textgreater{} Run all Agents at Distribution \textgreater{} Add SQL Server Subscription \textgreater{} Choose a Path \textgreater{} Add New Database \textgreater{} Agent Schedule \textgreater{} Run Continuously \textgreater{} Initialize \textgreater{} Immediately}} \newline % Row Count 17 (+ 6) {\bf{Snapshot Agent}} \newline % Row Count 18 (+ 1) The Snapshot agent stores an executable file which stores schema and data of published tables and db objects. It's updated when synchronization jobs are recorded. \newline % Row Count 22 (+ 4) {\bf{Distribution Agent}} \newline % Row Count 23 (+ 1) Works with Snaphot to distribute to subscribers. Moves transactions held at the distribution db out to the subscribers. \newline % Row Count 26 (+ 3) {\bf{Merge Agent}} \newline % Row Count 27 (+ 1) It applies the initial snapshot to the Subscriber and moves incremental data changes that occur. \newline % Row Count 29 (+ 2) {\bf{Queue Reader Agent}} \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Setup Replication (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{It runs at the Distributor and moves changes made at the Subscriber back to the Publisher.% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\seqsplit{https://www.codeproject.com/Articles/715550/SQL-Server-Replication-Step-by-Step}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}