oracle linux and start the Oracle listener instance

First, create a user

There are two user built inside the oracle: system and sys. Users can log in directly to the system user to create other users because the system has permission to create other users. When installing oracle, user or system administrator can first create a user for itself.

Syntax [Create a user]: create user username identified by password [ie password];

例子: create user test identified by test;

Grammar [Change User]: alter user username identified by password [change password];

Examples: alter user test identified by 123456;

The sys and system passwords changed the Test:
the ALTER the User sys indentified by the Test;
the ALTER the User system indentified by the Test;

 

Second, authorization roles

oracle is compatible with previous versions, offers three standard roles (role): connect / resource and dba.

(1) three standard roles:

1. connect role (connection roles)

- casual users, especially users do not need to build the table, usually only giving them connect role. 

--connect is simple to use oracle rights, such rights only have access to other users of the table, including select / insert / update, and delete.

- the user has the ability to create connect role tables, views, sequence (Sequence), the cluster (Cluster), synonyms (synonym for), answer (session), and other data link (link)

 

2. resource role (resource role)

- More reliable and formal database user can grant resource role.

--resource provide additional rights to users to create their own tables, sequences, process (procedure), the trigger (trigger), index (index) and a cluster (cluster).

 

3. dba role (database administrator role)

--dba role has all the system privileges

- including unlimited space limits and the ability to grant various permissions to other users. system owned by the user dba

 

(2) authorize command

 Syntax: grant connect, resource to username;

 Examples: grant connect, resource to test;

(3) revoke privileges

 Syntax: revoke connect, resource from a user name;

  Liezi: revoke connect, resource from test;

 Third, login

(1) Admin Login

  $ Sqlplus / as sysdba
  here do not need to enter a password, because when you install the oracle, oracle administrator for the user is currently logged on.
(2) scott user login

  $ Sqlplus scott / 123 // do not specify instance
  $ sqlplus scott / 123 @ orcl // specified instance

 Fourth, the database instance

  Database is a medium for storing data, referring to examples of a series of operating system processes and memory block allocated to those processes.

Examples of the process instance = + memory used by the process (SGA) 
database database = operating system files or a collection of physical disk (Disk) of (redo file File Control + + + data file temporary files)

An instance is a temporary thing, you can also think it represents the state of the database at a time!  
The database is permanent, is a collection of files.

   Start the Oracle listener instance with linux

 Check the database name

SQL> select name from v$database;
Check the instance name
SQL> select instance_name from v$instance;
 

Fifth, view the table

1. Review the table structure: desc table name

2. Review the current user's tables:

  select table_name from user_tables; 

3. Check the table name for all users:

  select  table_name  from all_tables;  

Reference: the Oracle create users, roles, authorization, construction of the table

oracle database and table view Command

View user oracle, user permissions, user table space, the user's default table space

Guess you like

Origin www.cnblogs.com/chenggang816/p/10986024.html