Home

Installation of the SQL Server Database System

 

Microsoft SQL Server Installation

 

Introduction

To use our lessons, you must have access to a Microsoft SQL Server computer. If you don't have it installed already, you can download a trial version from the Microsoft web site. To do this, access that site and do a search on "SQL Server" or "trial software".

For this installation, we are using the CD called SQL Server Developer Edition. This installation is done on a Microsoft Windows 2000 Server by the Administrator account.

 

Practical LearningPractical Learning: Installing MS SQL Server

  1. Log on to your Windows 2000 Server.
  2. Put the CD or DVD in the drive.
    A border-less window should come up (if it doesn't, open Windows explorer, access the drive that has the CD or DVD and double-click autorun):
     
    Microsoft SQL Server Installation
  3. Click SQL Server 2000 Components or press Alt C:
     
    Microsoft SQL Server Installation
  4. On the first page of the Welcome wizard, click Next
  5. On the second page, choose the type of installation you are performing by clicking the appropriate radio button. The Remote Computer choice would lead you to select a computer or provide its path so you can install SQL Server on a computer that is not close to you. As for me, I am installing it on the local computer that has the CD drive I am using:
     
  6. After selecting the desired type of installation and if necessary providing the information needed, click Next:
     
    Installation Selection
  7. The next dialog box allows you to select an installation option such as performing an installation live or scheduling that can be done without your eyewitness supervision (second radio button). For this installation, I will perform it with the default option
  8. The next option allows you to type your name and optionally your company. After doing this, click Next
     
    User Information
  9. Read the Software License Agreement COMPLETELY and, if you agree, click Next. If you don't agree, click No and stop the whole thing. The next steps assume that you agreed with the small prints
  10. Next, enter the 25-digit CD-Key and click Next
  11. The next step provides other options for the installation type. The first radio button is mainly used if you are installing on a workstation that will be connecting to a server or to servers. The third option allows you to install only MDAC. The installation I am performing is for programmers (fancily called "developers") and since this site is for future database developers, I select the default second radio button:
     
    Installation Definition
  12. After making your selection, click Next
  13. Accept the Default check box selected on the wizard page and click Next
  14. The next steps will need some decisions from you. For example, you must now set the amount of installation you want to perform and the folder in which you want to store SQL Server. I will accept the default Typical:
     
    Setup Type
  15. Click Next
  16. The next step allows you to specify who is doing the installation. If you are an administrator, specify the account's password. If you have an account that can perform an installation on the server, enter its username, its password, and the domain it belongs to:
     
    Services Acounts
  17. Click Next
  18. On the next step, you can accept to exclusively use Windows Authentication with the first radio button. Otherwise, you can and should use this opportunity to allow different persons to log in to this SQL Server. In this case, you can select the second radio button and create a password for the SQL Server Authentication, which would create and setup the sa account:
     
    Authentication Mode
  19. You should never use or allow a blank password, even if you are working alone. For one thing, this would be a bad habit you should not let get to you. For another thing, database security should be one of your biggest concerns and an employer or a job interviewer would be happy to know that you take security issues to your heart and you care.
  20. Click Next
     
    Start Copying Files
  21. Once Setup has enough information, on the last wizard page, simply click Next
  22. Once the installation is over, click Finish
 

Microsoft SQL Server Desktop Engine Installation

If you don't have access to Microsoft SQL Server or cannot have it, you can use the second alternative: Microsoft SQL Server 2000 Desktop Engine (MSDE). This is free software available from Microsoft. It obviously has limitations with regards to SQL Server but it can be used for all the exercises in our lessons.

To get MSDE, you can connect to the Microsoft web site, do a search on MSDE and follow the links to download it.

Practical LearningPractical Learning: Installing MSDE

  1. First download the MSDE from the Microsoft web site. To get it, go to http://www.microsoft.com and do a search on MSDE. A link will let you know how to download it
     
  2. After downloading MSDE, click Open
     
  3. Read the license agreement. If you don't agree with it, click Cancel. If you agree with it, click I Agree and continue with the wizard
     
  4. Accept the suggested Installation Folder and Finish
  5. Click Yes to create the MSDERelA new folder
     
  6. When the files have been installed in the folder, click OK
  7. Open the Command Prompt and switch to the folder where the MSDE files were installed. By default, this would be C:\MSDERelA
     
  8. To install Microsoft SQL Server 2000 Desktop Engine, type setup SAPWD="DesiredPassword" where DesiredPassword will be the password of the Administrator account . Here is an example:
     
    setup SAPWD="FOotbAlli$tic"
  9. Press Enter and the installation will start
     

     
    When the installation is over, you may be asked to restart the computer
     
  10. If so, click Yes

SQL Server Startup

To use SQL Server or MSDE, it must start as a service. You have two options. You can start it every time you want to use. You can also make it start whenever the computer comes up from booting.

Practical Learning: Starting and Stopping SQL Server

  1. To start SQL Server, on the Taskbar, click Start -> Programs -> Microsoft SQL Server -> Service Manager
     
    Launching Microsoft SQL Server
  2. On the SQL Server Service Manager dialog box, click the Start/Continue button if necessary
     
    SQL Server Service Manager
  3. On the lower-right corner of the desktop, on the clock section of the Taskbar, the button of SQL Server appears with a green play button
  4. Close the dialog box
  5. To stop the SQL Server service, double-click the SQL Server icon on the Taskbar system tray
     
    SQL Server Service Manager
  6. On the SQL Server Service Manager dialog box, click the Stop button
  7. You will receive a confirmation message box. Click Yes.

Practical LearningPractical Learning: Starting the SQL Server Service Automatically

  1. Display the Control Panel window and double-click Administrative Tools
  2. In the Administrative Tools window, double-click Services
     
    Administrative Tools
  3. In the Services window, scroll to the middle of the right frame and click MSSQLSERVER
  4. On the toolbar, click the Start Service button
     
    Services
  5. Close the Services window
 

Introduction to ADO.NET

ADO.NET is a group of libraries used to create powerful databases using various sources that include Microsoft SQL Server, Microsoft Access, Oracle, XML, etc. ADO.NET relies on the .NET Framework's various classes to process requests and perform the transition between a database system and the user. The operations are typically handled through the DataSet class. While ADO.NET is the concept of creating and managing database systems, the DataSet class, as we have introduced it so far, serves as an intermediary between the database engine and the user interface, namely the Windows controls that the user uses to interact with the computer. Still, remember that a DataSet object is used to manage lists, any lists, not just those created using database environments such as Microsoft SQL Server or Microsoft Access.

Besides using features of a database in an ADO.NET application, you can also fully take advantage of XML as it is completely and inherently supported by the DataSet class. To fully support XML in your application, the .NET Framework is equipped with the System.Xml.dll library. You may have noticed that, in previously lessons, to use XML, we never had to import any library. This was possible because, if you create a Windows Forms Application using the New Project dialog box, the System.Xml.dll namespace is directly included in your application. The classes that implement XML in the .NET Framework are defined in the System::Xml namespace.

Getting Access to ADO.NET Libraries

The classes used to create ADO.NET databases are defined in the System::Data namespace and are stored in the System.Data.dll library. If you create a Windows Forms Application from the New Project dialog box, Visual Studio .NET would automatically include the System.Data.dll library and add the System::Data namespace to your project, even if you are not creating a database application. This makes it convenient. If you are creating the application from scratch, in order to use ADO.NET, you must remember to reference the System.Data.dll library and include the System::Data namespace in your file(s).

Practical LearningPractical Learning: Accessing ADO.NET

  1. Start Microsoft Visual Studio .NET or Visual C++ .NET
  2. Create a Windows Forms Application named BCR1
  3. In Solution Explorer, expand the References node.
    Notice that both the System.ZML.dll and the System.Data.dll libraries have been included in your project
     
  4. Right-click the form and click View Code.
    Notice that the System::Data namespace has been included in your project
     
 

Home Copyright 2005 FunctionX, Inc. Next