C.2 MSDE Essentials

MSDE has been around since Visual Studio 6, and you can find additional information about using it from Microsoft at http://www.microsoft.com/sql/techinfo/development/2000/MSDE2000.asp. Table C-1 lists the differences between SQL Server and MSDE.

Table C-1. MSDE versus SQL Server


SQL Server


Storage limit


2 GB

Concurrent user limit



CPU limit

Depends on the version, typically 4 to 32.









Snapshot, merge, and transactional

Merge and transactional (subscriber only)

Graphical tools

A full suite, including tools for database design, performance tracing, and running queries

None, although you can perform some tasks through Visual Studio .NET or Microsoft Access. You can also use the command-line OSQL.exe utility or the SQL Server Enterprise Manager if it's installed.


Server license plus concurrent user license


Though MSDE lacks a graphical tool for executing SQL queries and commands, you can use the OSQL command-line utility. It allows you to execute Transact -SQL statements, system procedures, and script files interactively from a command line. Behind the scenes, the OSQL utility uses ODBC to communicate with the server.

To log on to an MSDE instance that uses integrated Windows authentication, enter the following command line:

 osql -E 

To log on to an MSDE instance that uses SQL authentication, enter this instead:

 osql -U sa 

To access an MSDE instance on another computer, enter:

 osql -S   serverName   -U sa 

Once you have logged on to the OSQL command line, you can enter SQL commands, store procedure statements, and so on (see Figure C-2). Use the go command to execute what you have entered so far, the quit command to return to exit, and the use command to specify the database you want to work with before you attempt to access its tables. For example, to view information from a table, you might enter the following commands in OSQL:

 USE Northwind SELECT * FROM Customers GO 

More information about OSQL can be found online at http://msdn.microsoft.com/library/en-us/coprompt/cp_osql_1wxl.asp.

Figure C-2. Performing a query with OSQL

ADO. NET in a Nutshell
ADO.NET in a Nutshell
ISBN: 0596003617
EAN: 2147483647
Year: 2005
Pages: 415

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net