A SQL Server user with system administrator rights is required to perform subsequent setup steps.
To create a new user with system administrator rights, perform the following steps:
In the Object Explorer of SQL Server Management Studio, navigate to the
Security folder and expand it.
Right-click the
Logins folder and choose
New Login.
The
Login - New dialog box opens.
Select the
General page, and then enter a user name in the
Login name text box.
Select SQL Server Authentication and enter a password.
Select the default database from the
Default database list.
Select the
Server Roles page, and then check the
sysadmin check box in the
Server roles list.
Select the
User Mapping page.
In the
Map column, check the check box for the database that the new login can access.
By default, the login name appears in the
User column. Leave this value.
In the
Database role membership for list, check the
db_owner check box.
Click
OK.
To create a new schema for the new user, perform the following steps:
In the
Object Explorer, navigate to the database in which you want to create a schema.
Expand the database object tree to show the
Schemas folder.
The
Schemas folder is a child of the
Security folder for the database.
For example, if you are adding a schema to the
master database, expand the following folders to show the
Schemas folder:
Databases > System Databases > master > Security.
Right-click the
Schemas folder and choose
New Schema.
In the
Schema name text box, type a name for the new schema.
The new schema name must match the name of the previously created user with system admin rights.
Assign the new user with system administrator rights as the owner of the schema.
Click
OK.
To add the schema to the database, perform the following actions:
Expand the database object tree to show the
Users folder.
The
Users folder is a child of the
Security folder for the database.
For example, if you are adding a schema to the
master database, click
Databases > System Databases > master > Security > Users.
Double-click the admin user you have just created.
The
Database User dialog box appears.
Select the
Owned Schemas page and check that the schema you have just created has been assigned to the new database.