Recently, I began to reorganize my Oracle knowledge and write it out for record and sharing.
1. Install the Oracle server software.
2. Use the DOS interface to connect to the database
Run the following command:
Sqlplus/nolog press ENTER
Conn username/password (if sys is used for login, write conn sys/sys as sysdba) and press ENTER
Show connected
3. Create a tablespace and a user
Create a tablespace (generally, create n tablespaces for storing data and an index space ):
Create tablespace name
Datafile 'path (the path must be created first)/***. dbf' size * m
Tempfile 'path/***. dbf' size * m
Autoextend on -- Automatic Growth
-- There are some commands that define the size, as needed
Default storage (
Initialize 100 K,
Next 100 K,
);
For example:
SQL> Create tablespace an datafile 'd:/Oracle/product/10.1.0/oradata/demo. ora 'size 100 m autoextend on next 100 m maxsize 1024 m;
Create a user
Create User Username identified by password;
For example:
SQL> create user yq identified by yq;
Authorize a user
Alter User Username quota unlimited on tablespace name;
Grant connect to user name; -- connection permission
Grant DBA to user name; -- Database Administrator permission
For example
SQL> alter user yq quota unlimited on;
SQL> grant connect to yq;
SQL> grant DBA to yq;
4. Install database management software such as pl SQL Dev. After logging in, write SQL statements or use the graphical interface to add tables and data.
Coming down, a wonderful Oracle journey is about to kick off ......