-
Notifications
You must be signed in to change notification settings - Fork 0
/
lab 4.txt
83 lines (54 loc) · 1.25 KB
/
lab 4.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
SQL> connect system;
Enter password:
Connected.
SQL> create user ben identified by 123;
User created.
SQL> connect;
Enter user-name: system
Enter password:
Connected.
SQL> grant create session to ben;
Grant succeeded.
SQL> connect;
Enter user-name: ben
Enter password:
Connected.
SQL> connect
Enter user-name: system
Enter password:
Connected.
SQL> select * from books;
BKID BKNAME AUTHO
---------- ---------- -----
101 Linux ben
102 PHP biby
103 JAVA benoi
SQL> grant insert,select on books to ben;
Grant succeeded.
SQL> connect
Enter user-name: ben
Enter password:
Connected.
SQL> select * from system.books;
BKID BKNAME AUTHO
---------- ---------- -----
101 Linux ben
102 PHP biby
103 JAVA benoi
SQL> insert into system.books values(104,'html','ken');
1 row created.
SQL> connect system
Enter password:
Connected.
SQL> revoke select on books from ben;
Revoke succeeded.
SQL> connect
Enter user-name: ben
Enter password:
Connected.
SQL> select * from system.books;
select * from system.books
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL>