01.09.2016 Views

Beginning Oracle Database 11g Administration From Novice to Professional

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

158<br />

CHAPTER 8 USER MANAGEMENT AND DATA LOADING<br />

<br />

<br />

<br />

<br />

<br />

Tip <strong>Oracle</strong> provides five sample schemas for instructional purposes, including, for example, the Human<br />

Resources () schema used in this chapter. They are described in <strong>Oracle</strong> <strong>Database</strong> <strong>11g</strong> Sample Schemas<br />

and <strong>Oracle</strong> <strong>Database</strong> <strong>11g</strong> Examples Installation Guide—both freely searchable and downloadable at <br />

and at .<br />

The scripts that create and populate the schemas should be installed when the <strong>Oracle</strong> software is installed,<br />

as discussed in Chapter 5. You can use the scripts as a template when creating scripts <strong>to</strong> populate your own<br />

database, for example, creates the tables in the schema, and creates indexes<br />

on the tables. The scripts are located in the direc<strong>to</strong>ry; the master script is<br />

. You can choose <strong>to</strong> have these schemas created and populated by <strong>Database</strong> Configuration<br />

Assistant (DBCA) when you create the database—as discussed in Chapter 6—or you can do it yourself using<br />

the instructions in <strong>Oracle</strong> <strong>Database</strong> <strong>11g</strong> Sample Schemas.<br />

User Management<br />

As you might expect, nobody can s<strong>to</strong>re data in the database or retrieve data from it unless<br />

they are properly authorized <strong>to</strong> do so. The following sections explore the five commands<br />

required for user management: , , , , and . Only<br />

users with the appropriate privileges can execute these commands. For example, only<br />

a user with the Create User privilege can execute the command. You can<br />

perform user management tasks using the account.<br />

Creating Users<br />

The command is used <strong>to</strong> specify the alias by which the database knows a user;<br />

a typical convention is <strong>to</strong> use the first character of the user’s first name and the first seven<br />

characters of the person’s last name; for example, in the case of a user named<br />

Iggy Fernandez. Listing 8-6 shows a minimalist example of the command;<br />

the clause is used <strong>to</strong> specify the password that the user must specify <strong>to</strong> gain<br />

access <strong>to</strong> the database.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!