Create a temporary table space
Create temporary tablespace zfmi_temp
Tempfile ' d:oracleoradatazfmizfmi_temp.dbf '
Size 32m
Autoextend on
Next 32m MaxSize 2048m
Extent management Local;
The Tempfile parameter must have
Create a datasheet space
Create Tablespace ZFMI
Logging
DataFile ' d:oracleoradatazfmizfmi.dbf '
Size 100m
Autoextend on
Next 32m MaxSize 2048m
Extent management Local;
The datafile parameter must have
Delete users and all objects of the user
Drop user ZFMI cascade;
The cascade parameter is a cascading deletion of all objects of the user, often encountering problems that users cannot delete if they have an object without this parameter, so it is customary to add this parameter
Delete a table space
Prerequisite: Before deleting a tablespace, make sure that the tablespace is not used by another user before deleting it
Drop tablespace ZFMI including contents and datafiles cascade;
Including contents delete the contents of the tablespace, if there is content in the tablespace before the table space is deleted, but not with this parameter, the table space is not deleted, so it is customary to add this parameter
including datafiles delete data files in a tablespace
Cascade constraints Delete foreign key references for tables in tablespace
If you delete tablespace files before you delete them, you can resolve:
If you delete the data file for the table space before you clear the table space, the database will not start and shut down properly.
You can recover by using the following method (this method has been validated in oracle9i):
In the following procedure, filename is a data file that has been deleted, and if there are more than one, it needs to be executed multiple times; Tablespace_name is the name of the corresponding table space.
$ sqlplus/nolog
Sql> Conn/as sysdba;
If the database is already started, you need to first execute the following line:
sql> Shutdown Abort
Sql> Startup Mount
sql> ALTER DATABASE datafile ' filename ' offline drop;
sql> ALTER DATABASE open;
Sql> drop tablespace tablespace_name including contents;
Create a user and specify a table space
Create user Zfmi identified by ZFMI
Default tablespace zfmi temporary tablespace zfmi_temp;
The identified by parameter must have
Grant all permissions to the message user DBA role
GRANT DBA to Zfmi;
Granting permissions to Users