Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Export and Importing Schema from Windows database to Linux Database

JhilSep 9 2018 — edited Sep 11 2018

Dear all,,

Schema Refresh

Usually i do by calling shell script.

Once i entered the schema name, script will take care of export and import process.

>> Now just i am trying manually

Source DB Version : 11204 on Windows  (windb)

Target DB Version  :  11201 on Linux   (orcl)

I am doing schema export and import from windows to linux.

>> On Source Database (windb)

SQL> conn u2/u2

Connected.

SQL> select * from session_privs;

PRIVILEGE

----------------------------------------

CREATE SESSION

CREATE TABLE

CREATE ANY TABLE

CREATE SYNONYM

CREATE VIEW

CREATE SEQUENCE

CREATE DATABASE LINK

CREATE TRIGGER

8 rows selected.

>> ON LINUX MACHINE

[oracle@cdc3 ~]$ impdp system/manager directory=dpdir dumpfile=EXP_SCHEMA_U2_090918.DMP logfile=u2.log

Import: Release 11.2.0.1.0 - Production on Sun Sep 9 18:11:52 2018

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded

Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** directory=dpdir dumpfile=EXP_SCHEMA_U2_090918.DMP logfile=u2.log

Processing object type SCHEMA_EXPORT/USER

Processing object type SCHEMA_EXPORT/SYSTEM_GRANT

Processing object type SCHEMA_EXPORT/ROLE_GRANT

Processing object type SCHEMA_EXPORT/DEFAULT_ROLE

Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA

Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA

Processing object type SCHEMA_EXPORT/DB_LINK

Processing object type SCHEMA_EXPORT/TABLE/TABLE

Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA

. . imported "U2"."ZIGGY"                                7.143 MB  500000 rows

. . imported "U2"."DEPT"                                 5.937 KB       4 rows

. . imported "U2"."EMP"                                  8.562 KB      14 rows

. . imported "U2"."SALGRADE"                             5.859 KB       5 rows

. . imported "U2"."BONUS"                                    0 KB       0 rows

Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX

Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 18:11:57

>> On Linux  Machine Database (orcl)

SQL> conn u2/u2

ERROR:

ORA-01045: user U2 lacks CREATE SESSION privilege; logon denied

Question :

1) On Linux machine, why user 'u2' is lagging of create session privilege?

I did not set explicitly  'connect to u2'  in target database

Automatically 'create session' privilege should be transferred when i do import - am i right ?

Thanks

This post has been answered by unknown-7404 on Sep 9 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2018
Added on Sep 9 2018
15 comments
4,394 views