DBObject Object

后续版本的 Microsoft SQL Server 将删除该功能。 请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。

The DBObject object represents properties of a Microsoft SQL Server database object, such as a table or stored procedure.

显示当前对象的 SQL-DMO 对象模型

注释

The DBObject object is used as a parameter to the GetObjectByName method of the Database object and the AddObject method of the Transfer object.

You can use the DBObject object to refer to SQL Server defaults, rules, stored procedures, tables, triggers, user-defined data types, and views.

With the DBObject object, you can:

  • Query a database by object name to determine whether the specified object exists.

  • Add a list of SQL Server database objects to a script transferring objects and data from one SQL Server database to another.

  • Determine the dependencies on a named SQL Server database object.

  • List the permissions granted on a named SQL Server database object.

The Name property of the DBObject object refers to the name of the selected Database object. Database object names are defined with the SQL Server data type sysname, and the value of the Name property of theDBObjectmatches the specification of sysname.