0% found this document useful (0 votes)
5 views

06_FFI_Database_Admin_Exercise

The document outlines exercises for database administration, including creating an FFI database, adding users and roles, backing up and restoring a database, and notes on managing databases. It provides step-by-step instructions for each exercise, emphasizing the importance of backups and user role management. Additionally, it discusses limitations and procedures for moving databases to new servers.

Uploaded by

japariciofdez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

06_FFI_Database_Admin_Exercise

The document outlines exercises for database administration, including creating an FFI database, adding users and roles, backing up and restoring a database, and notes on managing databases. It provides step-by-step instructions for each exercise, emphasizing the importance of backups and user role management. Additionally, it discusses limitations and procedures for moving databases to new servers.

Uploaded by

japariciofdez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Database Administration Exercises

In these exercises you will:


1) Create an FFI database
2) Add users and roles
3) Backup a database
4) Restore a database
5) Review notes about the Database Administration module

Exercise 1: Create a database


1.1 Double click the FFI Database Administration icon on you desktop.
1.2 In the tree view of the Database Manager window, highlight the name of the SQL
server instance.

Database Administration - 1 of 13
Database Administration Exercises

1.3 In the Server pull-down menu, select Create Database. Select FFI.

1.4 Enter the name “FFI_training” and click OK.

A progress bar and giant black DOS window will appear. Do not close these windows while the
database is created.

Database Administration - 2 of 13
Database Administration Exercises

1.5 Expand the tree on the left and highlight your new database. Review its
properties in the right-hand pane.

• Creation date, name, owner, and size.


• Database type - FFI.
• Schema module name and version.
• SQL server name and user ID.

Database Administration - 3 of 13
Database Administration Exercises

Exercise 2: Adding users and roles


FFI administrators and managers can assign and modify or delete user roles for a
database. Managing user roles helps to ensure the integrity of the database by allowing
users access to only the tools and functions that they require to do their work. In this
exercise, you will work with users and roles.
2.1 Select the database “FFI_training” in the tree view of the Database Manager. In
this example, a new user is being added.
2.2 Click Add User in the Database pull-down menu.

Database Administration - 4 of 13
Database Administration Exercises

2.3 Enter a name and password for the new user, and click Save.

NOTE: Select a password that you can easily remember, since it cannot be retrieved if it is
forgotten.

2.4 To add a Role for the new user select “FFI_training” in the tree view of the
Database Manager and click Add Role in the Database pull-down menu.

Database Administration - 5 of 13
Database Administration Exercises

2.5 Enter the name of the user and select the role “Manager” in the pull-down listing.
Click Save.

2.6 Addition of the user's new role is confirmed. Click OK to close the confirmation
window.

Database Administration - 6 of 13
Database Administration Exercises

Exercise 3: Back up a database


The Backup Database command creates a backup copy of the selected database and
files it in the folder:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup.
It is the user’s responsibility to ensure that those files are, in turn, backed up to a secure
location. If disc space becomes an issue, you may choose to move all or some of these
files to another location.
NOTE: Database backup must be done by an FFI administrator or manager, and can
only be done within the Admin module.
NOTE: Back up your databases often! A deleted database cannot be recovered, but you
can restore a database from a backup file.
To back up a database:
3.1 In the Database Manager tree view, highlight the name of the database.
3.2 Click Backup Database in the Database pull-down menu.

Database Administration - 7 of 13
Database Administration Exercises

3.3 After a moment or two, a confirmation box opens. Note the name of the backup
file and click OK.

NOTE: The default location for backup files is C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Backup.

Exercise 4: Restore a database


A backed-up database can be restored if it is inadvertently deleted or damaged. You
must hold an administrative role to restore a database.
4.1 Highlight the name of the SQL server instance in the tree view and select
Restore Database in the Server pull-down menu.

Database Administration - 8 of 13
Database Administration Exercises

4.2 The Database Restore window opens. Click on the Browse button and navigate
to the database backup file location:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup.

Database Administration - 9 of 13
Database Administration Exercises

4.3 Browse to the Database restoration location:


C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.

4.4 Click Restore.

Note: Make sure you have selected the Database restoration location shown above.

4.5 Click OK to close the message window.

Database Administration - 10 of 13
Database Administration Exercises

The FFI_training database is again listed in the Database Manager tree view. Its new
creation date is the date of the backup file used in the restoration.

Database Administration - 11 of 13
Database Administration Exercises

Notes

Deleting a database
You can delete a database in the FFI Database Administration module by selecting
Delete Database on the Server pull down menu. Use this with caution as deleted
databases CANNOT be restored. Only backup databases can be restored. Backup your
data often!

Limitations of backup and restore


It is possible to restore a database onto a remote server – perhaps a computer
belonging to a manager in another city – so that two copies of the database exist, one of
which is a throw-away copy for analysis only. In this case, the custodian of that copy will
have to remember to not add or edit data to the throw-away copy.

A note on field data collection


“Restore” does not mean “Import”. With the exception of the PDA software, FFI does not
support any form of disconnected editing or replication. Edits made on a copy (restored

Database Administration - 12 of 13
Database Administration Exercises

from a backup) of the master database cannot be moved back to the master and will be
lost. This means that the only way users can share an FFI database is to be connected
via an intranet. The PDA is the only provision for electronic field data collection.
However, if the server hosting the FFI database is a portable computer, it can be taken
off-line and into the field and may be used for field data collection. During this time,
office-bound computers may use a throw-away copy of the database for analysis only.

Moving a database to a new server


Situations where you may need to move to a new server:
• Everything is working fine, you just want to use a newer computer.
• Everything is working fine you may just be reinstalling on the old machine with
the new hard drive.
• A hard drive has failed, and all you have is your most recent backups. You will
need to reenter data since the last backup.
• A hard drive has failed, but you have been able to recover the SQL server
database files from the dead hard drive. With the help of a database
administrator, you may be able to “attach” these files to the server without
losing data.

Steps will vary depending on your situation, but will be similar to these:
• Install FFI on the new server.
• Install SQL Server on the new server.
• Copy all of the FFI backup files to the folder C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Backup on the new server.
• Restore all databases from the backups.
• If the old server is still running, delete all of the old databases so that users will
not be confused about where their databases are.
• Possibly uninstall SQL Server from the old server.
• Ensure that all of the FFI computers that will be clients to the new server have
connectivity and are able to login to the databases.
• Communicate to users where their databases are now hosted.

Database Administration - 13 of 13

You might also like