oracle基础操作

建表用户授权等基本操作

1.sqlplus登陆

sqlplus

2.连接到指定用户

conn scott/tiger as sysdba

3.创建新用户

create user zwr identified by zwrpasswd;

4.修改密码

alter user zwr identified by zwrnewpasswd;

5.创建表空间

create [temporary] tablespace  ts_zwr datafile '/ts_zwr/zwr_data.dbf' size 200M;

6.分配表空间

alter user zwr default tablespace ts_zwr;
alter user zwr default temporary tablespace ts_zwr_temp;

7.授权用户表空间

grant create session,create table,create view,create sequence,unlimited tablespace to zwr; 

19.查询

20.导出/导入dmp相关

create directory dump as '/home/oracle/dumpfiles';
grant read,write on directory dump to zs_prod;
impdp system/manager directory=dump dumpfile=zs_prod20180427.dmp schemas=zs_prod;
impdp system/manager directory=dump dumpfile=zs_prod20180427.dmp logfile=prod schemas=zs_prod ;

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>