Two: Creating a Database
Small test Oracle 8i (by the way we practice practicing)
(For convenience, I'll have Oracle 8i abbreviated 8 i)
8i and 9i are indeed somewhat different, but in the interface is not very different, or to my Oracle 8i as an example for everyone to explain it! Since is the actual combat, first we create for oneself a development user, and creates a table!!
There are more ways to create new users and tables in Oracle, as long as you have administrator privileges (nonsense!). , start the DBA Studio program in the simplest, 8i program group, enter the admin username and password in the database link information that appears, and, of course, in Oracle, you can log in by using the user name slash password to connect to the SYSDBA.
(1-1) Create User:
After landing, point security, in the first item, you will see the user, with right you can create a new user, or give the user a role, different roles have different permissions! Oracle8i a predefined role, I'll talk about it below. Take a look at the figure I grabbed below, in the general information behind the role, you can give Connect,resource permissions.
(1-2) Create a database:
We first disconnect the system's database, you can select it in the file, or you can use the right button. And then use the user we created to login, and find the table in the scheme, and then you can create directly, because it is graphical visualization, but also the whole Chinese, I will not be described!! We can try more!
(2) Create users and databases using the Sqlplus tool:
Oracle can use the Sqlplus tool to write SQL statements, for the SQL master, this is a good place to play talent!!
Let's try it, first of all, we have to log in first, in order to create a new user, we still use system to login. Fill in the data ID in the host string (ORADB)
I use a screenshot to explain all the operation, here to do a description:
After logging in, "sql>" appears and we can write SQL statements behind it,
Grant Connect,resouce to Maxuan identified by Max, which is to create a user Maxuan, password max, and give Connect,resource permissions, after a successful authorization, we use conn Maxuan /max this sentence to connect the database with Maxuan, the role is not DBA! Next is a few basic SQL table statements, needless to say, in sqlplus, each statement ends with a semicolon ID, after completion, we can use quit or exit command to disconnect
PS: Here I say a few 8i predefined roles! 1.CONNECT role: A typical, most basic right granted to end users
Alter session--modifying sessions
Create CLUSTER--Create a cluster
Create DATABASE Link--Set up databases links
Create SEQUENCE--Create a sequence
Create session--establishing sessions
Create synonym--create synonyms
Create View--Create VIEW 2.RESOURCE role: is granted to developers
Create CLUSTER--Create a cluster
Create PROCEDURE--build process
Create SEQUENCE--Create a sequence
CREATE table--building tables
Create TRIGGER--creating triggers
Create type--establishes the types 3.DBA role: Owning all system-level permissions on the system
4.imp_full_database role, Exp_full_database role:
Backup any table--Backs up any tables
Execute any PROCEDURE--perform any action
SELECT any table--queries any table 5.delete_catalog_role role:
By granting the user this role, the user can delete records from the table sys.aud$.
The sys.aud$ table records the audited records and uses this role to simplify audit trail management.
6.select_catalog_role role, Execute_catalog_role role:
The Select_catalog_role role has the right to query from the data dictionary,
The Execute_catalog_role role has the right to perform part of a procedure and function from the data dictionary.