------------------------------------ ----------- ------------------------------
background_dump_dest string /u01/admin/lty/bdump
[oracle@localhost bdump]$ ls -l
total 828
-rw-r--r-- 1 oracle oinstall 142968 Mar 6 23:38 alert_lty.log
-rw-r----- 1 oracle oinstall 660699 Mar 3 17:11 lty_d000_3303.trc
-rw-r----- 1 oracle oinstall 779 Feb 23 09:59 lty_qmn0_3324.trc
-rw-r----- 1 oracle oinstall 802 Feb 23 10:05 lty_qmn0_3338.trc
-rw-r----- 1 oracle oinstall 803 Feb 23 10:10 lty_qmn0_3350.trc
-rw-r----- 1 oracle oinstall 1383 Mar 7 00:58 lty_ora_3575.trc
1 Connect to the database as user SYS and shut down the database.
2 With the database shut down, create an SPFILE from the PFILE. The SPFILE will be created in $ORACLE_HOME/dbs.
3 From the operating system, view the SPFILE.
[oracle@localhost dbs]$ ls -l
total 48
-rw-r--r-- 1 oracle oinstall 12920 Feb 22 20:14 initdw.ora
-rw-r--r-- 1 oracle oinstall 8475 Feb 22 20:14 init.ora
-rw-r----- 1 oracle oinstall 24 Mar 7 02:07 lkLTY
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:29 old
-rwSr----- 1 oracle oinstall 1536 Feb 22 20:14 orapwlty
-rw-r----- 1 oracle oinstall 3584 Feb 22 20:14 spfilelty.ora
4 Connect as user SYS, and start the database using the SPFILE.
5 a Shut down the database and open it in read-only mode.
b Connect as user HR password HR and insert a row into the REGIONS table as
follows:
INSERT INTO regions VALUES (5, 'Mars');
What happens?
------------------------------ ---------- --------------------------------
HR 47 EXPIRED & LOCKED
------------------------------ --------------------------------
HR EXPIRED
------------------------------ --------------------------------
HR OPEN
ORA-00604: error occurred at recursive SQL level 1
ORA-16000: database open for read-only access
6 a Connect as user HR password HR and insert the following row into the REGIONS
table; do not commit or exit.
INSERT INTO regions VALUES (5, 'Mars');
b In a new telnet session start SQL*Plus. Connect user SYS and perform
a SHUTDOWN TRANSACTIONAL.
c Roll back the insert in the HR session and exit.
What happens to the HR session?
What happens to the SYS session?
7 a In the user SYS session start the database.
b In the open telnet session start SQL*Plus and connect as user HR.
Note: Keep the two SQL*Plus sessions open, one session as user SYS and one as
user HR.
c As user SYS enable a restricted session.
d As user HR, SELECT from the REGIONS table. Is the SELECT successful?
e Exit the session, then reconnect as HR. What happens? The user HR does not have
RESTRICTED SESSION privilege, and therefore, cannot log in.
f As user SYS disable the restricted session.
g Exit the HR telnet session
0人 |