为什么我的新架构没有显示在表属性窗格中?

发布于 2024-10-04 20:04:40 字数 375 浏览 1 评论 0原文

我正在使用 SQL Server 2008 Express 和 Sql Server Management Studio 2008。

我试图将数据库表与新架构关联起来。

我通过导航到对象资源管理器中的“安全”->“架构”创建了一个新架构。我右键单击该文件夹并创建一个名为“People”的新架构,并将所有者设置为 db_owner。这个新架构现在出现在对象资源管理器中。

我现在想将一个表与该架构关联起来。我在设计视图中打开表,然后单击表“属性”窗格中的下拉列表,其中包含可用架构,但我新创建的架构不可见。

我尝试刷新对象资源管理器中的所有内容。关闭设计视图并重新打开等,但它仍然不存在。

我做错了什么吗?

有人能指出我正确的方向吗?

I am using SQL Server 2008 Express and Sql Server Management Studio 2008.

I am trying to associate a database table with a new schema.

I have created a new Schema by navigating to Security->Schemas in object explorer. I right clicked on the folder and created a new schema called 'People' and set the owner as db_owner. This new Schema now appears in object explorer.

I would now like to associate a table with this schema. I open the table in design view and click on the drop down list in the table Properties pane which contains the available schemas but my newly created schema is not visible.

I have tried refreshing everything throughout object explorer. Closing design view and reopening etc. but still it isn't there.

Am I doing something wrong?

Can anyone point me in the right direction please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

何止钟意 2024-10-11 20:04:40

排序……以最可笑的方式。

显然,在每个层次级别刷新对象浏览器是不够的。

我必须关闭 sql management studio,然后重新打开它。然后,模式列表成功刷新,并允许我将新的自定义模式与表关联起来。

在我看来,这是垃圾。

Sorted... in the most ridiculous way.

Apparently refreshing object browser at every hierarchical level is not sufficient.

I had to CLOSE sql management studio, then re-open it. The list of schemas had then managed to refresh and would allow me to associate my new custom schema with the table.

IMO this is rubbish.

染火枫林 2024-10-11 20:04:40

第 1 步:

打开新查询(或现有查询窗口)。 Ctrl+Shift+R 在查询窗口中。它将刷新智能缓存或

编辑>智能感知>刷新本地缓存

同时检查是否启用了 IntelliSense

工具>选项>文本编辑器> Transact-SQL >启用智能感知

第 2 步:

刷新 F5 对象资源管理器。

它对我有用

堆栈溢出的类似答案

Step 1:

Open New Query(or existing query window). Ctrl+Shift+R in query window. It will refresh the intellisence cache or

Edit > IntelliSense > Refresh Local Cache

Also check if IntelliSense is enabled in

Tools > Options > Text Editor > Transact-SQL > Enable IntelliSense

Step 2:

refresh F5 the Object Explorer.

it worked for me

Similar Answer on stack overflow

绮烟 2024-10-11 20:04:40

当您说“在设计模式下打开表格,然后单击下拉列表”时,我没有关注您。我一定是忽略了 SQL Express 上的列表。

您是否尝试过通过 TSQL 更改架构?该命令很短:

ALTER SCHEMA "target schema" TRANSFER "source schema"."table name";
GO

用您的架构名称替换目标和源架构。

I am not following you when you say "open the table in design mode then click on the drop down list". I must be overlooking the list on my SQL Express.

Have you tried to change the schema via TSQL? The command is short:

ALTER SCHEMA "target schema" TRANSFER "source schema"."table name";
GO

Replace target and source schema with your schema names.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文