Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 941
Lewray Avatar asked Nov 30 '10 16:11

Lewray


People also ask

How do I add a schema to a table?

To create a schema In Object Explorer, expand the Databases folder. Expand the database in which to create the new database schema. Right-click the Security folder, point to New, and select Schema. In the Schema - New dialog box, on the General page, enter a name for the new schema in the Schema name box.

How can you see the schema of the table?

To show the schema, we can use the DESC command. This gives the description about the table structure.

How do you update a table schema?

To change the schema of a table by using SQL Server Management Studio, in Object Explorer, right-click on the table and then click Design. Press F4 to open the Properties window. In the Schema box, select a new schema. ALTER SCHEMA uses a schema level lock.

How do I show schema in SQL Server?

You can get a list of the schemas using an SSMS or T-SQL query. To do this in SSMS, you would connect to the SQL instance, expand the SQL database and view the schemas under the security folder. Alternatively, you could use the sys. schemas to get a list of database schemas and their respective owners.


1 Answers

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.

like image 131
Lewray Avatar answered Jan 02 '23 05:01

Lewray