Transferred from: Leo_wlcnblogs
SQL Server functions explained by some common DLLs
If your SQL Server is installed in the C drive, the following path is the storage path of the corresponding SQL Server version of the common DLL
C:\Program Files\Microsoft SQL Server\90\sdk\assemblies\
C:\Program Files\Microsoft SQL Server\100\sdk\assemblies\
C:\Program Files\Microsoft SQL Server\110\sdk\assemblies\
You can see that as the SQL Server version is upgraded, these public DLLs are getting more and more, because SQL Server functions more and more.
What is the use of these DLLs??
These DLLs are intended for SQL Server, because these public DLLs are useful in many of the SQL Server components, so SQL Server puts these
DLL put to X: \program Files\Microsoft SQL Server\x\sdk\assemblies\ folder for other SQL Server components to invoke
For example, SSIS, SSAS, Database engine, and other tools
In fact, from the folder path name we can know the role of these DLLs:sdk\assemblies\
We do not know the meaning of the SDK can Baidu a bit, but maybe everyone is more dependent, I will put it out
The SDK (software Development Kit, or software development kit) is typically used by software engineers for specific packages, software frameworks, hardware platforms, operating systems, etc.
A collection of development tools to build the application software.
Senior programmers must know the role of the SDK, he is a software provided to us programmers to develop some of the interface or API
I think X: \program Files\Microsoft SQL Server\x\sdk\assemblies\ folder These DLLs are not just provided to SQL Server calls
We can also call these DLLs to develop some related software and tools for SQL Server database
In the garden, the contacts Warrior uses the following two DLLs to make: (blood sharing) use. NET Generate database table creation script, similar to SQL Server writing table's create statement
Another example of this post: in C # do a, sqlServer2005 inside that event monitor the same program, start the problem please help to see
Use the Microsoft.SqlServer.ConnectionInfo.dll DLL as a tool similar to SQL Trace to see the executed scripts and other information in real time
Sqldoc Sharp (SQL Server database document generation tool)
This tool can be downloaded on CodeProject:http://www.codeproject.com/Articles/35790/SQLDoc-Sharp
The following DLL is used
What languages are common DLLs written in?
We can see that the tools in the three examples above are used. NET-written tools, including Sqldoc Sharp are Winfrom software written in. Net
We use Ilspy this software to decompile each SQL Server version of the next DLL
Drag all DLLs into the Ilspy.
SQL2008 There are two DLLs are not able to decompile, respectively, are redist_tsqllanguageservice.dll and Redist_dacframework.dll
SQL2012 inside only one DLL is not able to decompile, is redist_tsqllanguageservice.dll
DLLs that cannot be deserialized are probably written in C or C + +
I estimate that these DLLs that cannot be deserialized will not provide the API functionality to the user, only to SQL Server, and these DLLs are critical to the performance of SQL Server
So write in C or C + +
From the above to decompile these DLLs, SQL Server has a large part of the components or code is written in. Net.
In addition to some key features or performance-related functional components written in C or C + +
Here, from the other side, you can see that Microsoft is right. NET, from SQLSERVER2005 began to use. NET to write a number of component code
It can be seen from the above three examples why they are preferred. NET to write these tools, because these common DLLs are inherently. NET DLLs (managed code)
Simple Introduction to DLLs
Limited to my ability is limited, I will simply introduce more familiar DLLs, other unfamiliar you can check MSDN or Baidu
I will give some DLL information and check Baidu, MSDN results
I only introduce SQLSERVER2012, because SQLSERVER2012 is quite complete, but some features will change in different SQL Server versions.
For example, in the second example above: in C # do a, sqlServer2005 inside that event monitor the same program, boot problems please help to see
It says TMO. This class changes in the SQL2005 version of the SDK and the SQL2008 version of the SDK, resulting in a run-time error
Using trace Management object to monitor and diagnose SQL Server (i)
In SQL Server 2005, the TMO object is implemented in the Microsoft.SqlServer.ConnectionInfo.dll,
In SQL Server 2008, the TMO object is moved to the Microsoft.SqlServer.ConnectionInfoExtended.dll,
But still in the Microsoft.SqlServer.Management.Trace namespace.
Similar to the above changes in the API I will not say, we develop the time must be clear MSDN and Baidu, do not make mistake, because these SDK documents relatively few
Most of them are e-text, and they're more likely to develop headaches.
Don't talk nonsense, start ~
SSAS, Data Warehouse-related interfaces
Kpi class: Http://technet.microsoft.com/zh-cn/library/microsoft.analysisservices.kpi.aspx
This DLL is called by various exception dialogs in SQL Server
Related interfaces for SSRS
Smo:sqlserver managing Objects
Monitor SQL Server or connect to SQL Server for
Provides the SMO object functionality, which is the abbreviation for SQL Server Management ojbects, a management object provided by SQL2005
As long as SQL Server Management Studio can implement something, it can be implemented with SMO, because SQL Server Management Studio is developed with SMO.
If you have enough power, you can develop a tool that defies SQL Server Management Studio, such as the ability to add IntelliSense
To support the management of SQL Server, Integration Services provides an enumerator over the objects that can traverse the SQL Management Object (SMO).
For example, a package can use the SMO enumerator to perform the same management function for each job in a jobs collection in a SQL Server installation.
Data Transformation Services (DTS) data transfer service-related DLLs
DLL required to register the server
Utility: Utility class represents a control point (UCP)-defined SQL Server to manage the methods and properties of one or more remote SQL instance instances
utilityenum: The Microsoft.sqlserver.management.utility namespace contains classes that represent SQL Server utility objects
http://msdn.microsoft.com/zh-cn/library/ee242093 (v=sql.110). aspx
Http://technet.microsoft.com/zh-cn/magazine/microsoft.sqlserver.management.utility (sql.105). aspx
Extended event-related DLLs
XEvent: Creating and Using SQL Server extended events in SQL Server client components and servers-side components through the common object model
Extended event Infrastructure supports dependency of SQL Server event data
In some cases, the infrastructure can also be used to get relevant data from the data viewing applications and operating systems
OLAP system-related DLLs
RMO: Replication Management Objects
IIS exception thrown by Microsoft.SqlServer.Replication.dll
Servicebroker DLLs for related technologies
DLLs related to WMI (Windows Management Instrumentation,Windows Management Instrumentation )
Open the SQL Server Configuration Manager prompt: Unable to connect to the WMI provider. You do not have permission or the server cannot access it.
Note that you can only use SQL Server Configuration Manager to manage SQL Server 2005 servers.
How to add WMI alert in SQL Server
SecureString This class has a lot of string-related C # functions
The code inside this class
Handling DLLs related to SQL Server data types
The Microsoft.SqlServer.Types namespace contains classes that handle hierarchies and special data types, such as geometry and geographic data types
Ask how to apply Microsoft.SqlServer.Types namespaces
There are many management objects in SQL Server, such as SMO, RMO, TMO
Tmo:trace Tracking Management Objects
You can invoke the APIs provided by these management objects during development to develop the corresponding database functions.
Unfortunately, I haven't found out how many of these management objects are in SQL Server
The features of each object, no detailed documentation, and little information on the web
In C # do a, sqlServer2005 inside that event monitor the same program, start the problem please help to see
Dedicated connection DAC for SQL Server database administrator
SQLSERVER2005 installation directory structure (bottom)
You can see some of SQL Server's functional component DLLs under X:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn Path
Some are not very important functional components such as Database Mail (DatabaseMailengine.DLL) are written using. Net
And some important functional components such as batch interpreter (BATCHPARSER90. DLL) is written in a non-. NET language, so the components you use Ilspy are not compiled
In fact, we are free to study these DLLs
such as Dbghelp. DLL This DLL should be used to generate a dump file memory dump file and cannot be deserialized
Have time to study the SQL Server code written in. NET you'll reap the rewards.
If there is a wrong place, welcome everyone to shoot brick O (∩_∩) o
Go SQL Server functions explained by some common DLLs