时间:2021-07-01 10:21:17 帮助过:3人阅读
- <span style="color: #000000;">账号:sqlplus
- 密码:as sysdba</span>
- create user 用户名 identified by 密码
- <span style="color: #000000;">赋予用户connect连接数据库,resource创建实体但是没有创建数据库结构权限,dba赋予用户所有权限<br>
- grant connect,resource,dba to 用户名</span>
其他权限
- <span style="color: #000000;">grant execute on sys.dbms_crypto to 用户名 with grant option;
- grant execute on SYS.DBMS_AQADM to 用户名 with grant option;
- grant execute on SYS.DBMS_AQELM to 用户名 with grant option;
- grant execute on SYS.DBMS_AQ_IMPORT_INTERNAL to 用户名 with grant option;
- grant execute on SYS.DBMS_DEFER_IMPORT_INTERNAL to 用户名;
- grant execute on SYS.DBMS_REPCAT to 用户名;
- grant execute on SYS.DBMS_RULE_EXIMP to 用户名 with grant option;
- grant execute on SYS.DBMS_SQL to 用户名;
- grant execute on SYS.DBMS_SYS_ERROR to 用户名;
- grant execute on SYS.DBMS_SYS_SQL to 用户名;
- grant execute on SYS.DBMS_TRANSFORM_EXIMP to 用户名 with grant option;
- grant select, insert, update, delete, references, alter, index on SYS.INCEXP to 用户名;
- grant select, insert, update, delete, references, alter, index on SYS.INCFIL to 用户名;
- grant select, insert, update, delete, references, alter, index on SYS.INCVID to 用户名;
- grant execute on SYS.SYS_GROUP to 用户名;
- grant select on WMSYS.WM$UDTRIG_INFO to 用户名;
- grant aq_administrator_role to 用户名 with admin option;
- grant dba to NEWUSER123 with admin option;
- grant sales_history_role to 用户名 with admin option;
- grant students to 用户名 with admin option;
- grant unlimited tablespace to 用户名 with admin option;</span>
导出
- exp 账号/密码@127.0.0.1/orcl file=导出文件名.dmp full=y
导入
- imp epm/epm@127.0.0.1/orcl file=D:\doudianwork\lq.dmp full=y
1.oracle11g导出
- EXPDP USERID=‘账号/密码@orcl as sysdba‘ schemas=账号 directory=DATA_PUMP_DIR dumpfile=导出文件名.dmp logfile=导出日志名.log version=10.2.0.1.0 (这是导出成数据库版本号)
导出的文件在oracle11g安装的盘的app\ASUS\admin\orcl\dpdump
2.oracle10导入
导入的时候将要导入的.dmp文件放入oracle10g的安装盘的pp\ASUS\admin\orcl\dpdump文件夹下
- IMPDP USERID=‘账号/密码@orcl as sysdba‘ schemas=账号 directory=DATA_PUMP_DIR dumpfile=导入的文件名.dmp logfile=导入的日志名.log version=10.2.0.1.0 (导入的版本号)