Oracle操作

时间:2023-03-09 19:05:17
Oracle操作

1、查询表空间地址:

select name from v$datafile;

2、创建表空间:

create tablespace yysspace datafile ‘D:\APP\MIAO\ORADATA\ORCL\YYSSPACE.DBF’ size 500M autoextend on next 50m maxsize unlimited;

3、创建用户并且赋予空间

create user yys identified by yys default tablespace yysspace;

4、给用户赋权限

grant connect,resource to yys;

grant sysdba to yys;

  赋予用户导入导出权限

  grant imp_full_database to yys;grant exp_full_database to yys

  赋予用户创建表,查询,删除等操作权限

  grant create session,create any table,create any view,select any table,drop any table to yys;

5、允许窗口导入导出数据库备份文件*.dmp

导入:imp userid=yys/yys full=y file=f:/yys.dmp

导出:exp userid=yys/yys full=y file=f:/test.dmp