Log in to the connection using the Sqlplus tool
Start-"Run cmd-" c:\users\admininstrator> sqlplus Please enter your username: [email protected] As SYSDBA enter password:rootsql> or direct input sqlplus sys/[ Email protected] as SYSDBA enter
Querying the current user
Sql>show user;
To enable a locked user username
username account unlock;
Create tablespace (default persistent data file is XX.DBF, set size to 100M, each time self-increment 100m,tempfile means zero data file, depending on need)
Sql>create [temporary] tablespace tablespace_name tempfile | DataFile ' xx.dbf ' SIZE 100M
View information about a tablespace (note capitalization)
Sql>select * from Dba_data_files WHERE tablespace_name= ' TEST ';
Modify the state of a tablespace (online or offline)
Sql>alter tablespace tablesapce_name ONLINE | OFFLINE
Querying the status of table spaces
Sql>select status from dba_tablespaces WHERE tablespace_name = ' spacename ';
Delete table space (option to delete data files while deleting tablespaces)
Sql>drop tablespace tablespace_name [including CONTENTS]
Create user ( requires permission to create a user )
Create a user named Test with the password password, the default tablespace is a, and the table space is B
Sql>create user test identified by password default tablespace A temporary tablespace B;
Delete User
Sql>drop user Testl;
Authorizing a table space
Grant create session to test; Grant test user permission to create session, that is, login permission
Grant unlimited tablespace to test; Grant the test user permission to use the Tablespace
Grant create tablespace to test; Grant test user permission to create table space
Grant alter tablespace to test; Grant test user permission to modify table space
Grant drop tablespace to test; Grant the test user permission to delete a table space
Grant manage tablespace to test; Grant the test user permission to manage the tablespace
Grant CREATE table to test; Grant permission to create a table (contains the creation index permission, ALTER TABLE, DROP TABLE permission)
Grant create view to test; Permissions granted to user Operation view (with ALTER view, DROP VIEW permission)
Grant create trigger to test; Grant user Action trigger permissions (includes ALTER TRIGGER, DROP TRIGGER permissions)
Grant CREATE procedure to test; Grant user permission to manipulate stored procedures (including ALTER procedure, drop procedure and function, and package permissions)
Grant create sequence to test; Permissions granted to the user Action sequence: (includes creation, modification, deletion, and selection sequence)
Grant Select any dictionary to test; Allows selection from a data dictionary table owned by the SYS user
Oracle Getting Started Foundation