Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

2 Database Installation

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 45

Semester A211

Topic 2:
Planning to Install SQL Server
Week 2 – Learning Objectives

Students will be able to:


1. Determine hardware requirements for SQL Server
and the SQL Server management tools.
2. Describe the various SQL Server editions.
3. Determine software license and installation options
that are appropriate for a particular environment.
4. Describe various methods of installing a default
instance and a named instance of SQL Server.
5. Describe how to upgrade SQL Server.
6. Verify the installation of SQL Server.
7. Configure SQL Server Enterprise Manager.
8. Troubleshoot the installation of SQL Server.
Hardware Installation Considerations

• Minimum Hardware Requirements


Hardware Installation Considerations

• Minimum Hardware Requirements

Check https://goo.gl/QwFULc for further information


Hardware Installation Considerations
• Optimize Hardware for SQL Server
In most production databases, you typically upgrade
system resources beyond the minimum hardware
requirements to avoid performance bottlenecks.

i) Processor
• Scaling up to more or faster processors allows SQL
Server to process queries more quickly.
• SQL Server can use up to 256 logical processors
when deployed on Windows Server Datacenter
Server.
• Standard Edition can support 4 physical CPUs, and
Enterprise can support 8 Physical processors.
• Workgroup Edition can support 2 physical CPUs,
and SQL Express can support 1 physical CPUs.
• Scaling out to multiple servers is generally
required for very large databases.
Hardware Installation Considerations

ii) Disk Subsystem


• Typically, large databases require faster
disk subsystems.
• If a production environment requires
redundancy, then you should consider
implementing RAID (Redundant Array of
Independent Disks) through hardware or
through the operating system.
• You can use RAID to increase
performance, reliability, storage, and
capacity.
• The different levels of RAID provide
varying levels of performance and fault
tolerance.
Hardware Installation Considerations

Redundant Array of Independent Disks (RAID)


Hardware Installation Considerations

iii) Memory
• When your computer has sufficient
physical memory, SQL Server can store
more data in the memory cache.
• Having more data in the memory cache
allows SQL Server to process queries
against databases with large amounts of
data more efficiently.
• The transfer of requests and results across
the network can impact the throughput
and perceived performance of SQL Server.
• These network factors can affect the
performance of SQL Server.
SQL Server 2014 Editions
SQL Server comes in several editions:

– SQL Server Enterprise


– SQL Server Standard
– SQL Server Business Intelligence
– SQL Server Web
– SQL Server Express
SQL Server 2014 Editions
SQL Server 2014 Editions

Default and supported compatibility levels


https://www.sqlskills.com/blogs/glenn/database-compatibility-level-in-sql-server/
SQL Server 2014 Editions

Microsoft SQL Server Version


Comparing Standard and Enterprise Editions

SQL Server for standard or enterprise edition


can be installed in client/server production
environment:

– Standard Edition
Lacks the features required to scale up and
support very large databases, data
warehouses, and Web sites. Normally for a
small workgroups or departments.
– Enterprise Edition
Contains all of the features required to scale
the performance levels required to support
Web sites, OLTP, and OLAP
Selecting the Appropriate Operating
System
Windows Windows Windows Windows Windows
XP SP2 Vista/Windows Server Server 2003 Server
OS 7,8 2003 Small SP2 2008/2019/
Business Cloud
Server SP2
Editions
Enterprise No Yes Yes Yes Yes
Standard No Yes Yes Yes Yes
Business No No Yes Yes Yes
Intelligence

Web No Yes Yes Yes Yes


Express No Yes No No No

Please check-out the latest compatibility from Microsoft site.


Features and Disk Space
Requirement

– Database Engine and data files, Replication, and


Full-Text Search : 280 MB
– Analysis Services and data files : 90 MB
– Reporting Services and Report Manager: 120 MB
– Integration Services : 120 MB
– Client Components : 850 MB
– SQL Server Books Online and SQL Server
Compact Books Online : 240 MB
– Approximately complete installation required 6GB
free spaces (refer: https://goo.gl/3HUJRR)
Software Installation Considerations

Licensing
– During installation,
SQL Server Setup
requires you to select
a licensing mode and
then to accept the
terms of the license
agreement.
– You have a choice of
two licensing modes:
per processor (core)
or per seat (user)
– Per seat (Server +
CAL)
– Per user (developer)
Please check URL: https://goo.gl/WGr87Q
Per Processor Licensing

• With per processor licensing, you acquire a


processor license for each processor running
SQL Server.
• This type of licensing agreement allows an
unlimited number of users to connect from
either a local area network (LAN) or wide area
network (WAN).
• Additional server or client licenses are not
required.
• In general, a per processor licensing
agreement is more cost effective for
organizations with a large number of users,
such as enterprise-level, or organizations that
offer Web-based solutions.
Per Seat Licensing

• With per seat licensing, you acquire a seat


license for each SQL Server and a client access
license (CAL) for each workstation that
connects to any instance of SQL Server.
• Each workstation that connects to an instance
of SQL Server with either Microsoft-provided
client software or third-party software requires
a CAL.
• Per seat licensing agreements may be more
appropriate for smaller organizations or
organizations that experience high usage
among a smaller, known set of users.
Determining the Security Context of
the Services Accounts
Using a Domain User Logon Account or Local System Account
- When you use a domain user logon account, consider the following facts
and guidelines:
 If you use a domain user logon account that is not a member of the
Administrators local group, the logon account must have file system
permissions and must have read-write permissions on the following
registry keys:
 HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer
(default instance)
 HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL
Server\NAMEDINSTANCE
 HKEY_LOCAL_MACHINE\System\CurrentControlset\Services\
MSSQLServer (default instance)
 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\
MSSQL$NAMEDINSTANCE
 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\
CurrentVersion\Perflib
 HKEY_LOCAL_MACHINE\Software\Clients\Mail
Determining the Security Context of
the Services Accounts
– Use a dedicated domain user logon account, select
the Password Never Expires attribute, and allow all
logon hours.
– SQL Server is installed in environments that are
composed of one or more Window domains.
– In these environments, install SQL Server in a domain
that has access to all user accounts for all domains.
– If choose the local system logon account, the SQL
Server services cannot communicate with remote
servers that use Windows trusted connections.
Determining the Security Context of
the Services Accounts

• Autostart Services
– By default, SQL Server Setup installs the SQL
Server and Microsoft Search services to run
automatically when operating system is started.
– The benefit of starting services automatically is that
a system administrator does not have to log in to
start them each time operating system starts.
Using Named and Multiple Instances of
SQL Server
• Default Instance
– is identified by the network name of the computer on which
it is running.
– Only one default instance is permitted.
• Named Instance
– is identified by the network name of the computer on which
it is running, plus an instance name
– Applications must use SQL Server client components to
connect to a named instance.
– A computer can run up to 50 named instances
concurrently.
• Multiple Instances
– Multiple instances occur when you have both a default
instance and one or more named instances installed
concurrently.
– Each instance operates independently on the same
computer.
Selecting a Security Mechanism

• Selecting Windows Authentication Mode


– User must have valid Windows user account.
– User must receive validation by the operating
system.

• Selecting Mixed Mode


– User can use Windows authentication (Windows
Operating System user account).
– User can use SQL Server Authentication (SQL
Server login account).
– If mixed mode is selected, must type and confirm a
password for the SQL Server system administrator
(sa) account, or select a blank password.
Selecting SQL Server Collations and
Sort Rules
• Groups of Collations
– Windows Collations
• When you designate Windows collations, the
operating system defines a set of rules for
storing and sorting character data that is
based on the rules for an associated Windows
locale.
• Windows collation rules specify which
alphabet or language is used when dictionary
sorting is applied and the code page used to
store non-Unicode character data.
• For example, the French Windows collation
for SQL Server matches the collation
attributes of the French locale for Windows.
Selecting SQL Server Collations
and Sort Rules
– SQL Collation
• SQL Server matches the attributes of common
combinations of code page number and sort order that
may have been specified in earlier versions of SQL
Server.
• SQL collations control the code page used for storing
non-Unicode data and sort rules for both Unicode and
non-Unicode data.
• The use of SQL collations:
– Use the replication feature with earlier versions of
SQL Server.
– The application code depends on the behaviors of the
previous SQL Server collations.
– Default Collation and Sort Rules
• If not designate a collation and select sort rules, SQL
Server applies the default.
• Better not change the default collation and sort rules.
Selecting Network Libraries

• Default Network Libraries


– Named Pipes and TCP/IP Sockets
network libraries as the default server
network libraries for SQL Server.
– TCP/IP sockets client network library
for all management tools.
– Named Pipes as a second client
network library on all versions of
Windows server.
– The client network library must match
one of the server network libraries.
Selecting Network Libraries
Methods of Installing SQL Server

• You can use SQL Server Setup to


install SQL Server using whether:
– Standard installation
– Unattended installation
– Remote installation / Cloud services
• In Lab exercise, you will perform
Standard installation because the
server is standalone.
Standard Installation
• The Default Installation Type is Typical
– If you want to change any installation defaults or
add or delete components, perform a custom
installation.
• Types of SQL Server Installation
– The following table describes the principal
differences between the three installation types.
Unattended Installation
An unattended installation installs several SQL Servers
with identical configurations, without using the
interactive SQL Server Setup.
• Performing an Unattended Installation
– An unattended installation executes a command
file that calls a setup initialization file.
• Creating a Custom Setup Initialization File
– Using a text editor to modify one of the sample
setup initialization files in order to add or change
entries.
– Running SQL Server Setup interactively.
• Command and Setup Initialization Files
– The following table describes the pairs of sample
command and setup initialization files that are
included with SQL Server.
Unattended Installation
Remote Installation
How SQL Server Performs a
Remote Installation
– Saves the information that you specify
in the series of SQL Server Setup dialog
boxes into a Setup.iss file.
– Starts the remote setup process. This
remote setup process:

• Starts a remote service.


• Copies files to the Admin$ share folder.
• Runs number of the remote computer by
using the options specified in the Setup.iss
file.
Remote Installation
Requirements for Remote
Installation
– User account must be an administrator on
the remote computer.
– User account must have read access to
the Setup source files folder.
Upgrading SQL Server
• Upgrading from SQL Server 2000
– Most of SQL features have been removed
– Install a default instance (upgrades
existing installation)
– Install a new named instance (retains
existing installation)
• Upgrading from SQL Server
2005/2008/2012
– Run the SQL server 2005/2008/2012
profile and monitor the deprecated
features
– Install a default instance (upgrades
existing installation)
– User still can run against the existing SQL
server 2005/2008/2012 as usual.
Verifying the Installation

Installed Components Description


SQL Server Services SQL Server, SQL Server Agent,
Integration Services, … etc
Management Tools Group of tools for
administering SQL server
Databases master, model, msdb, tempdb
Folder and Files Default directory c:\Program
Files\Microsoft SQL Server
Default startup options Written in the Windows
registry
Default security mode Windows authentication mode
Verifying the Installation

• Starting, Stopping, and Pausing the SQL Server


Services

– Automatically Starting the SQL Server Service -


the service starts each time operating system starts.
– Manually Starting, Pausing, and Stopping a
Service - You can start, pause, and stop SQL Server
service manually by using:

– SQL Server Configuration Manager (SSCM).


– Services in Windows Administrative Tools.
– A net command at the command prompt:

» For a default instance, the format is net start mssqlserver, net pause
mssqlserver, or net stop sqlserveragent.
» For named instances of a SQL Server service, you must specify it by
using the format, net start mssql$instancename.
Verifying the Installation

SQL Server Configuration Manager


Connecting to SQL Server
• Using a Graphical Tool
– SQL Server Management Studio (SSMS)

• Using the OSQL/SQLCMD Command Prompt


Utility
– Microsoft Windows 32 command prompt utility that
use to run Transact-SQL statements and script
files.
– The osql utility uses the ODBC database application
programming interface (API) to communicate with
the server
Connecting to SQL Server

SQL Server Management Studio


Troubleshooting
Identifying the Problem

i) Review Error Messages


• Read the error message displayed
during setup.

ii) Review the Setup Log File


• The setup log file is an output file that is
generated by the scripts that run during
setup and records Database Consistency
Checker (DBCC) error messages.
Troubleshooting
TITLE: Microsoft SQL Server 2014 Setup

------------------------------

The following error has occurred:

SQL Server Setup has encountered an error when running a Windows Installer file.

Windows Installer error message: The system cannot find the file specified.

Windows Installer file: C:\Temp\SQL2014Full_ENU\x64\setup\


sql_engine_core_inst_msi\sql_engine_core_inst.msi

Windows Installer log file: C:\Program Files\Microsoft SQL Server\120\Setup


Bootstrap\Log\20170214_092355\sql_engine_core_inst_Cpu64_1.log

Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and
continue setup
Troubleshooting
Find the root cause of the failure:

– Locate and open the Summary.txt file which


corresponds to the last SQL Server setup.
– In this example, the C:\Program Files\Microsoft SQL
Server\120\Setup Bootstrap\Log was associated with
the actual install.
– This folder contains the same Summary.txt file that
has a different file name in the following format:
Summary_<MachineName>_20170214_092355.txt
– In the Summary.txt file, you can find the following
information at the top of the report to help you in
determine the reason for the failure.
Troubleshooting

Test Network Connections

If a local client can connect to SQL Server


but a network client cannot to determine
the source of the problem you should:

• Ensure that the client and server network


libraries match.
• Determine whether the default client network
library is appropriate for your network.
• Verify that a network connection between the
client workstation and the server can be
established.
Troubleshooting
Recommended Practices

You must consider number of issues before and


after you install SQL Server. The following
recommended practices should help you install
and configure SQL Server:

 Use the same collation and sort rules so that


all SQL Server databases within your
organization are compatible.
 Use a dedicated domain user logon account,
select Password Never Expires, and allow
all logon hours.
 Register all instances of SQL Server that you
manage with SSMS.
 Assign a password to the SQL Server sa login
account, if mixed mode security is used. Do
not use a blank password.

You might also like