• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/16

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

16 Cards in this Set

  • Front
  • Back

Buffer Pool Extension

Extends buffer cache to non-volatile storage
Improves performance for read-heavy OLTP workloads
Simple configuration with no changes to existing applications.

Memory-Optimized Tables

Defined as C structs, compiled into DLLs, and loaded
into memory
Can be persisted as filestreams, or non-durable
Do not apply any locking semantics
Can be indexed using hash indexes
Can co-exist with disk-based tables
Can be queried using Transact-SQL
Cannot include some data types, including text, image, and nvarchar(max)
Do not support identity columns or foreign key constraints

Create a memory-optimized table

CREATE TABLE dbo.MemoryTable
(OrderId INTEGER NOT NULL PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT = 1000),
OrderDate DATETIME NOT NULL,
ProductCode INTEGER NULL,
Quantity INTEGER NULL)
WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA);

Range Indexes
Latch free, in-memory B-Tree structure
Effective for range scans, equality predicates, and inequality predicates

CREATE TABLE tab2
(col1 INT NOT NULL INDEX r_idx NONCLUSTERED)
WITH (MEMORY_OPTIMIZED = ON,
DURABILITY = SCHEMA_ONLY)

Hash Indexes
Rows assigned to buckets based on hashed key
Multiple rows in the same bucket form a linked list
Effective for equality predicates
Query results are not sorted

CREATE TABLE tab1
(col1 INT NOT NULL INDEX h_idx NONCLUSTERED HASH
WITH (BUCKET_COUNT = 100))
WITH (MEMORY_OPTIMIZED = ON,
DURABILITY = SCHEMA_ONLY)

Turn on a trace flag



Turn on a trace flag at a server level

Turn on a trace flag


DBCC TRACEON (1204)



DBCC TRACEOFF (1204)



Turn on a trace flag at a server level


DBCC TRACEON (1204, -1)


-1 is for server level

See all traces that apply to the connection run

DBCC TRACESTATUS (-1)

SQL Service Broker def

SQL Service Broker is framework, which enables the creation of variety of objects that can send messages within DB.



Messages can be sent from DB to DB.

SQL Service Broker messages can be processed and retrieved on

Schedule via SQL Server agent


Demand by Windows application service


Automatically by setting an active stored procedure

SQL Service Broker uses three commands

CREATE CONVERSATION DIALGO cmd that creates the conversation on which messages are then sent



SEND cmd that is used to send messages from the queue for processing



RECEIVE cmd that is used to remove messages from the queue for processing

DMV that returns a row for each application domain inthe server

sys.dm_clr_appdomain

DMV that returns a row for each manged user assembly loaded into the server address space

sys.dm_clr_loaded_Assemblies

DMV that return a row for each property related to SQL SErver CLR integration, including the version and the state of the hosted CLR

sys.dm_clr_properties

DMV that returns a row for all CLR tasks currently running

sys.dm_clr_taks

If there is not enough space for tempdb the user may receive the following errors



1101 or 1105


3959


3967

1101 or 1105 - the session connecting to SQL Server must allocate space in tempdb



3959 - the version store is full



3967 - the version store must shrink because the tempdb is full

To rebuild your system DB you can use the following cmd

setup.exe /QUITE /ACTION=REBUILDDATABASE /INSTANCENAME=instance_name /SQLSYSADMINACCOUNT=accounts /SAPWD=sa password