How to install and to configure MSDE 2000 for ASP.NET applications (872905)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition

INTRODUCTION

This step-by-step article describes how to obtain and to install Microsoft SQL Server Desktop Engine (also known as MSDE 2000). This article also explains how to include the Pubs database, and this article includes commands that are used to grant permissions for the ASPNET account so that the ASPNET account can access the server and the Pubs database.

Install MSDE 2000

MSDE 2000 is a free downloadable and redistributable version of SQL Server. MSDE 2000 can be used in client applications or in Web applications. You can obtain MSDE 2000 from the Microsoft Download Center. To download MSDE 2000, visit the following Microsoft Web site:To install MSDE 2000 on your computer, follow these steps:
  1. Locate the Sql2kdesksp3.exe file that you downloaded to your computer.
  2. Double-click the Sql2kdesksp3.exe file to extract all the MSDE installation files to a folder. By default, the path is C:\Sql2ksp3\Msde.
  3. Click Start, and then click Run. The Run dialog box appears.
  4. Type cmd in the Open box, and then click OK. The Command Prompt window appears.
  5. Change to the folder where you saved the installation files, and then run the following command:

    Setup.exe /qb+ INSTANCENAME=VSDOTNET DISABLENETWORKPROTOCOLS=1 SAPWD=YOUR SA PASSWORD

    Note YOUR SA PASSWORD is a placeholder for your password.

Include the Pubs database

This MSDE 2000 does not contain the sample Pubs database. The Pubs database is included in Microsoft .NET Framework Software Development Kit (SDK) samples. To include the database, run the following command at the command prompt:

OSQL.EXE -E -S COMPUTER_NAME\VSDOTNET -i "DRIVE:\PATH\instpubs.sql" -o C:\instpubs.out

Notes
  • COMPUTER_NAME is a placeholder for your computer name.
  • DRIVE is a placeholder for the hard disk drive where you have installed Visual Studio .NET.
  • PATH is a placeholder for the path of the Instpubs.sql file.

    In Microsoft Visual Studio .NET 2003, the default location is the following:

    SDK\v1.1\Samples\Setup

    For Microsoft Visual Studio .NET 2002 the Instpubs.sql file is available in the following location:

    FrameworkSDK\Samples\Setup

Grant permissions to the ASPNET account

To grant permissions to the ASPNET account so that the ASPNET account can access the server and the Pubs database, follow these steps:
  1. Start the MSSQL$VSDOTNET service:
    1. Click Start, and then click Run. The Run dialog box appears.
    2. Type services.msc in the Open box, and then click OK. The Services window appears.
    3. In the right pane, right-click MSSQL$VSDOTNET under Name, and then click Start.
  2. un the following command at the command prompt to grant permission to the ASPNET account so that the ASPNET account can access the server:

    osql -E -S COMPUTER_NAME\VSDOTNET -Q "sp_grantlogin 'COMPUTER_NAME\ASPNET'"

    Note COMPUTER_NAME is a placeholder for your computer name.
  3. Run the following command at the command prompt to grant permission to the ASPNET account so that the ASPNET account can access the Pubs database:

    osql -E -S COMPUTER_NAME\VSDOTNET -d Pubs -Q "sp_grantdbaccess 'COMPUTER_NAME\ASPNET'"

    Note COMPUTER_NAME is a placeholder for your computer name.

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:

Choosing and using MSDE 2000 as the database engine for your application
http://msdn.microsoft.com/library/en-us/dnmsde/html/msderoadmap.asp

MSDE 2000 walkthrough: Build a data-driven Web site using Visual Basic .NET and Visual Studio .NET 2003
http://msdn.microsoft.com/library/en-us/dnmsde2kwrk/html/mypicsvbvs.asp

osql utility
http://msdn.microsoft.com/library/en-us/coprompt/cp_osql_1wxl.asp

For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

301413 "Configuring SQL Server 2000 Desktop Engine" white paper for Access 2002 available in Download Center

321518 When to choose MSDE 2000 as the database engine for your application


Modification Type:MinorLast Reviewed:11/4/2005
Keywords:kbDatabase kbDeployment kbaccounts kbHOWTOmaster kbpermissions kbhowto KB872905 kbAudDeveloper