简体   繁体   English

在SQL Server 2005/2008的对象资源管理器中看不到表

[英]Cannot see table in Object Explorer, SQL Server 2005/2008

This may be a dumb question. 这可能是一个愚蠢的问题。 But I just received permissions to read/write to this DB. 但是我刚刚获得了对该数据库进行读/写的权限。 I see the tables of the DB, except for one. 我看到数据库的表,除了一个。 I can select from it, But I cannot see it in the Object Explorer. 我可以从中选择,但是在对象资源管理器中看不到它。 I restarted my computer, refreshed the object explorer and everything. 我重新启动计算机,刷新了对象浏览器以及所有内容。 Is there a restriction on viewing this table? 查看此表是否有限制?


I"m so sorry I had to check the connection of the query. I was looking at two different versions of the same DATABASE. gosh. Should I take this question down? 很抱歉,我不得不检查查询的连接。我正在查看同一数据库的两个不同版本。天哪。我应该把这个问题记下来吗?

Could it be a synonym, or a view? 可以是同义词,还是视图? Check under the synonyms node and the views node. 检查同义词节点和视图节点下。 Also check the schema... if you are just saying SELECT * FROM table, try with SELECT * FROM dbo.table. 还要检查架构...如果您只是在说SELECT * FROM table,请尝试使用SELECT * FROM dbo.table。 It may be under a different schema. 它可能处于不同的架构下。

The query 查询

SELECT type, type_desc FROM sys.objects WHERE name = 'my_table_name'

should tell you what type of object your table really is. 应该告诉您表实际上是什么类型的对象。

You need to use the schema name in your create table query(eg. dbo.table name). 您需要在创建表查询中使用架构名称(例如dbo.table名称)。 By default it is getting created under your local server and hence it is available for you when you use the select query but once you check on server ita is not available. 默认情况下,它是在本地服务器下创建的,因此,当您使用选择查询时,它可供您使用,但是一旦检查服务器ita就不可用。

如果所有其他方法均失败,请右键单击“表”,然后单击“刷新”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM