SQL Server – How to Set AUTHORIZATION on CREATE SCHEMA

schemasql serversql-server-2016

I'm looking to create a new schema for an existing database, which currently only uses the dbo schema. I'm after advice on how to set the AUTHORIZATION (owner name) and what affect this will have.

1. Should I create a new user for this or can I use the dbo user?

I notice the existing Database Roles in the database are owned by the dbo user.

2. If I set the AUTHORIZATION to a new user will I need to create new Database Roles owned by the new user?

I've also noticed the Default schema for existing Users is the dbo schema.

3. Will I need to create new Users with a default schema set to the new schema?

My main reason for creating the new schema is to separate the database objects by name rather than for permissions. I intend on granting certain existing Users access to specific database procedures on the new schema as we do for database procedures on the dbo schema.

Best Answer

You do not need to create a new user to be owner of the schema.

The default dbo owner is fine, especially if your adding the schema for organization reasons rather then security.

You do not need to create new users to access the new schema.

The only thing I would add is to make sure if you do change the owner from dbo, you change it to a domain service account or other permanent sql account. If the user gets deleted it can cause issues accessing the schema.