I wrote a mess in the previous article, so I opened a new one.
Start with the preparation of the database.
1. Create a tablespace:
SQL> Create tablespace wings datafile 'd: \ app \ User \ oradata \ L \ wings_f01.dbf 'size 50 m autoextend on next 50 m maxsize 1024 m;
The above is only one data file at a time, and the following is more than one file:
SQL> Create tablespace wings_temp datafile 'd: \ app \ User \ oradata \ CMDL \ wings_tf01.dbf 'size 50 m autoextend on next 50 m maxsize 1024 M, 'd: \ app \ User \ oradata \ L \ wings_tf02.dbf 'size 50 m autoextend on next 50 m maxsize 1024 m;
If the data file reaches 1024 MB, an error is reported. You can add a data file to the tablespace:
SQL> alter tablespace wings add datafile 'd: \ app \ User \ oradata \ L \ wings_f02.dbf 'size 50 m autoextend on next 50 m maxsize 1024 m;
After the tablespace is created, you can create a user:
SQL> create user wings identified by wings default tablespace wings;
Here, I set the default tablespace of the wings user to wings. This is also the general practice of an enterprise when establishing a database. A single user has a tablespace, and the index also needs a separate tablespace. I will not go into details here.
Next, I want to grant the DBA permission to wings:
SQL> grant DBA to wings;
At this time, the wings user can start to work.