有两种解决办法:
1.oracle提供了脚本,执行下就自动创建;
2.从其它数据库导出一份。
此处采用第二种方法,如下:
1、dmp文件上传到 /home/oracle目录下
2、cd 进入到 oracle目录下
3、改变拥有者和所在组权限
#chown oracle:oinstall scott.dmp
4、输入执行命令:$sqlplus / as sysdba
5、在命令输入框,分别输入下列执行语句,创建SCOTT和HR用户:
create user scott identified by tiger;
create user hr identified by hr;
6、exit退出后,执行下列命令:
imp scott/tiger file=/home/oracle/scott.dmp log=/home/oracle/scott.log FULL=Y
注:若执行Imp出现下列情况,表明scott权限不足,需要给其赋权,再执行imp导入
解决方法:在SQL窗口执行:SQL >grant dba to scott;
7、进入到sqlplus中查询scott和hr用户,输入命令:SQL >select owner,table_name from dba_tables where table_name=‘DEPT’;
至此,安装过程结束。