dbwatch->export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
dbwatch->imp hr/hr file=hr.dmp full=y grants=y
Import: Release 10.2.0.1.0 - Production on Wed Jul 8 02:17:52 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
. importing HR's objects into HR
. . importing table "COUNTRIES" 25 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "COUNTRIES" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT REFERENCES ON "COUNTRIES" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "DEPARTMENTS" 27 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "DEPARTMENTS" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "EMPLOYEES" 107 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "EMPLOYEES" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT REFERENCES ON "EMPLOYEES" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "JOBS" 19 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "JOBS" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "JOB_HISTORY" 10 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "JOB_HISTORY" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "LOCATIONS" 23 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "LOCATIONS" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT REFERENCES ON "LOCATIONS" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "REGIONS" 4 rows imported
IMP-00017: following statement failed with ORACLE error 1031:
"CREATE FORCE VIEW "HR"."EMP_DETAILS_VIEW" ("EM"
"PLOYEE_ID","JOB_ID","MANAGER_ID","DEPARTMENT_ID","LOCATION_ID","COUNTRY_ID""
","FIRST_NAME","LAST_NAME","SALARY","COMMISSION_PCT","DEPARTMENT_NAME","JOB_"
"TITLE","CITY","STATE_PROVINCE","COUNTRY_NAME","REGION_NAME") AS "
"SELECT"
" e.employee_id,"
" e.job_id,"
" e.manager_id,"
" e.department_id,"
" d.location_id,"
" l.country_id,"
" e.first_name,"
" e.last_name,"
" e.salary,"
" e.commission_pct,"
" d.department_name,"
" j.job_title,"
" l.city,"
" l.state_province,"
" c.country_name,"
" r.region_name"
"FROM"
" employees e,"
" departments d,"
" jobs j,"
" locations l,"
" countries c,"
" regions r"
"WHERE e.department_id = d.department_id"
" AND d.location_id = l.location_id"
" AND l.country_id = c.country_id"
" AND c.region_id = r.region_id"
" AND j.job_id = e.job_id"
"WITH READ ONLY"
IMP-00003: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
IMP-00017: following statement failed with ORACLE error 1031:
"CREATE FORCE VIEW "HR"."V" ("FIRST_NAME","LAST"
"_NAME","JOB_ID","TOTAL_SAL") AS "
"SELECT e1.first_name, e1.last_name, j.job_id, sum(e2.salary) total_sal"
"FROM employees e1,"
"( SELECT *"
"FROM employees e3) e2, job_history j"
"WHERE e1.employee_id = e2.manager_id"
"AND e1.employee_id = j.employee_id"
"AND e1.hire_date = j.start_date"
"AND e1.salary = ( SELECT max(e2.salary)"
"FROM employees e2"
"WHERE e2.department_id = e1.department_id )"
"GROUP BY e1.first_name, e1.last_name, j.job_id"
"ORDER BY total_sal"
IMP-00003: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
About to enable constraints...
Import terminated successfully with warnings.
dbwatch->exit
SQL> drop user hr cascade;
User dropped.
SQL> create user hr identified by hr default tablespace users temporary tablespace temp account unlock;
User created.
SQL> grant resource to hr;
Grant succeeded.
SQL> grant connect to hr;
Grant succeeded.
SQL> grant IMP_FULL_DATABASE to hr;
Grant succeeded.
SQL> alter user hr quota unlimited on users;
User altered.
SQL> conn hr/hr
Connected.
SQL> select count(*) from user_objects;
COUNT(*)
----------
0
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
dbwatch->export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
dbwatch->imp hr/hr file=hr.dmp full=y grants=y
Import: Release 10.2.0.1.0 - Production on Wed Jul 8 02:22:55 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
. importing HR's objects into HR
. . importing table "COUNTRIES" 25 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "COUNTRIES" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT REFERENCES ON "COUNTRIES" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "DEPARTMENTS" 27 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "DEPARTMENTS" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "EMPLOYEES" 107 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "EMPLOYEES" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT REFERENCES ON "EMPLOYEES" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "JOBS" 19 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "JOBS" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "JOB_HISTORY" 10 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "JOB_HISTORY" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "LOCATIONS" 23 rows imported
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT SELECT ON "LOCATIONS" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT REFERENCES ON "LOCATIONS" TO "OE""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OE' does not exist
. . importing table "REGIONS" 4 rows imported
About to enable constraints...
Import terminated successfully with warnings.
dbwatch->sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 8 02:23:07 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn hr/hr
Connected.
SQL> select count(*) from user_objects;
COUNT(*)
----------
35