HomeOracle Page 2 - Database Authentication for Oracle Database XE
Authenticating Using the Password File - Oracle
In this second part of a 10-part series on the security features of Oracle Database XE, you'll learn how database authentication works, starting with passwords. This article is excerpted from chapter 31 of the book Beginning PHP and Oracle: From Novice to Professional, written by W. Jason Gilmore and Bob Bryla (Apress; ISBN: 1590597702).
We discuss system privileges in more detail later in this chapter in the section “Using System Privileges.” For now, though, you need to know that there are two particular system privileges that give administrators special authentication in the database:SYSDBAandSYSOPER. An administrator with theSYSOPERprivilege can start up and shut down the database, perform online or offline backups, archive the current redo log files, and connect to the database when it is inRESTRICTED SESSIONmode. TheSYSDBAprivilege contains all the rights ofSYSOPER, with the addition of being able to create a database and grant theSYSDBA orSYSOPERprivilege to other database users.
To connect to the database from a SQL*Plus or a SQL command-line session, you appendAS SYSDBAorAS SYSOPERto yourCONNECTcommand. Here’s an example:
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Sep 17 16:11:49 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect rjb/rjb as sysdba Connected. SQL>
Users who connect asSYSDBAorSYSOPERhave additional privileges and the default schema is for these users when they connect to the database. Users who connect with theSYSDBAprivilege connect as theSYSuser; theSYSOPERprivilege sets the user toPUBLIC:
SQL> show user USER is "SYS"
As with any database connection request, you have the option to specify the username and password on the same line as thesqlpluscommand, along with theSYSDBAorSYSOPERkeyword:
C:\ > sqlplus rjb/rjb as sysdba
Please check back next week for the continuation of this article.