1-Introduction To MS SQL 2012
1-Introduction To MS SQL 2012
1-Introduction To MS SQL 2012
SERVER
Objectives
SQL, T-SQL
Hardware and Software Requirements
MS SQL Server 2012 Edition
MS SQL Server 2012 Installation
MS SQL Server 2012 Tools and
Components
System Database
2
Structured Query Language (SQL)
Is an industry-standard programming
language used to insert, retrieve, modify, and
delete data in a relational database.
3
Structured Query Language (SQL)
Three Categories:
5
Structured Query Language (SQL)
Three Categories:
2. Data Manipulation Language (DML)
used to SELECT, INSERT, UPDATE and DELETE data
in the objects defined by DDL
6
Structured Query Language (SQL)
Three Categories:
3. Data Control Language (DCL)
7
Transact-SQL (T-SQL)
8
Microsoft SQL Server a History
9
SQL Server Architecture
The entities in involved SQL Server
architecture
• SQL Server instances,
• databases
• schemas
• database
10
SQL Server Architecture
SQL Server Instances
is an installation of a SQL
Server database engine/service
databases
can be a Default Instance or
Named Instance
11
SQL Server Architecture
SQL Server Instances
12
SQL Server Architecture
Databases
You can think of a database as a container of
objects such as tables, views, stored procedures,
and so on
Each instance of SQL Server can contain multiple
databases
13
MS SQL Server Edition
Enterprise Edition
14
MS SQL Server Edition
Standard Edition
15
MS SQL Server Edition
Workgroup Edition
Intended as a departmental database server,
Workgroup Edition includes the right mix of
features for a small transactional database
Web Edition
new for SQL Server 2012 is licensed for
hosting websites
16
MS SQL Server Edition
Compact Edition
Its small footprint of only 1MBof RAM
means that it can actually run well on a mobile
smart device
Express Edition
It’s a full version of the SQL Server database
engine intended to serve as an embedded database
within an application. It’s completely free.
17
Hardware Requirements
Hardware Requirements
Minimum:
x86 Processor: 1.0 GHz
Processor Speed x64 Processor: 1.4 GHz
Recommended: 2.0 GHz or faster
Minimum:
Express Editions: 512 MB
All other editions: 1 GB
Recommended:
Memory Express Editions: 1 GB
All other editions: At least 4 GB and should be
increased as database size increases to ensure optimal
performance.
18
Software Requirement
.NET 3.5 SP1 is a requirement for SQL Server 2012
when you select Database Engine, Reporting
Services, Master Data Services, Data Quality Services,
Replication, or SQL Server Management Studio, and it
is no longer installed by SQL Server Setup.
19
OS Requirements
Windows 7,
Windows Server 2008 R2,
Windows Server 2008 Service Pack 2
Windows Vista Service Pack 2
20
Preparing to Install
22
Preparing to Install
23
Preparing to Install
24
Authentication Modes
25
SQL Server 2012
Installation
26
Installation – SQL Server 2012
27
Installation – SQL Server 2012
28
Installation – SQL Server 2012
29
Installation – SQL Server 2012
30
Installation – SQL Server 2012
31
Installation – SQL Server 2012
32
Installation – SQL Server 2012
33
Installation – SQL Server 2012
34
Installation – SQL Server 2012
35
Installation – SQL Server 2012
36
Installation – SQL Server 2012
37
Installation – SQL Server 2012
38
Installation – SQL Server 2012
39
Installation – SQL Server 2012
40
Installation – SQL Server 2012
41
Installation – SQL Server 2012
42
Installation – SQL Server 2012
43
Installation – SQL Server 2012
44
SQL Server Tools and Components
45
SQL Server Configuration Manager
Profiler is great
for debugging an
application or tuning
the database
47
Logging In
Server Type
Server Name
Authentication
48
SQL Server Management Studio
is the primary graphical tool that performs many of the
administrative tasks needed in SQL Server.
Management Studio’s Query Editor is an excellent way to work with raw T-SQL
code and it’s integrated with the Solution Explorer to manage projects
49
SQL Server Management Studio
Summary
Object Explorer 50
SQL Server Management Studio
Object Explorer
Used for administering and developing SQL
Server 2008 database objects
Summary
Presents basic information about the selected
object
51
SQL Server Management Studio
Template Explorer
Query Editor 52
SQL Server Management Studio
Template Explorer
Used to create and manage T-SQL code
templates. The templates are simply stored SQL
scripts within a directory structure
Query Editor
is used to create, edit, and execute T-SQL
batches.
53
SQL Server Management Studio Solution Explorer
Properties Window
54
SQL Server Management Studio
Solution Explorer
Displays solutions, which are convenient
groupings of objects, T-SQL, or special programs
called stored procedures, among other items
Properties Window
Displays the set of properties for each object
55
Viewing Available Databases
Object Explorer
Expand Databases folder
56
Viewing Available Databases
Query Editor (T-SQL)
Execute sp_helpdb system stored procedure
57
System Database
58
System Database
Master
keeps the instance of SQL Server functioning.
59
System Database
Master
contains all information that is global to the
server, including logins, error messages, system
configuration, and the list of other databases that
exist on the server
60
System Database
Msdb
store information about the scheduling of
alerts, the definition of jobs, and the recording of
the server operators to be contacted when a
particular event occurs on the server
61
System Database
Tempdb
contains all temporarily created stored
procedures and tables and is generally used as a
work area by SQL Server
62
System Database
Model
stores a complete template for creating new
databases
63
Sample Database
TSQL2012
64