Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

Database Configurations for users Step by Step Guide

Part I: General database property settings

The General settings for the database can be configured at the time of creating the database or
changed after the database has been created.

1. Setting the properties when creating the database.


A. Under the General tab you need to give the database a name. Check if you need to increase
or decrease the size for Autogrowth. If necessary you can also change the path where your
database files will be stored.
B. Under Options tab you need to consider configuring the following based on the business
requirements for your application. If you do not understand what these concepts mean
please use Online Help and search for these terms:

Recovery Model: Full, Bulk-logged or Simple


Compatibility Level: 2000, 2005 or 2008.
Auto Shrink: true or false
Database Read-Only: true or false
Encryption Enabled: true or false
Restrict Access: Single_user, Multi_user or Restricted_user

You do not need to configure Filegroups at this stage.


2. Change database property settings

A. Right click your own database and select Property.


B. You should see the DB Property settings (tabs on the left).

C. You do not have to change the properties under the General tab at this stage as they are
revered properties.
D. The Files tab allows you to change the same settings as when you are creating a new database
(see above 1A)
E. Leave the Filegroups settings as they are.
F. See 1B for Option tab settings.
G. The only tab left to configure is Permissions which will be explained in the next section.
H. Leave all other tabs with default settings.
Part II: User Access configurations

1. Preparation

A. Right click the Server node and select Properties.


B. Change the Server authentication method to “SQL Server and Windows Authentication mode if
original setting used Windows Authentication mode only.

C. Now you are ready to create a new Login account for the user. Depending on how many types
of users who need to use the application you are developing you need to put them into groups
because some users can share the privilege settings as members of the same group.

The following demonstrates how permissions can be set up for a user / role (e.g. Property manager)
to access two tables only in the database with rights to view data only. You need to draw a plan with
a mapping between the user and the securables in the following format:

User 1 can view, insert, delete data from table Properties.

Property manager can view, add, modify, delete data in Properties table.

Property manager can view data in projects table only.


2. Create a new login account
A. From the Logins folder under Security for the SQL Server, right click to create a new login
account for Property manager.
B. General tab settings for the login account: login name, SQL authentication password, enforce
password policy (ticked), enforce password expiration (ticked), User must change password
at next login (ticked), default database (the database you wish to give property manager the
access to) and default language (British English).
C. Server Role tab settings: As the property manager is only a user of a given database
HouseOnline without responsibilities of managing the serer the default setting PUBLIC is
adequate.
D. Under the User Mapping tab the property manager is mapped to HousingOnline database
and given the membership for db_datareader, db_datawriter, myapp1 (the VB application)
and public.
E. Now it is time to set permission to “securables” at Server level. Click on Search and choose
“Specific objects”, click OK.
F. The permission at server level to Property manager has been set to Connect SQL and View
any databases.
G. Lastly check the Status which should look like this. So much for the creation of a new login
account for Property Manager.
3. Configuring the Property manager as a “database user”.
A. More than likely the user has been automatically created to access your database because
when the login was created you allowed the Property Manager to view all databases. To
verify this go to Databases / Security / Users / to see if Property Manager already exists.

If it does Right click Property Manager user and open the Properties tab.
B. Set default schema as db_datareader and tick the boxes for db_datareader and db_datawriter
under “Schemas owned by this user; “Database role membership” boxes are already set to be
ticked when setting the login for Property Manager.
C. To add securables in the list you need to use “Search” as below. Select “table” as the object
types.
D. Choose table only.
E. Browse list of tables in the database.

F. Select the tables you wish the Property Manager to access.


G. Tick “select” only for Projects table as PM is only allowed to view the table.
H. Tick “Delete, Insert, Select, Update” for Properties table as you would allow PM to do these
actions to the table as prescribed earlier in the definition of access privileges.

You’re done. Hope this document helps with the database configuration part of your assignment. If
any queries please contact your tutor.

You might also like