1. Table space-related SQL
--Create a tablespace named Test_tablespace_name with a storage location of D:\db\oradata\orcl\test_tablespace_ NAME.DBF, size 128m, unlimited, after each increase of 10mcreate tablespace test_tablespace_name datafile " d:\db\oradata\orcl\test_tablespace_name.dbf ' size 128m autoextend on next 10m maxsize Unlimited; -- select Span style= "COLOR: #000000" > file_name, Tablespace_name, Bytes, autoextensible from Dba_data_files WHERE tablespace_name = " test_tablespace_name"; -- delete table space test_tablespace_namealter tablespace test_tablespace_name offline; -- Delete the data files on disk together with the drop tablespace test_tablespace_name including contents and datafiles;
2. User-related SQL
--New user Test_user/test_password, specifying a tablespace of Test_tablespace_nameCreate UserTest_user identified byTest_passworddefaultTablespace Test_tablespace_nameTemporaryTablespaceTemp;--Modify User PasswordALTER USERTest_user identified by 123456;--Delete UserDROP USERTest_userCASCADE;--Lock UserAlter Usertest_user account lock;--Unlocking UsersAlter Usertest_user account unlock;--Querying user InformationSelect * fromall_users;--more detailed user informationSelect * fromDba_users;
3. Licensing-related SQL
--Grant test_user user dba AuthorityGrantResource, DBA, Connect,Create any Table,Create any Index,Create anySequence, unlimited tablespace toTest_user;--revoke test_user User DBA AuthorityREVOKEResource, DBA, Connect,Create any Table,Create any Index,Create anySequence, unlimited tablespace fromTest_user;--View system permissions for the current userSelect * fromUser_sys_privs;--View object permissions for the current userSelect * fromUser_tab_privs;--View all roles for the current userSelect * fromUser_role_privs;
Yexiangyang
[Email protected]
Oracle database Personal Grooming Common table spaces, users, authorization actions