Code written by SMO to view database information

Source: Internet
Author: User

To analyze a large database, there are too many tables in it. Although it is named in Chinese, it is still troublesome to check in management Studio 2005. For example, I want to view tables with the same field name. So I used SMO to write this stuff.CodeNot sorted. Http://files.cnblogs.com/waxdoll/dbinfo1.rar


Connect to database


View fields in tables and tables in the database, or view records in the table


View the information of a table with a specified field

What is SMO?

SQL management object (SMO) is the management object model of SQL Server 2005. SMO greatly improves the design and architecture of the SQL Server Management object model. It is a rich and easy-to-use Object Model Based on. NET Framework managed code. SMO is used to develop database management applications using. NET Framework.ProgramMain tool. In SQL Server Management studio, SMO is used in each dialog box, and each management operation executed in SQL Server Management studio can be completed using SMO.
The new SMO object model and Microsoft Windows Management Instrumentation (Wmi) application programming interface (API) replace SQL-DMO. As long as possible, SMO merges objects similar to SQL-DMO for ease of use. You can still use the SQL-DMO in SQL Server 2005, but the SQL-DMO does not contain administrative features specific to SQL Server 2005.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.