Skip to Main Content

Database Software

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!

Executing impdp remotely using PowerShell...

superfreak3-JavaNetMar 21 2017 — edited Mar 27 2017

Hi all,

I have the following impdp command with parameters which seems to work when executed from a command prompt locally on my Oracle DB Server...

impdp system/MyPassword1@ORCL schemas=MYAPP directory=TEST_DIR TABLE_EXISTS_ACTION=replace PARFILE=C:\DBBackup\ImpExcludes.par dumpfile=dborcl1.dmp logfile=impORCL1.log

Locally on the machine I just run the cmd prompt as administrator and paste the above command and everything seems to go as planned.

However, I need to execute this import remotely from a CI build server and I can't really get it to fire off.  I'm not sure if I can execute it directly in the PowerShell script block, if I should create a utility that would be housed on the db server to run the command, then that would be called from the remote CI build machine, etc.

If I call from the PowerShell script block...

Invoke-Command -ComputerName MYSYSTEM-ORCL1 -ScriptBlock { impdp system/MyPassword1@ORCL schemas=MYAPP directory=TEST_DIR TABLE_EXISTS_ACTION=replace PARFILE=C:\DBBackup\ImpExcludes.par dumpfile=dborcl1.dmp logfile=impORCL1.log } -Credential $credential

... I get...

NotSpecified: (:String) [], RemoteException

    + CategoryInfo          : NotSpecified: (:String) [], RemoteException

    + FullyQualifiedErrorId : NativeCommandError

    + PSComputerName        : MYSYSTEM-ORCL1

Import: Release 12.1.0.2.0 - Production on Tue Mar 21 16:40:37 2017

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

NotSpecified: (:) [], RemoteException

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

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

Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01":  system/********@ORCL schemas=MYAPP directory=TEST_DIR TABLE_EXISTS_ACTION=replace

PARFILE=C:\DBBackup\ImpExcludes.par dumpfile=dborcl1.dmp logfile=impORCL1.log

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

NotSpecified: (:) [], RemoteException

Processing object type SCHEMA_EXPORT/TABLE/TABLE

NotSpecified: (:) [], RemoteException

Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA

. . imported "MYAPP"."FM100MEMF"                         1.872 GB  422890 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100MEMR"                         410.8 MB   93953 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100FIL"                          473.5 MB 1390851 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100CMD"                          153.8 MB  786624 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100HIS"                          151.9 MB  487647 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100FTSFMQ"                       81.94 MB  734285 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100REV"                          74.47 MB  185928 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100RELF"                         25.22 MB  122418 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100RELR"                         20.65 MB   98817 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100FILEX"                        9.325 MB   41796 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100WFREV"                        8.195 MB   50042 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100REVEX"                        2.968 MB   12789 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100USR"                          1.528 MB     267 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100PLUGIN"                       535.1 KB      29 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100TRTMPL"                       221.5 KB       2 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100TMPL"                         81.46 KB       3 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100DEL"                          816.0 KB   15534 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100LTR"                          791.9 KB    6634 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100MSTR"                         15.54 KB       2 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100MEMH"                         266.4 KB    1082 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100CONTROL"                      220.3 KB    1974 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100TRNSM"                        231.9 KB     913 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100FMTSEG"                       50.55 KB     492 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100TGT"                          163.2 KB    1070 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100ACTOPTIONS"                   6.632 KB       5 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100APIPR"                        6.898 KB       1 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100CONTAINERITEMS"               118.3 KB     768 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100FLTP"                         8.054 KB       3 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100LIB"                          114.4 KB     664 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100REFRESHTOKENS"                    0 KB       0 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100SETTINGS"                     7.242 KB       5 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100WF"                           9.757 KB       5 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100WFFIL"                        136.6 KB     908 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100COMP"                         93.22 KB     750 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100CONTAINERS"                   60.37 KB     314 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100GPM"                          66.17 KB     797 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100LIBPR"                        46.50 KB     534 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100ACTDEF"                       6.476 KB       3 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100ACTREL"                        8.25 KB       1 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100CARDS"                        6.546 KB       6 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100CLIENTS"                      8.015 KB       5 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100CONNECTION"                       0 KB       0 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100CONT"                         41.56 KB     305 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100DISTRI"                       23.32 KB     234 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100DISTRL"                       7.679 KB      31 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100FIELDS"                       20.58 KB     246 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100FORMAT"                       10.93 KB      70 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100GRP"                          13.30 KB     105 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100JOBS"                         12.70 KB      35 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100LIBRARYFILTER"                    0 KB       0 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100LIBWF"                        33.36 KB     475 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100LNCH"                          9.25 KB       4 rows

NotSpecified: (:) [], RemoteException

. . imported "MYAPP"."FM100LOCKS"                            0 KB       0 rows

Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX

NotSpecified: (:) [], RemoteException

Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX

Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

NotSpecified: (:) [], RemoteException

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

NotSpecified: (:) [], RemoteException

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

Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

NotSpecified: (:) [], RemoteException

Processing object type SCHEMA_EXPORT/STATISTICS/MARKER

NotSpecified: (:) [], RemoteException

Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at Tue Mar 21 16:43:31 2017 elapsed 0 00:02:50

NotSpecified: (:) [], RemoteException

It looks as though it runs through but there are a lot of NotSpecified RemoteExceptions.  That is going to show up in my build log and cause Partial Success notifications, but that's another story.

Does anyone know how I can properly call/execute this on a remote server without getting the exceptions?  I've already asked Oracle related PowerShell questions in a Microsoft forum and was told to take it up with Oracle.  Not too helpful, so hoping for better luck here.

Thanks for any information you can provide.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2017
Added on Mar 21 2017
7 comments
3,201 views