The start database command is divided into three phases:
Startup Nomount
ALTER DATABASE Mount
ALTER DATABASE Open
1. View All Users:
SELECT * from Dba_user;
SELECT * from All_users;
SELECT * from User_users;
2. View User system permissions:
SELECT * from Dba_sys_privs;
SELECT * from All_sys_privs;
SELECT * from User_sys_privs;
3. View User Object permissions:
SELECT * from Dba_tab_privs;
SELECT * from All_tab_privs;
SELECT * from User_tab_privs;
4. View all roles:
SELECT * from Dba_roles;
5. View the roles that users have:
SELECT * from Dba_role_privs;
SELECT * from User_role_privs;
6. View the default table space for the current user
Select Username,default_tablespace from User_users;
7. View specific permissions for a role, such as Grant connect,resource,create session,create view to TEST, view resource with those permissions, with SELECT * from Dba_sys_privs WHERE grantee= ' RESOURCE ';
---------------------------------------------------------
The Data dictionary view in Oracle is divided into 3 categories, distinguished by prefixes: User,all and DBA, many data dictionary views containing similar information.
User_*: Information about the object that the user has, the object information that the user has created
All_*: Information about the objects that the user can access, that is, the information that the user creates, plus the information that the user has access to, but the object they create
Dba_*: Information about objects in the entire database
---------------------------------------------
Oracle 10i
ALTER DATABASE default tablespace modify the default table space for databases
-----------------------------------
Set echo off;
Spool the path that produces the script file
Select ' Grant Select,insert,delete,update on ' | | table_name| | ' to user name; ' from User_tables;
Spool off;
Select ' Revoke select,insert,update,delete on ' | | table_name| | ' from user name; ' from User_tables;
Revoke select,insert,delete,update any table from user name with GRANT option;
--------------
Grant select,insert,delete,insert,update any table to user name with GRANT option;
Modify the table space to which the table belongs
ALTER TABLE name move tablespace table space name
Note: After this operation, be sure to rebuild the index on the table, ALTER index INDEX-NAME rebuild
-------------------
To create a table space statement:
Create tablespace tablename datafile ' e:oracle/dbname.dbf ' size 1024M autoextend on next 100M MaxSize Unlimited;