Http://support.microsoft.com/SCID = KB; ZH-CN; 326613 & spid= 2852 & SID = 676sql-dmosql-dmo is a set of objects that help you manage SQL Server programmatically. SQL-DMO is a DLL-implemented dual interface, in-process Component Object Module (COM) server. When creating a SQL-DMO application, you can develop an operating system using any OLE Automatic Controller or using a C or C ++ COM Client. RequirementsThe SQL-DMO client requires one of the following operating systems:
• |
In Microsoft Windows 2000 |
• |
Microsoft Windows NT 4.0 (Service Pack 5 or later) |
• |
Microsoft Windows 98 or Microsoft Windows 95 |
In addition, the SQL-DMO client requires Microsoft SQL Server ODBC driver version 2000 or later that is attached to SQL Server 3.80. For more information about SQL-DMO system requirements, visit the following Microsoft Website: Http://msdn.microsoft.com/Library/default. asp url =/Library/en-US/sqldmo/dmoref_ Con01_9xbn.asp (http://msdn.microsoft.com/Library/default. asp url =/Library/en-US/sqldmo/dmoref_ Con01_9xbn.asp)Note:: The SQL-DMO distribution package created in this article can process files covered by Windows File Protection. For example, sqlunirl. dll is one of these files. Therefore, if sqlunirl is included in the deployment package. if the dll version is newer than the version on the target system, the SQL-DMO package may not be correctly deployed on some versions of Windows operating systems, such as Microsoft Windows XP.
SQL-DMO ComponentsThe SQL-DMO contains the following files:
File Name |
Description |
Sqldmo. dll |
DLL for implementing SQL-DMO objects |
Sqldmo. rll |
DMO resource file |
Sqlresld. dll |
SQL Enterprise Manager resource DLL Loader |
Sqlsvc. dll |
Database Service Layer |
Sqlsvc. rll |
Database Service Layer resource DLL |
Sqlunirl. dll |
SQL Server Unicode/ANSI Conversion Layer |
W95scm. dll |
SQL Service Control Manager Abstraction Layer |
How to package the SQL-DMO ComponentsYou can distribute SQL-DMO by including each file listed in the SQL-DMO components section in the distribution package.
Package SQL-DMO files one by one
1. |
Start Microsoft Visual Studio. NET. |
2. |
Create an installation project:
A. |
On the File menu, point to new and click Project ". The Create Project dialog box is displayed. |
B. |
Under "project type", click "Install and deploy project ". |
C. |
Under "template", click "install project ". |
D. |
Click OK ". |
|
3. |
Add the following files to the installation project:
• |
Sqldmo. dll |
• |
Sqldmo. rll |
• |
Sqlresld. dll |
• |
Sqlsvc. dll |
• |
Sqlsvc. rll |
• |
Sqlunirl. dll |
• |
W95scm. dll |
The following table lists the names and default locations of each file:
File Name |
Location |
Sqldmo. dll Sqlresld. dll Sqlsvc. dll W95scm. dll |
Installation drive: Program filesmicrosoft SQL server80toolsbinn |
Sqlsvc. rll Sqldmo. rll |
Installation drive: Program filesmicrosoft SQL server80toolsbinnresources1033 |
Sqlunirl. dll |
Installation drive: Winntsystem32 |
|
4. |
Run the sqldmo. dll fileRegisterProperty value changedVsdrfcomselfreg:
A. |
In Solution Explorer, click "sqldmo. dll ". |
B. |
In the "properties" window, click "vsdrfcomsel" in the "register" listFreg ". |
|
5. |
Change the installation folder of the sqlunirl. dll file to the system folder. For example, change the installation folderInstallation drive: Winntsystem32 folder orInstallation drive: Windowssystem folder.
A. |
In Solution Explorer, click Install Project |
B. |
On the View menu, point to the editor and click File System ". |
C. |
On the "operations" menu, point to "add special folder", and then click"System folder ". |
D. |
In Solution Explorer, click sqlunirl. dll ". |
E. |
In the Properties window, click system folder in the folder list ". |
|
6. |
On the generate menu, click GenerateProject nameTo generate the installation project. |
|