patternsqlMinor
What determines the default schema name in SQL Server?
Viewed 0 times
thewhatsqldeterminesdefaultnameserverschema
Problem
when I tried to create a table, it is using my ID as the schema name. But when the table is created on my manager's computer, the schema name is "dbo". Why? He might have administrator rights. When I tried to rename by using sp_rename, it is not changing.
Solution
In SSMS go to your database user and click on properties. You will see a field there for default schema.
T-SQL version:
T-SQL version:
alter user YourDbUser
with default_schema = YourNewSchemaCode Snippets
alter user YourDbUser
with default_schema = YourNewSchemaContext
StackExchange Database Administrators Q#11275, answer score: 7
Revisions (0)
No revisions yet.