We will discuss system privileges in greater detail later in this chapter. For now, though, you
need to know that there are three particular system privileges that give administrators special
authentication in the database: SYSDBA, SYSOPER, and SYSASM. An administrator with the
SYSOPER privilege 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 in RESTRICTED SESSION
mode. The SYSDBA privilege contains all the rights of SYSOPER, with the addition of being able
to create a database and grant the SYSDBA or SYSOPER privilege to other database users. New to
Oracle Database 11g, the SYSASM privilege is specific to an ASM instance to manage database
storage.
To connect to the database from a SQL*Plus session, you append AS SYSDBA or AS SYSOPER
to your connect command. Here??™s an example:
[oracle@dw ~]$ sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Aug 10 20:57:30 2007
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL> connect rjb/rjb as sysdba
Connected.
SQL> show user
USER is "SYS"
SQL>
Other than the additional privileges available to the users who connect as SYSDBA or SYSOPER,
the default schema is also different for these users when they connect to the database. Users who
connect with the SYSDBA or SYSASM privilege connect as the SYS user; the SYSOPER privilege
sets the user to PUBLIC:
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 the sqlplus command, along with the SYSDBA or SYSOPER keyword:
[oracle@dw ~]$ sqlplus rjb/rjb as sysdba
Although a default installation of the Oracle Database using the Oracle Universal Installer with
a seed database or using the Database Creation Assistant will automatically create a password file,
282 Oracle Database 11g DBA Handbook
there are occasions when you may need to re-create one if it is accidentally deleted or damaged.
Pages:
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476