Why is my new schema not showing in the table properites pane?

孤人 提交于 2019-12-06 22:49:54

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4316233/why-is-my-new-schema-not-showing-in-the-table-properites-pane

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!