一.MSDE介绍
MSDE 2000 (SQL Server 桌面引擎,MS SQL Server Desktop Engine)是微软公司提供的一个免版税、可再分发的数据库引擎,它与 Microsoft SQL Server 2000 完全兼容。
MSDE2000体积小,系统要求低,支持SQL Server 2000其它版本的大多数功能,但不包括图形管理工具(企业管理器、查询分析器等等)。
MSDE是一种使能技术,它提供了本地的数据存储,并完全跟Microsoft SQL Server® version 7.0的代码是兼容的。这种技术将Access从一个简单的文件服务器数据库应用程序转变为一个适用于任意规模组织的、功能极强的、具有高度的可扩展性的客户/服务器解决方案。
MSDE 2000 系统要求:
1、操作系统
MSDE 2000 专为在下列操作系统中运行而设计:
Microsoft Windows 98
Microsoft Windows NT Workstation 4.0 Service Pack 5 (SP5) 或更高版本
? Microsoft Windows NT Server 4.0 Service Pack 5 (SP5) 或更高版本
? Microsoft Windows NT 4.0 Server Enterprise Edition Service Pack 5 (SP5) 或更高版本
? Microsoft Windows 2000 Professional
? Microsoft Windows 2000 Server
? Microsoft Windows 2000 Advanced Server
? Microsoft Windows 2000 Datacenter Server
? Microsoft Windows XP
? Microsoft Windows Server 2003
注意:在安装 Microsoft Internet Explorer 5.0 之前,您必须安装 Microsoft Windows NT 4.0 Service Pack 5 或更高版本。
2. MSDE和Microsoft Access性能比较
? Requirement ? MSDE ? Microsoft Access (Jet)
? Scalability
? ? ? Recommended up to 5 concurrent users (easily scales to SQL Server to obtain unlimited number of concurrent users)
2 GB of data
Transaction Logging Recommended for up to about 20 total users
2 GB of data
No transaction logging
? Ease in upgrading to SQL Server Seamless since based on the same technology: Simply detach the database via Access/MSDE and then re-attach from within the SQL Server Enterprise Manager; Preserves all stored procedures, objects, views.
EXAMPLE using Pubs database:
1) sp_detach_db ‘pubs’
2) sp_attach_db ‘pubs’, ‘C:/mssql7/data/pubs.mdf’ Access Upsizing Wizard: converts Access/Jet Table objects to SQL Server. Makes no modifications to Forms, Reports, Queries, Macros, or Security. May require some modification upon conversion.
Data Transformation Services: Imports data only.
? Business Critical 7X24 support and QFE
Point-in-time recovery
Guaranteed transaction integrity
Built-in fault tolerance
Security integrated with Windows NT No 7X24 support or QFE
Recoverable to last backup
No transaction logging
No integrated security with Windows NT
? Rapid Application Prototyping Access is UI for both engines and offers WYSIWIG database tools and built-in forms generation.
Jet and MSDE Usage Analysis
? There are four key usage criteria to consider when choosing your database engine. Let’s review them in priority order.
?
Simplicity. Jet 4.0 has the highest compatibility with Access 97 and earlier versions. If you have existing applications developed for Access, Jet is your easiest and probably best option given its compatibility with Access 97 and earlier.
Jet is easier to use and administer than MSDE, making it a good choice for new and relatively simple database applications that do not have compatibility concerns with SQL Server. It has low resources for memory and disk and requires nearly zero administration. Jet is also the default database option for Access 2000. A database created using the Jet engine can always be upsized later to SQL Server using the Upsizing Wizard although additional modification may be required.
?
? (a) Advantage – Jet
?
Data Integrity. MSDE incorporates technology from SQL Server 7. SQL Server delivers a single code base, which scales from a PC running Windows 95 to multiprocessor clusters running Windows NT Server, Enterprise Edition, offering 100% application compatibility. Jet does not have this type of scalability as it is confined to the Access product.
MSDE is a client/server data engine; Jet is a file/server data engine. The big advantage that MSDE has over Jet is that MSDE is a process that runs queries and logs transactions. If anything should go wrong during a write to the database, such as disk error, network failure or power failure, MSDE can recover as it logs transactions. After the system comes back up, MSDE will revert back to the last consistent state. This gives MSDE greater reliability than Jet. If the system were to go down with Jet, the database could be corrupt and you may need to revert back to your last backup copy.
? MSDE is the right engine for systems that involve important transactions, such as financial applications, or for mission critical applications that need to be up 24 hours per day, seven days a week, such as the Internet. The more important the database, the more likely you are to choose MSDE.
?
? (b) Advantage – MSDE
?
Number of Simultaneous Users (Performance). SQL Server 7.0, the basis for MSDE technology, can handle a very large number of simultaneous users. Jet and MSDE are optimized for individual or small workgroup solutions.
MSDE also has a performance advantage over Jet for large sets of data and many simultaneous users. Because Jet is a file-server system, the query processing must happen on the client. This involves moving a lot of data over the network for large databases. MSDE runs that same query on the server. This loads the server more, but can reduce network traffic substantially, especially if the users are selecting a small subset of the data.
If you are creating a new application for a small group of users, MSDE or SQL Server will help your application scale in the future.
?
? (c) Advantage – MSDE and SQL Server for scalability.
?
Amount of Data. Jet can handle up to 2 GB of data per MDB file. MSDE also supports 2 GB of data per database.
另外一种安装方法是利用 MSDE 中msm下的合并模块,可以将其无缝的集成到自己的msi安装程序里。
步骤如下:
备注:所有 Visual Studio .NET 开发产品都提供 Windows Installer 软件。
1. 启动 Visual Studio .NET。
2. 新建一个安装项目。
a. 在文件 菜单上,指向新建,然后单击项目。将出现“新建项目”窗口。
b. 在“项目类型”树中,单击安装和部署项目 节点,然后在右窗格中的“模板”窗口下,单击安装项目。
3. 键入该项目的名称和位置,然后单击确定。
备注:确保解决方案资源管理器在 Microsoft 开发环境中处于打开状态。若要打开它,请在查看 菜单上单击解决方案资源管理器。
4. 将该项目的搜索路径设置为 MSDE 合并模块所在的文件夹:
a. 在解决方案资源管理器中选择该安装项目。
b. 在“属性”窗口中,找到SearchPath 项。
备注:如果“属性”窗口未打开,请在查看 菜单上单击属性窗口。
c. 键入 MSDE 合并模块所在位置的完整路径。通常,该路径为 X:/MSDE/MSM 和 X:/MSDE/MSM/1033,其中 X 是光盘驱动器的驱动器盘符。
备注:应考虑到依存项,这很重要。某些合并模块要求其他合并模块(这些模块称为依存项)也在该项目中才能正确生成安装程序包。
7. 添加完所有必需的合并模块后,就可以生成 Windows Installer 程序包了:
a. 在解决方案资源管理器中单击该项目。
b. 在 Microsoft 开发环境中的生成 菜单上,单击批生成。这将在第 4 步中指定的位置生成并创建一个 MSDE 2000 Windows Installer 程序包。