0% found this document useful (0 votes)
7 views3 pages

Nicholade Serverteknologi-Database

Uploaded by

eyanft3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Nicholade Serverteknologi-Database

Uploaded by

eyanft3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Serverteknologi Database Cheat Sheet

by Nicholade via cheatography.com/62330/cs/16133/

Made by MS SQL Archit​ecture (cont) Database Design and Resource use


(cont)
Nevzat Tokmak Query Parser - Optimizer - SQL
Nicholas Johans​son Proces​ Manager - Database Manager - Naming Even if you consider naming
Rune Andrea​sen sor Query Executer conven​‐ your tables, columns etc. to be
Serve​rte​knologi Database tions easy – It is very important to
SQL Lock Manager – Synchr​oni​zation
OS API Services – Thread Scheduler – use clear and unders​tan​dable
Relation Database Buffer Pool – Memory Manger – name giving for your database
I/O Manager – So it can be understood by
A relational database is a set of formally
everyone who need to work on
described tables from which data can be Reference: http:/​/ud​aya​rum​ill​i.c​om/​sql​-se​‐
the database.
accessed or reasse​mbled in many different rve​r-a​rch​ite​ctu​re-​qa-3/
ways without having to reorganize the Normalize It very important to know the
database tables. The standard user and rules of normal​ization in terms
Database Design and Resource use
applic​ation progra​mming interface (API) of a of relational database
Database Planning the database is very
relational database is the Structured Query structure. If the principles of
planning important in terms of creating a
Language (SQL). SQL statements are used normal​ization are done right.
resour​ceful and working
both for intera​ctive queries for inform​ation Your database will be efficient
database. Even though it
from a relational database and for gathering and logical to everyone. It is
seems obvious – It can be one
data for reports. very important that your
of the most demanding tasks,
normal​ization is done right up
Reference: https:​//e​n.w​iki​ped​ia.o​rg​/wi​ki/​Mic​‐ when creating a relational
to the Third Normal​iza​tion.
ros​oft​_SQ​L_S​erver database.
Data Giving your design the right
Docume​‐ The importance of docume​‐
MS SQL Archit​ecture types data types is crucial for a
ntation ntation of a database, will make
working database. Therefore is
External Shared memory - Named pipes it easier for mainta​ining and
very important to give your
Protoc​‐ - TCP/IP - Virtual Interface altering changes further ahead
columns in your database the
ols Adapter (VIA) in the database.
most approp​riate data type for
Database Database Tables​/In​dexes - each and give you better
Engine Type System Transa​ctions - unders​tanding of the data.
Events​/Ex​ception Triggers -
TSQL - Stored Procedure -
SQLCLR
Storage Transa​ction Services & File
Engine Manager (Utili​ties) – Buffer
Manager & Lock Manager
(Access Methods)

By Nicholade Published 12th February, 2021. Sponsored by CrosswordCheats.com


cheatography.com/nicholade/ Last updated 22nd June, 2018. Learn to solve cryptic crosswords!
Page 1 of 3. http://crosswordcheats.com
Serverteknologi Database Cheat Sheet
by Nicholade via cheatography.com/62330/cs/16133/

Database Design and Resource use Install SQL Server Configure Windows Firewall
(cont)
Hardware Minimum Requir​eme​nts Open TCP port 1433
Primary It is very important in terms of SQL Server requires a minimum of 6 GB of Run netsh.exe with admin permis​sions
keys relational database, that your available hard-disk space. firewall set portop​ening
primary and natural key is set protocol = TCP port = 1433 name
SQL Server requires Super-VGA (800x600)
correctly. Be sure that you = SQLPort mode = ENABLE scope =
or higher resolution monitor.
define a primary key and natural SUBNET profile = CURRENT
Memory: Express Edition 512 MB, All other
key for your tables – It can be
Editions 1 GB
very important when you start to Tabeller
break up your tables when you Processor Speed: x64 Processor: 1.4 GHz
MASTER The master database records
start to normalize. Processor Type: x64 Processor: AMD
all the system​-level inform​ation
Data Data integrity is very important Opteron, AMD Athlon 64, Intel Xeon with
for a SQL Server system.
Integrity when you work with RDBMS Intel EM64T support, Intel Pentium IV with
MODEL The model database is used as
and it is one of the core EM64T support
the template for all databases
functions to uphold the data Install SQL Server
created on an instance of SQL
integrity in your database.
Run setup.exe from your media -> Server.
Indexing A proper indexing is a key to a Instal​lation -> Choose "New SQL
MSDB The msdb database is used by
successful database. It can be Server stand-​alone instal​lation
SQL Server Agent for
very complexed to index your or add features to an existing scheduling alerts and jobs and
database and deserves quite
instal​lat​ion​" -> Next -> Check I by other features such as SQL
focus when creating your
agree to the terms -> Next Server Management Studio,
database.
Advance to Install Setup Files and check for Service Broker and Database
Testing Testing your relational database
updates, if not move on and check your Mail
is very important and can be
instal​lation is correct. Click Next. TEMPDB The tempdb system database
crucial to avoid system failures.
On Instal​lation type choose new is a global resource that is
Quality assurance is there for
or add features to existing and available to all users connected
key in database creating.
click Next -> Advance -> Name to the instance of SQL Server
Reference: https:​//w​ww.q​uo​ra.c​om​/Wh​at-​‐ or connected to SQL Database.
your Instance ID -> Create
are​-go​od-​res​our​ces​-to​-le​arn​-Da​tab​ase​-de​‐ Tempdb is used to hold:
Service Account -> Advance to
sig​n-b​est​-pr​actices Temporary user objects that
Install page -> Reboot when
are explicitly created. Internal
Required to -> Your instal​lation
objects that are created by the
is now complete
database engine. tempdb is re-
https:​//d​ocs.mi​cro​sof​t.c​om/​en-​us/​sql​/sq​l-s​‐ created every time SQL Server
erv​er/​ins​tal​l/h​ard​war​e-a​nd-​sof​twa​re-​req​uir​‐ is started
eme​nts​-fo​r-i​nst​all​ing​-sq​l-s​erv​er?​vie​w=s​ql-​‐
ser​ver​-2017

By Nicholade Published 12th February, 2021. Sponsored by CrosswordCheats.com


cheatography.com/nicholade/ Last updated 22nd June, 2018. Learn to solve cryptic crosswords!
Page 2 of 3. http://crosswordcheats.com
Serverteknologi Database Cheat Sheet
by Nicholade via cheatography.com/62330/cs/16133/

Add users (RDMS) Backup of Database (cont) Setup Replic​ation

Powe​rsh​ell Create a Full Backup to non-de​fault 1. Configure Distri​butor and publis​her


$newUser = New-RD​MUser -Name "​‐ location SSMS > "​SQL​-Se​rve​r" > Right click Replic​‐

Log​inN​ame​" -Creat​eSQ​LSe​rve​rLogin Go to your Database in Object Explorer ation > Configure Distri​bution > Act as own
Right click NORTHWIND -> Tasks - Distri​butor > When asked for publisher add
-Integ​rat​edS​ecu​rity
> Back UP second server
GUI
From here go to Destin​ation -> 2. Creating Snapshot Public​ation
SSMS > "​SQL​-Se​rve​r" > Right click on SSMS > "​Pub​lisher Server​" > Replic​ation >
General -> Select Disk from
Security > New - Login Right click Local Public​ations > New public​‐
Drop-down menu
Creating an user in Query Click Remove until all existing backup files ations > Use following server > Add >
CREATE LOGIN "​USE​RNA​ME" have been removed. Select Distri​butor > Select Database >
WITH PASSWORD = 'Pa$$w​0rd' Click Add and enter your desired Path. Snapshot Public​ation > Choose Tables >

The Password need to follow the Windows It creates our backup and sets it to your Create Snapshot Immedi​ately

policy requir​ement changed path 3. Create Subscr​ipt​ion

GO SSMS > "​Pub​lisher server​" > Replic​ation >

Recovery of Database Local Public​ations > Right click the new


CREATE USER "​USE​RNA​ME" FOR LOGIN
replic​ation > New Subscr​iption > Add
"​USE​RNA​ME" Recovery of Full Database Backup
Subscr​iption > Run all Agents at Distri​bution
GO
Right click NORTHWIND -> Restore > Add SQL Server Subscr​iption > Choose a
Databa​se... -> From Device -> Add -> Path > Add New Database > Agent
User Permis​sions (RDMS)
Browse your file -> OK -> Select point to Schedule > Run Contin​uously > Initialize >
Powe​rsh​ell restore Immedi​ately
Set-R​DMU​ser​Pro​perty -User Snapshot Agent
$newUser -Property "​Add​" -Value Optimize Database Operations The Snapshot agent stores an executable
$TRUE In SSMS open SQL Activity Monitor by file which stores schema and data of
Set-R​DMU​ser​Pro​perty -User pressing published tables and db objects. It's
$newUser -Property "​Edi​t" -Value CTRL + ALT + A updated when synchr​oni​zation jobs are
$TRUE View Log Files gathered from SQL recorded.
Set-R​DMU​ser​Pro​perty -User %Progr​amF​ile​s%​\Mic​rosoft SQL Server​\13​‐ Dist​rib​ution Agent
$newUser -Property "​Del​ete​" - 0\Setup Bootst​rap​\LOG\ Works with Snaphot to distribute to subscr​‐

Value $TRUE ibers. Moves transa​ctions held at the distri​‐


Import & Export Database MS Tool bution db out to the subscr​ibers.
GUI
Merge Agent
SSMS > "​SQL​-Se​rve​r" > Databases > "​Dat​‐ Import and Export Wizard
It applies the initial snapshot to the
aba​se" > Security > Users > Right Click on Run the SQL server 2016 Import and Export
Subscriber and moves increm​ental data
an user > Permis​sions > Owned Schemas Data Wizard
changes that occur.
Alter User with Query Click Next -> Pick Excel as Data source ->
Queue Reader Agent
EXEC sp_add​rol​emember ' "​SCH​EMA​‐ Choose Destin​ation SQL server and modify
It runs at the Distri​butor and moves changes
S" ', ' "​USE​RNA​ME" ' the settings -> Choose Copy Data -> Next -
made at the Subscriber back to the
> Pick your Table to copy -> OK -> Check
Publisher.
Backup of Database Run Immedi​ately -> Finish
https:​//w​ww.c​od​epr​oje​ct.c​om​/Ar​tic​les​/71​‐
Create a Full Backup
555​0/S​QL-​Ser​ver​-Re​pli​cat​ion​-St​ep-​by-Step
Go to your Database in Object Explorer
Right click NORTHWIND -> Tasks -
> Back UP -> OK
It creates our backup and sets it to default
location

By Nicholade Published 12th February, 2021. Sponsored by CrosswordCheats.com


cheatography.com/nicholade/ Last updated 22nd June, 2018. Learn to solve cryptic crosswords!
Page 3 of 3. http://crosswordcheats.com

You might also like