How To Change Schema Name in SQL Server
In the previous article “How To Create Database User in SQL Server“, we seen how to create database user and assigned a default schema db_owner. Now, In this article we will learn how to change default schema db_owner to database owner schema dbo.
Step-I: Open SQL Server Management Studio and click on Connect button.
Step-II: Expand Database (HR in this demo) for which you want to create user and then expand Security tab by clicking on +icon as below.
Step-III: Expand Users tab and then right click on the user name DB_User in the Security tab as follows.
Step-IV: Database User window will appear with the Default Schema db_owner which we assigned at the time of user creation and click on […] next to the Default schema.
Step-V: A Select Schema window will appear. Click on Browse… button
Step-VI: Check mark the Schema type which you want to assign. I am going to replace db_owner with [dbo] schema type and click on OK button.
Step-VII: Select Schema window filled with the new schema name, and click on OK button.
Step-VIII: Default schema name is replaced with the new schema. Click on OK button.