Vous êtes sur la page 1sur 38

Sql Server

2008 Mar 2017


Installation
Book
Sql Server 2008
This Book Covers How to install And Configure Sql Server 2008 And Connect To Installation And
A database Engine
Configuration
Steps
Acknowledgement

I would like to express my Appreciation to God for helping me to finish This Project without Any Mistakes and
Obstacles and My Trainer TOMAS For Giving Me A helpful Review And comment To Correct My Errors Properly
And My Friends Who Have Helped Me for finishing this Project But There are Not Only My Friends Helped Me My
Family members Also Helped Me By giving Helpful Suggestions And Comments To The Project .

2
Table of Contents
Acknowledgement .......................................................................................................................................................2
Introduction to SQL ......................................................................................................................................................4
Objectives ..................................................................................................................................................................6
How t o I n s t a l l SQLS e r v e r 2 0 0 8 .................................................................................................................7
STEP2 : Setu p .e xe...................................................................................................................................................8
STEP3 : SQLS erverI n s t a l l a t i o n Cente r.............................................................................................................10
STEP4 : SQLS erverI n s t a l l a t i o n Cente r.............................................................................................................11
STEP5 ( o p t i o n a l ) : ..............................................................................................................................................12
STEP6 : Pro duc t k e y ............................................................................................................................................12
STEP7 : LicenceTerms ........................................................................................................................................13
STEP8:SetupSupportFiles .......................................................................................................................................14
STEP9 : Setu pS u p p or t Rules ..............................................................................................................................16
STEP1 0 : F eatureS e lect io n.................................................................................................................................17
STEP1 1 :In stanc eCo n f i g u r a t i o n .....................................................................................................................18
STEP1 2 :DiskSpaceRe quir e m e nts ...................................................................................................................19
STEP1 3 :S erver C o nf i g u r a t i o n .........................................................................................................................20
STEP1 4 : DatabaseE n gine C o n f i g u r a t i o n AccountP ro v is io n..................................................................21
STEP1 5 : DatabaseE n gine C o n f i g u r a t i o n D ataD irectorie s .....................................................................22
STEP1 6 :E r rorUsageR e p o r t in g ........................................................................................................................23
STEP1 7 : In stall ati o nRules..................................................................................................................................24
STEP1 8 : Ready t o I n stall .....................................................................................................................................25
In stall ati onProgress...............................................................................................................................................26
STEP1 9 : In stall ati o nC o m p l e t e .........................................................................................................................30

3
Introduction to SQL
SQL (Structured Query Language) is a database computer language designed for managing data in relational
database management systems (RDBMS

SQL, is a standardized computer language that was originally developed by IBM for querying,

Altering and defining relational databases, using declarative statements.

4
What can SQL do?

SQL can execute queries against a database


SQL can retrieve data from a database
SQL can insert records in a database
SQL can update records in a database
SQL can delete records from a database
SQL can create new databases
SQL can create new tables in a database
SQL can create stored procedures in a database
SQL can create views in a database
SQL can set permissions on tables, procedures, and views

Even if SQL is a standard, many of the database systems that exist today implement their

Own version of the SQL language. In this document we will use the Microsoft SQL Server as

An example.

There are lots of different database systems, or DBMS Database Management Systems,

such as:

Microsoft SQL Server


o Enterprise, Developer versions, etc.
o Express version is free of charge
Oracle
MySQL (Oracle, previously Sun Microsystems) - MySQL can be used free of charge
(open source license), Web sites that use MySQL: YouTube, Wikipedia, Facebook
Microsoft Access
IBM DB2
Sybase
lots of other systems

5
Objectives

The Book Objectives Is to Show Peoples How to Install and Configure SQl server 2008

On Their Computer and Use It

On this Book Peoples Can

Install SQL Server 2008


Configure SQL Server 2008
And Also Can Connect To A database Engine

6
How t o I n s t a l l SQLS e r v e r 2 0 0 8

Developers and system administrators will find this installation guide useful, as will
seasoned DBAs.I t will teach you the basics required for a typical , problem-free
installation of SQL Server 2008 , allowing you to add other components later if you wish.

R e m e m b e r t o i n s t a l l t h e .Net F r a m e w o r k 3 . 5

Before you start the installation,youll need toinstall the.Net3.5Framework.This comespre-


installed on Windows 2008S erver , but for earlier versions of Windows , youll need to
install it first.Thisis a straight forward pre-requisite and is usually included as part of the
SQL Server 2008 installation. However,if you dont know how to do this , or for some
reason you need to download it , check out the guide
Installing.NetFramework3.5forSQLServer2008 , also on SQL Server Club.

Once this Framework ininstalled you can commence the installation of SQL Server 2008.

STEP1 : C o p yt h e i n s t a l l a t i o n f ile s

FirstoffI I recommend you copy To the entire directory structure from the SQL Server
2008 installation disc to the C :drive of the machine you are going toinstalliton.

Although this means you need to grab acup of coffee whilstits copying, this has three
advantages:

I t makes the installation process much faster than running it from CD/DVD
once it gets started.
I t allows you to easily add or remove components later, with out having to
hunt around for theCD/DVD.
I f your media is damaged and a file wont copy, youget to find out now,
rather than halfway through the installation.

7
Heres what The system looks like after the copy:

STEP2 :Setup.exe

Double click on the setup.exe file.


After a few seconds a dialogbox appears:

8
This will disappear from the screen and then the main installation page appears:

9
STEP3 :SQLServerI n s ta ll a t i o n Center

Click on the Installation hyperlink on the left hand side of the screen:

10
STEP4 :SQLServerI n s ta ll a t i o n Center

Click on the " N e w S e r v e r s t a n d - a l o n e i n s t a l l a t i o n " link on the righ tside of the


scree :

The following dialog appears on the screen whilst the install program prepares for
installation:

After aminute or so (the timing will vary according to yours ystem), the following
screen appears:

11
STEP5 ( o p t i o n a l ) :

I f any checks have failed, click on the S h o w d e t a i l s button or " V i e w d e t a i l e d


r e p o r t l i n k " to findou the cause, correct i t, then click on the Re-run button to
perform the checks again.

STEP6 :Produc tk e y

I f all checks have passed, c lick o n t h e OK button. After afew moments, the option to
select the edition and to enter the licence key (orproductkey) will appear. Note that
the product key box may already be populated, depending on which edition you have.
Dont enter theproduct key weve shown here,it wont work on yours ystem!:

12
STEP7 : LicenceTerms

E n t e r t h e p r o d u c t k e y into the box, or choose the free edition if you're evaluating


SQL Server2008, and click o n t h e N ex t b u t t o n :

Click in the " I ac ceptt h e lic ens et e r m s " c heck b o x , then click o n t h e N e x t
b u t t o n again.

13
STEP8:SetupSupportFiles

The following screen appears; c lick o n t h e I n s t a l l b u t t o n :

14
The following screen will appear whilst Windows Installer prepares itself for the
installation.This will take a short while:

After 30 seconds or so the dialog appears again:

15
STEP9 :SetupS u pp or t Rules

I f all is well, the following screen appears:

Click on the N e x t button again.

16
STEP1 0 :F eatureSelection

Selec t t h e f e a tu r e s y o u w a n t t o i n s t a l l .
At aminimum, the following are useful ( I'd argueessential), but what you need will
depend on your needs:

Click on the N e x t button.

17
STEP1 1 :In stanc eCo n f i g ura ti o n

After a short while the following screen appears:

For most installations, keep the defaul tsettings.


Click on the N e x t button.

18
STEP1 2 :DiskSpaceRe quir e m ents

This screen just tells you if you have sufficient disk space on the drive youre
installing to, and whats going to be installed where.

Click on N e x t .

19
STEP1 3 :Server C o nf i g u r a t i on

This step allows you to setup the service accounts that will be used to run SQL
Server. If you have created Windows NT or Active Directory accounts for use with
services, use these.

I f not, then just to get the installation up and working, use the built-in Network
Service account for all three services listed (thisaccount doesnot require a
password).

This allows SQL Server to start up after installation. However, it can be easily
changed later to another account through the Services applet (ControlPanel-
> AdministratorTools- > Services):

In addition, remember to change the S t a r t u p T yp e to A u t o m a t i c , for all three


services. This automatically starts the SQL Server database engine, SQL Agent and
SQL Browser services when the server is re-booted.

The first service runs the SQL Server database engines executable process. The other
two services allow scheduled jobs to run after installation(andafterare-boot), and
allow the SQL Server to be found by clients on the network.

Do not worry about changing the collation tab, unless there is a specific requirement
for anything other than the default collation sequence.
Finally,ClickonN e x t .

20
STEP1 4 :DatabaseE ngine C o n f i g ur a ti on AccountP rovision

This screen allows you to setup database engine security.

Change the A u t h e n t ic a t i o n M o de to M i x e d M od e unless you are c e r t a i n you only


need Windows-only authentication.

M a n y t h i r d p a r t y a p p l i c a t i o ns r e l y o n SQL S e r v e r l o g i n s t o o p e r a t e
c o r r e c t l y, so i f y o u a r e s e t t i n g u p a s e r v e r f o r a t h i r d p a r t y
applic ation, r a t h er t h a n on e de velopedin-house, enab lin g M ixed
M od e a u t h e n t i c a t i o n is a g o o d i d e a .

a) I f you pick Mixed Mode security, you must also enter a password for the sys
admin account(sa).

b) Enter and confirm a secure password for the (sa) account and keep it some
where safe.Donot giveit to anyoneyou donot want to have access to the SQL
Server.

Note: that you MUST also provide a Windows NT account on the local machine a (sa)
SQL Server administrator. If you donot wan tWindows system administrators to be
able walk up to the box and login to SQL Server, create a new, local, dummy
Windows user and add this account instead. Otherwise, add in the local administrator
account, or your own Windows account on the domain in which the SQL Server will
reside.

21
STEP1 5 :DatabaseE ngine C o n f i g ur a ti on DataDirectories

Click on the D a t a D ir e c to r ies tab.

Change the directories to specify which drives in your system will be used for the
various types of database files.

Generally its advisable to put the User database directory and User logdirectory on
separate physical drives for performance, but it will depend on how Windows has
been configured and how many disk drives you have available.

I f you are installing on a single drive laptop or desktop, then simply specify:
Data r o o t direc tor y C:\ProgramFiles\MicrosoftSQLServer
User d a t a b a s e d i r e c t o r y C:\DataC:\L
User l o g d i r e c t o r y ogsC:\Tem
T e m p DB d i r e c t o r y pDBC:\Tem
T e m p L og d i r e c t o r y pDBC:\Back
B ac k up d i r e c t o r y ups

Donot click on the FILE STREAM tab unless you know you need to change these
options, as it is not generally required for most installations, but can easily be
changed by using sp_configure 'filestream_access_ level', '<level>' after SQL
Server has been installed. Clic k o n N e x t .

22
STEP1 6 :E r rorUsageR e por tin g

This screen simply asks if you want to send error information to Microsoft and can
safely be skipped if you donot want to share any information.

Click boxes if you want to help Microsoft help you.


Click on N e x t again

23
STEP1 7 :In stallati onRules

This screen simply checks if there are any processes or other installations running
which will stop the installation of SQL Server 2008.

ClickonN e x t againyourealmostreadytoinstall:

24
STEP1 8 : Readyt o I nstall

This screen summarises what you are about to install and gives you a last chance to
cancel or change any thing thats wrongly configured:

Check that whats being installed is what you want and then click on I n s t a l l when
youre sure you want to start the installation process:

25
In stallationProgress
SQL Server 2008 will now install. How long it takes depends on the speed of your
machine, what load its under ,the installation media (CDisslower) and what youve
chosen to install.

26
MoreI n s t a l l a t i o n P rogr es s

a n d F in a l l y
Finally,theinstallationwillcomplete:

27
and the following dialog box will appear:

Click o n OK, t h e m ac h i n e w i l l NOT


R e b o o t . The following will appear:

28
followedby:

Click o n t h e N e x t b u t t o n again

29
STEP1 9 :In stallati onC o m pl et e

The following screen appears:

I t may be worth clicking on the installation log at the top of the screen to check
everythings gone as expected. Note that this is MUCH smaller than the usual SQL
Server installation log files of old.

Finally,click o n t h e Closeb u t t o n . Thefollowingdialogwillappear:

Click o n OK y o u r s e r v e r w i l l NOTr e - b o o t a t t h i s p o i n t .

30
ThedialogboxwilldisappearandyouwillbereturnedtotheInstallationCenter:

Click o n t h e Close b u t t o n (the x ) in the top right of the screen.


Finally, manually reboot your machine to complete the SQL Server 2008 installation.

31
T op Tips:

H o w t o c hec k t h a t SQL S e r v e r 2 0 0 8 has i n s t a l l e d c o r r ec t l y

Here are a short number of post-installation checks which are useful to perform after
rebooting your new SQL Server. You dont have to run these, and there are other
ways to check, but they are very useful for non-DBAs to be sure that the installation
is basically sound and a connection can be made to the new SQL Server before
handing it over to someone else.

Chec k 1 : Hast h e SQLS e r v e r S er vic eS t ar t ed ?

CheckSQLServer2008hasstarted.

Chec k 2 : DoesM a n a g e m e n t S t u d i o W o r k ?

CheckManagementStudioworksbyfiringitup.

32
Click o n NOwhenyouseethisdialogbox:

33
Chec k 3 : Can y o u r u n a basicq u e r y a g a i ns t t h e n e w SQLS e r ve r ?

CheckSQLServerworksbyrunningasimplequeryfromManagementStudio:

34
Enter the query shown below and hitF5 to run i t :

Chec k 4 : I s SQLS e r v e r A g e n t R u n n i n g?

CheckSQLServerAgentisrunningforscheduledjobs.Thereshouldbeagreenarrownexttot
heSQLServerAgentdatabasesymbol(itssmall,youmighthavetolookhard):

Chec k 5 : Can SQLS e r v e r b e s ee nf r o m t h e N e t w o r k ?

CheckthatthenewSQLServercanbeseenfromanotherSQLServeronthesamedomainbyr
unningisqlL(orosql L):

I f youcantseethenewSQLServerinthislist,checkthattheSQLServerBrowserserviceisst
artedonthemachinewhereyouhavejustinstalledSQLServer.

35
Chec k 6 : Hast h e T C P / IP n e t w o r k p r o t o c o l l i b r a r y b e e n e n a b l e d o n t h e s er v er
?

I f thebrowserserviceisstartedbutyoustillcannotconnecttotheserver,clickonS t a r t -
> P r o g r a m s - > SQLS e r v e r 2 0 0 8 -
> SQLS e r v e r C o n f i g u r a t i o n M an a g e r (ontheserverwhereSQLServersjustbeeninstalle
d)

TheSQLServerConfigurationManagerwindowopens.
ClickontheSQLS e r v e r N e t w o r k C o n f i g u r a t i o n nodeandexpandit.

Intheexamplebelow,wehaveMSSQLSERVER(abaseinstanceofSQLServer),andSQLEXPR
ESSshowingasinstalled.
I f indoubt,c lick o n Pr otoc ols f o r MSSQLSERVER.

Intheabovescreenshot,theTCP/IPnetworkprotocollibraryisdisabled.Weneedtoenableiti
norderthatremoteserverscantalktothenewlyinstalledSQLServer.


Aw o r d o f e x p l a n a t i o n : Inmostinstallations,NamedPipescanbeignored,un
lessthereisarequirementforit .Invirtuallyallenvironments,VIAcanalsobeignoreda
sthisprotocolrequiresaspecialnetworkcard.Sharedmemoryisthelocalprotocolth
atSQLServeruseswhentalkingtoaclientapplicationonthesameserverasitself,forex
amplewhenSQLServerManagementStudioconnectstoi t.I t isusuallybesttoleavethi
senabled.

36
YouwillneedtheTCP/IPprotocolenabledifyouneedtoconnecttoyournewSQLServerfro
maremoteclientoranotherserverviaTCP/IP,whichiswhatmostnetworksuse.

I f itshowsasDISABLED(above),d o u b l e c lic k o n t h e T CP / IP p r o t o c o l l i n e , andthefollow


ingwindowwillappear:

E ns ur ethatE na b l e d iss e tt o Yes,andclickonOK.Thefoll


owingwarningwillappear:

37
ClickonOK,andyouwillbereturnedtotheConfigurationManagerwindow,whereTCP/IPwil
lnowbeshownasenabled:

GobacktotheServicesapplet,andre-
starttheMSSQLSERVERservicesothattheTCP/IPprotocolcanbeusedtoconnecttoyourn
ewSQLServer.

Thentrytoconnecttoitagainfromaremotemachine.

I f youhaveexperiencedproblemswiththepreviousconnectivitytests,youshouldnowbea
bletorepeatatleastsomeofthemsuccessfully.

38

Vous aimerez peut-être aussi