J2ee
Two: Creating a Database
Small test Oracle 8i (by the way we practice practicing) (for convenience, I will 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 the right you can create new users, or give users 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 key. 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:
In Oracle can use sqlplus this 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 illustrate all the operation, here to do a description:
After landing in, "sql>" We can write the SQL statement behind it, Grant Connect,resouce to Maxuan identified by Max, this is to create a user Maxuan, password for Max, and give Connect,resource permission, after the success of the authorization, we use Conn Maxuan/max this sentence to Maxuan connection database, 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 and basic right granted to end users
alter session--Modifying sessions
create CLUSTER--Establishing a cluster
create Database Link--Establishing a links
create SEQUENCE--establishing sequence
create session-Establishing a conversation
create synonym--establishing synonyms
create View--building views
2. Resource role: is granted to developers
create CLUSTER--Establishing a cluster
create PROCEDURE--Establishment process
create SEQUENCE--establishing sequence
create table--building tables
create TRIGGER--establishing triggers
create Type--building types
3. DBA role: All system-level permissions are owned by 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--query any tables
5. Delete_catalog_role role:
The user is given this role, and the user can delete the record 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.