oracle创建用户

创建用户的4个步骤

 

/*1,创建临时表空间*/

SQL>  create temporary tablespace user_temp tempfile '/opt/ora10g/oradata/orcl/user_temp.dbf' size 100M autoextend on next 50M maxsize 2048M;

 

Tablespace created.

 

/*2,创建数据存放的数据表空间*/

SQL> create tablespace test_data datafile '/opt/ora10g/oradata/orcl/test_data.dbf' size 100M autoextend on next 100M maxsize 5120M;

 

Tablespace created.

 

/*3,创建用户*/

SQL>  create user test identified by test default tablespace test_data temporary tablespace user_temp;

 

User created.

 

/*4,给用户的授权*/

SQL> grant create session,create table,create sequence to test;

 

Grant succeeded.

/*授权这个,你可以根据你的需要授予用户相应的权限,如果是初学者,可以直接授予resource和connect权限*/

SQL> grant resource,connect to test;

 

你可能感兴趣的:(oracle,session,user,table)