Where is sysobjects




















Related useful system views Subsets of the objects can be viewed by using system views for a specific type of object, such as:. The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission.

For more information, see Metadata Visibility Configuration. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Recounts the changes in the schema of an object and and updates schemacnt. Count of changes in the schema of an object incremented if a rule or default is added.

ID of first check constraint on the table. The version timestamp of the last schema change for this object used by Replication Server. Login name of the user who created the object. Maximum burned value for identity column if any in this object The identburnmax column is stored in an internal format.

The object is logged. The object flagged by recovery as possibly damaged; run dbcc. Checked by opentable. The object is an external table, such as Stratus VOS files. Tags a system table that will have its index es re-created. Table has more than one check constraint. In most cases, the two columns most useful to you will be sysobjects. The former lists the names of the objects in question, while the latter identifies the type of object, using the following codes:.

In the case of triggers, three other columns that identify the type of trigger are of interest: deltrig, instrig, and uptrig. In the special case of triggers, which are owned by their parent table, you might want to interrogate the database using a self-join, like this:.

In SQL Server , the preferred technique is to use the system views. This approach will insulate your queries from any changes that Microsoft might choose to make to the system tables. Run this query against the AdventureWorks database or any of your own databases to produce a quick list of the tables.

In order to illustrate the power of these schema queries, look at the following statement, which will list all functions and procedures within the selected database:.

There are 20 such Information Schema views. If you need to document your database and who doesn't and cannot afford a commercial solution such as ones offered by Red Gate or Apex, then by using these views and a little experimentation, you can ask SQL Server to document itself.



0コメント

  • 1000 / 1000