Professional Documents
Culture Documents
Hands On How To Configure The Microsoft MSDE: Home MFC/C++ C# Architect SQL
Hands On How To Configure The Microsoft MSDE: Home MFC/C++ C# Architect SQL
Page 1 of 12
Home
MFC/C++
C#
ASP.NET
VB.NET
Architect
SQL
All Topics
ANNOUNCEMENTS
Vista API competition $10,000 in prizes Vista Mobile comp: Win a Samsung UMPC Vista Secure API comp: Win a Laptop! VB6 Interop Comp Win an Xbox Elite! Monthly Competition
Print Broken Article?
Search
Bookmark Discuss Send to a friend
Articles
Introduction
This article describes how to configure the Microsoft MSDE database engine
z z z z z z z z z z z z z z z z z z z z z z
What is MSDE? Limitations What you get How to install and configure the MSDE Arguments to the setup.exe file Using the setup.ini file Post reconfiguration Configure the server Configure the client Fire it up! How do I determine what version I am running? Create and delete a database How do I list all the databases on the system? How do I detach a database from the system? How do I attach a database to the system? How do I list all tables in a database? Database users Add a new user with SQL authentication With Win authentication How to list all users and roles in a database How to remove users from a database Exit osql
What is MSDE?
MSDE is a limited version of the Microsoft SQL Server. In short, it is the Mi the fancy UI tools, and with some limitations in the database size and the can be distributed embedded in your own applications or as a small stand businesses with less than 25 simultaneous users. The database is limited t it to a full Microsoft SQL Server without any limitations. Among the choices MSDE database is a good and affordable starting point for any business, or
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 2 of 12
Limitations
There are some limitations to a MSDE database. You dont get:
z z z z z z z z z z z z z z z z z z z z z z z z z
Failover clustering. Log shipping. Parallel DBCC. Parallel create index. Enhanced read ahead and scan. Indexed views. Federated database server. System area network support (SAN). Graphical DBA, and developer utilities and wizards. Full-text search. Analysis services. OLAP partitions. Partition wizard. Linked OLAP cubes. ROLAP dimension support. HTTP Internet support. Custom rollups. Calculated Cells. Write back to dimensions. Very large dimension support. Actions. Real-time OLAP. Distributed partition cubes. Data mining. English query.
Maximum number of processors: 2 in NT/Win2000/XP/2003, 1 in Win Maximum physical memory: 2 GB. Maximum user connections: 5 before the work load governor will lim Maximum data storage: 2 GB. Desktop embedded or network access. Leading SQL database performance. Its free. =:-)
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 3 of 12
z z
Windows authentication without network access. Windows authentication with network access. Mixed Windows and SQL mode authentication without network acces Mixed Windows and SQL mode authentication with network access.
Please use Windows authentication whenever possible. SQL mode will send network in plain text. This means it can be sniffed by intruders or hackers. more about on these web pages MSDN [1], and MSDN [2]. A default instal Windows authentication mode. Before you start the installation of the MSDE, disable Norton Antivirus and installation has completed. Norton Antivirus will not let you install the MSD In all of our examples, we will be using password for the system adminis
Mixed Windows and SQL mode authentication with network access Example 2 (Java and Win access over a network): In this example, we will be using the mixed mode authentication, because applications and Java applications over a network. The username and pass
C:\...MSDE\>Setup.exe DISABLENETWORKPROTOCOLS=0 SAPWD="password " INSTANCENAME="myinstance" SECURITYMODE=SQL
Mixed Windows and SQL mode authentication without network acc Example 3 (Local Java and Win access only): In this example, we will not be granting access from the network. Only loc mixed mode authentication for Java applications.
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 4 of 12
Windows authentication without network access Example 4 (Local Win access only): In this example, we will not grant network access to the database. We will most secure setup, and should be used for embedded MSDE applications.
C:\...MSDE\>Setup.exe SAPWD="password " INSTANCENAME="myinstance"
Here you will enter the configuration arguments. Mixed Windows and SQL mode authentication with network access Example 1 (Java and Win access over a network): In this example, we will be using mixed mode authentication, because we applications and Java applications over a network. The username and pass
[Options] DISABLENETWORKPROTOCOLS=0 SAPWD="password " INSTANCENAME="myinstance" SECURITYMODE=SQL
To install MSDE, run the setup.exe install application. Windows authentication with network access. Example 2 (Win access over a network): In this example, we will be using Win authentication, because we do not w over the network. Only Windows applications and .NET applications can ac login name and password on the client computer to login to the MSDE.
[Options] DISABLENETWORKPROTOCOLS=0 SAPWD="password " INSTANCENAME="myinstance"
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 5 of 12
Mixed Windows and SQL mode authentication without network acc Example 3 (Local Java and Win access only): In this example, we will not be granting access from the network. Only loc mixed mode authentication for Java applications.
[Options] SAPWD="password " INSTANCENAME="myinstance" SECURITYMODE=SQL
To install MSDE, run the setup.exe install application. Windows authentication without network access Example 4 (Local Win access only): In this example, we will not grant network access to the database. We will most secure setup, and should be used for embedded MSDE applications.
[Options] SAPWD="password " INSTANCENAME="myinstance"
Post reconfiguration
It is possible to reconfigure the authentication mode for an already installe database instance in the Control Panel (Administrative Tools and Service HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\myin Windows authentication, set this key to 1; for SQL authentication, set th the Control Panel (Administrative Tools and Services). Do you want to change the system administrator (sa user) passwo Login to the MSDE using the osql tool: Using Win authentication:
C:\> osql E S localhost\myinstance 1> use master 2> go 1> exec sp_password @old = null, @new = newpassword, @loginame = 's 2> go Password changed. 1>quit
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 6 of 12
C:\> osql U sa P password S localhost\myinstance 1> use master 2> go 1> exec sp_password @old = null, @new = newpassword, @loginame = 's 2> go Password changed. 1>quit
Enable the Named Pipes protocol and the TCP/IP protocol. Click on Pro configure the default port MSDE will be listening on if you want network ac
Enable the Named Pipes and the TCP/IP protocols. Click on Properties number you found with the svrnetcn.exe utility. Default is 1433. Add an alias for the Named Pipes and the TCP/IP under the Alias box applications to a specific configuration. The client just accesses the alias, a configuration.
Fire it up!
Lets start the MSDE. Open the Control Panel, the Administrative Tools and MSSQL$MYINSTANCE in the list. Right click it, and choose Start. Startu
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 7 of 12
By default, the MSDE has four databases installed. These databases are:
z z z z
Master Contains all of the system meta-data, like login accounts, master.mdf, mastlog.ldf. Tempdb Contains work tables and temporary storage. All the data tempdb.mdf, templog.ldf. Model This is a model of all databases on the system. It acts as a modellog.ldf. Msdb Used for the SQL Server Agent to schedule jobs. Files: msdb
You should not use any of these databases for any application purposes. T are out of reach, simple as that. Create a new database to store your appl Let us create a database with the name Books. First of all, you must logi dbcreator privileges. Open the osql administration utility and login as syste
C:\> osql U sa P password S localhost\myinstance
Or
C:\> osql E S localhost\myinstance
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 8 of 12
z z
NAME = Logical name used to specify the database in TSQL stateme FILENAME = Physical location of the database on the hard drive.
z z z z z
NAME = Logical name used to specify the database in TSQL stateme FILENAME = Physical location of the database on the hard drive. SIZE = Initial file size. MAXSIZE = The database maximum size. FILEGROWTH = Increments of the database file. The DB file will grow
z z z z z
NAME = Logical name used to specify the log and the database in TS FILENAME = Physical location of the log file and the database on the SIZE = Initial file size. MAXSIZE = The log and the database maximum size. FILEGROWTH = Increments of the log and the database file. The DB
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 9 of 12
C:\ >osql -E -S localhost\myinstance 1> use master 2> go 1> select name from sysdatabases 2> go name -----------------------------------master tempdb model msdb test Products (6 rows affected)
In this example, we detached a database called larsinge. The database c you want to do with the files.
In this example, we list all tables in the Products database in the myinstan type to S if you want to list out all System tables.
C:\ >osql -E -S localhost\myinstance 1> use Products
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 10 of 12
Database users
Add and grant user access to the database.
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 11 of 12
Exit osql
1> quit
Lars-Inge Tnnessen
Click here to view Lars-Inge Tnnessen's online profile.
CODBCRecordset class
CODBCRecordset class is intended to be full replacement of all ClassWizard generate
[Top]
Sign in to vo
Note: You must Sign in to post to this message board. FAQ Message sc V Msgs 1 to 25 of 86 (Total: 86) (Refresh) Subject Distribution Problem in java How can i use SQL Server2000 database without using SQL Server In java how can I grant user the swpro with system administrator permission/privilege How can I Using full SQLServer GUI tools with MSDE Re: Using full SQLServer GUI tools with MSDE MSDE runs from administrator account only [modified] Great Article msde not accepting paramters properly Change the MSDE Port
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007
Hands on how to configure the Microsoft MSDE - The Code Project - Database
Page 12 of 12
Strange Problem with MSDE 2000 Over network user id Re: user id How i can enable TCI/IP protocol Re: How i can enable TCI/IP protocol Re: How i can enable TCI/IP protocol Localized string disabling workload governor Re: disabling workload governor create view dfg using MSDE with access where can I retain the password of 'sa' without uninstalling MSDE.? where can I retain the password of 'sa' without uninstalling MSDE.? Re: where can I retain the password of 'sa' without uninstalling MSDE.? Last Visit: 3:04 Thursday 24th May, 2007 General comment News / Info Question Answer Joke / Game
The Ultimate Toolbox ASP Alliance Developer Fusion Developersdex DevGuru Programmers He
http://www.codeproject.com/database/ConfigureMSDE.asp
5/24/2007