Introduction
Microsoft SQL Server is an application used to create
computer databases for the
Microsoft Windows
It provides an environment used to generate databases that can be
accessed from workstations, the web, or other
media such as a personal digital assistant (PDA).
We will provide lessons and other topics on how to
use Microsoft SQL Server 2008.
In order to follow the lessons on this site, you
must have
access to a
computer in which
Microsoft SQL Server 2008 is installed. To start, you
must have a computer that runs an appropriate operating system. If you
are just
learning, which is assumed for all lessons on this site, you can use a
Microsoft
Windows XP Professional, Microsoft
Windows Vista, or Microsoft Windows Server 2003.
To use Microsoft SQL Server, you must install it on a
computer. You can install it on Microsoft Windows XP Professional,
Microsoft
Windows Vista, Microsoft Windows Server 2003, or Microsoft Windows
Server 2008.
This means that you should take care of the operating system first.
Before installing Microsoft SQL Server 2008, make
sure you
have installed all service packs on your operating system. If you plan
to use
Microsoft Visual Studio 2008 to create Microsoft SQL Server 2008
databases, you
should install Microsoft SQL Server 2008 first, then install Microsoft
Visual
Studio 2008.
Introduction to Security
One of the main concerns of a database is security,
and this is central to Microsoft SQL Server. Security is exercised at
different levels: in the room where the computer(s) is(are) located (the
computer(s) that hold the server application (Microsoft SQL Server) and
the computer(s) that will use(s) the databases (clients)) and the
people who will use all these resources.
When it comes to the room that houses the computer
on which
you will install Microsoft SQL Server, you should make sure the room can
be
locked at any time and only a few selected people have access to it. For
maximum
security, you should also put the computer in a locked closet.
Creating an Administrator Account
To actually install Microsoft SQL Server 2008, you
must use
a user account that has the ability to install it. If you are using
Microsoft
Windows XP or Vista, you
should use the Administrator account or create a new
account that has administrative rights. The account you will use must
also
use/have a password. In Microsoft Windows XP Professional or Vista, to
use the
Administrator account, assign a password. Alternatively, after logging
in as
Administrator, create an account that has administrative rights.
Practical
Learning: Creating an Account in MS Wnd XP or Vista
- Start Control Panel and click User
Accounts:
- Click Create New User:
- Type the name for the new account as pkatts:
- Click Next.
Make sure the Computer Administrator radio button is selected.
- Click Create Account
- To assign a password to an account, in the User Account,
click the platts account
- Click Create A Password
- In the Type A New Password text box, type Password1 and
press
Tab
- Type Password1 to confirm and type anything in the last
text
box.
- Click Create Password
- In the same way, create another account named gmonay
that has
administrative rights with the password Password1
Practical
Learning: Creating an Account in a Server
- Log in to Microsoft Windows Server 2003 or 3008 with an account
that can
create an administrative account.
- To create an account in Microsoft Windows Server 2003 or 2008, on
the taskbar, you can click Start -> Administrative Tools -> Active
Directory Users and
Computers.
- In the left frame, right-click Users -> New User
- Set the First Name as Patricia, the Initials as G,
the Last
Name as Katts, and the User Logon Name as pkatts (the
domain
name will be different from yours)
- Click Next
- Type the Password as Password1
- Type the Confirm Password as Password1 and accept the
options in
the checkboxes
- Click Next (in the summary, the domain name will be different from
yours)
- Accept the options in the last page of the wizard and click Finish
- In the same way, create another account with the following
information:
First Name: Gertrude
LastName: Monay
User Logon Name: gmonay
Password: Password1
A security principal is a person or an object that
needs access to a database. The security principal can be considered as
one entity or as a group of entities:
This means that a security principal can be
considered as a lone entity or as
part of a group. For example, a person who accesses a database can be
considered an entity. A group of people who exercise the same function
and have been give the same function(s) on a database is considered a
collection.
To create a group in Microsoft Windows Server 2003
or 2008,
open the Active Directory Users and Computers. Right-click the Users
node ->
New -> Group:
In the New Object - Group dialog box, give a name to
the new
group. Make the necessary selections in the Group Scope and the Group
Type:
When you have finished, click OK. After creating a
group,
you can use it. To use a group, you can add one or more existing users
to it. To
do this, locate the group and double-click it or right-click the group
and click Properties:
Add the necessary information.
To control the type of access that a security
principal can exercise on a machine or a database, it works or acts on a
level. There are three levels:
Windows, server, and database:
Based on the functionality of a security principal,
it can be considered as belonging to a collection.
To help the operating system identify them, each
security principal uses a unique number called a security identifier
(SID).
Practical
Learning: Adding an Account to a Group
- In the left frame, click Users if necessary.
In the right-click frame, double-click Domain Admins
- In the Domain Admins Properties, click the Members tab (the domain
name
will be different from yours)
- Click Add...
- In the Enter the Object Names to Select text box of the Select
Users,
Contacts, or Computers dialog box, type pkatts
- Click Check Names (in the result, the domain name will be
different from
yours)
- Click OK
- Click OK
Roles and Logins
A role is an action or a set of actions that are
granted to a security principal. For example a person
A can be allowed to create and use a database. The ability to
perform such action is referred to as a role. Another person
B can be allowed only to use an existing database without being
able to create a new one. This is another type of role.
In order to access something (such as a computer or a
database), the object must be authenticated. Such an object can use a
username and a password and use the group it belongs to. For this
reason, the ability to be authenticated in order to access the database
or resource is called login.
We will see how to create a login in Lesson 3.
Getting Microsoft SQL Server
To make it possible for you and other students to
study
databases and SQL, Microsoft made available a trial version of Microsoft
SQL
Server 2008. This full version is available from the Microsoft web site.
To get the trial edition of Microsoft SQL
Server 2008, go to the
Microsoft
web site, do a search on "trial software", and follow the links to
locate the
the trial edition of Microsoft SQL Server 2008 Enterprise Edition (this is a
very
big file: 3GB).
You can download from any computer that has enough
space and
can allow you to create a DVD.
If you are downloading, the file will be saved in
your
computer. When the download is over, you must create an image. After
creating the DVD image, you can insert the DVD into the drive.
Practical
Learning: Installing MS SQL Server
- Start the computer. Using an account with administrative rights, login,
providing a username and a password
- Insert the DVD in the drive. The installation will start. You may get a message that the .NET framework needs to be installed. On that message, click OK. You will be
prompted
to start the installation:
After clicking the ACCEPT button,
you can click Install. The installation of the .NET Framework would start.
When the installation of the .NET Framework is over, you would
receive a
message:
From there, you can click Exit. You may be asked
to install a
hotfix:
In this case, accept to install it
by clicking Next and following the wizard. When the installation is
over,
you may be asked to restart:
- To start the installation, put the Microsoft SQL Server 2008
DVD in the drive. A window would come up:
- In the left section, click Installation
- If you are only interested in studying database design and
development in Microsoft SQL Server, on the right side, click
New SQL Server
Stand-Alone... The installation would start:
- After the message box, click OK
- Another message box would come up. When it finishes, the next page
of the
the wizard would come up. If you are using the evaluation version, read
the
message and click Next
- The License Terms page is presented to you. Read it. If you don't agree with the license, click Cancel. Otherwise,
click the I Accept check box and click Next:
- On the next page, read the messages and click Install:
- On the next page, read the messages and click Next:
- The next page allows you to specify what you want to install and what would be left out. After making your selections, click Next
- The next page allows you to name the instance and to specify where
the
the server would be installed. After making your selections, click Next:
- The next page mostly allows you to check and confirm the disk space. After
checking it, click Next
- The next page allows you to configure the server. After making
your
selections, click
Next
- On the next page, specify how authentication would be made. You
should
also, specify the account used as the administrator. To do this, you can click Add Current User. Then click
Next
- The next step allows you to specify an account for the analysis services.
You can simply click the Add Current User and click Next
- The next page allows you to specify the reporting service to install. Accept the default or make the necessary change. Then click Next:
- The next page allows you to specify whether you want installation information to be collected and sent to Microsoft. After making your
choice(s), click Next
The pre-installation will proceed and let you know when it ends with
the
Installation Rules display:
- After reading, click Next.
This would indicate that the installation is ready to proceed:
- To start the installation, you can click Install. The installation
would
start and the progress bar would indicate the evolution. This can
take a
while
- When this phase is over, a message box will let you know. After
reading
it, you can click Next. The last page of the wizard should announce
that the
installation was complete
- After reading the message, you can click Close