Create a table space
Create Tablespace Ohahu_Data DataFile 'C: /Database/ohahu.ora' size 10m AutoExtend on Next 2m
Note: The initial data file size is 10m, and self-extension according to 2M size.
Note: C: / Database / This path must exist, otherwise an error
Mobile data file
Method 1: Stop all connections first
SVRMGR> Connect Inrnal as sysdba;
SVRMGR> Shutdown;
SVRMGR> EXIT;
> mv file1 file2
SVRMGR> Connect Inrnal as sysdba;
SVRMGR> Startup Mount Practice / * Install Database * /
SVRMGR> ALTER DATABASE RENAME FILE 'FILE1' To 'file2';
SVRMGR> ALTER DATABASE OPEN; / * Start Database Specifications * /
SVRMGR> EXIT;
Method 2: Use the ALTER TABLESPACE method (invalid for the SYSTEM table space)
SVRMGR> Connect Inrnal as sysdba;
SVRMGR> ALTER TABLESPACE OHAHU_DATA OFFLINE; / * is set offline * /
SVRMGR> EXIT;
> mv file1 file2
SVRMGR> Connect Inrnal as sysdba;
SVRMGR> ALTER TABLESPACE OHAHU_DATA RENAME DATAFILE 'FILE1' To 'file2';
SVRMGR> ALTER TABLESPACE OHAHU_DATA online; / * Set as online * /
SVRMGR> EXIT;
Create a user
Create User "Ohahu" Identified by "Ohahu" Default TableSpace "Ohahu_Data" Temporary TableSpace "Temp" Profile Default
Grant "Connect" to "ohahu"; / * Permissions must be provided * /
Grant "resource" to "ohahu"; / *? * /
Grant Unlimited TableSpace to "Ohahu";
Alter User "Ohahu" Default Role All;