October 16, at pm However, I do have many years as a DBA, but for other engines. The message is reasonable - there is no such table in the database.
In trying to track down the issue, I performed these tests: use [test] go dbcc showcontig 'dbo. Using the table name without the "dbo" returns the same message. However, the select returns a record! This table is NOT in the tables list in the database! Can sysobjects get out of sync with the real objects that exist? I did have the wrong owner it is "Adage". Running the showcontig with that dbo works.
That solves that mystery. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Yes No. Any additional feedback? Skip Submit. 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.
TechRepublic's free SQL Server newsletter, delivered each Tuesday, contains hands-on tips that will help you become more adept with this powerful relational database management system.
Automatically subscribe today!
0コメント