Pursuant to this question: Is this package missing and if so, how do I fix?
...now I actually want to perform the copy of a schema using this package. ...except I can't figure out how to do that. I've seen this: How to create copy of full schema on same database in oracle but I can't seem to execute the commands. As mentioned in the previous question, we are running Oracle in a docker container, so this might be complicating matters. Again, I'm using DataGrip to connect. Since it's in a container, all of our connections are from remote. ...am I going to have to get into the container somehow? Docker is also something that is outside of my expertise.
I've tried executing:
expdp fromUser/fromPword schemas=sourceSchema directory=DUMPDIR dumpfile=dump.dmp logfile=explog.txt
...as well as...
exec expdp fromUser/fromPword schemas=sourceSchema directory=DUMPDIR dumpfile=dump.dmp logfile=explog.txt
I've also created the directory object DUMPDIR and granted read/write to it.
-
what error message are you getting? Note that expdp is a command line client. You run it on the host OS.Andrew Brennan– Andrew Brennan2016年08月24日 14:03:34 +00:00Commented Aug 24, 2016 at 14:03
-
OK then that is probably the problem. I didn't know you could execute stored procedures from CLI. ...or is it possible that an Oracle package might contain more that Stored Procedures?user447607– user4476072016年08月24日 14:09:08 +00:00Commented Aug 24, 2016 at 14:09
-
expdp is not a stored procedure. It probably uses some stored procedures to execute its tasks, but it's a command line client.Andrew Brennan– Andrew Brennan2016年08月24日 14:27:48 +00:00Commented Aug 24, 2016 at 14:27
-
Understood but this seems odd to me because it's part of the DBMS_DATAPUMP package according to the docs.user447607– user4476072016年08月24日 15:19:02 +00:00Commented Aug 24, 2016 at 15:19
-
I think you need to read those docs more carefullyAndrew Brennan– Andrew Brennan2016年08月24日 15:27:11 +00:00Commented Aug 24, 2016 at 15:27
1 Answer 1
expdp is a command line utility that interacts with the DBMS_DATAPUMP API. You run it on the host OS, not from within another client.
https://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_datpmp.htm#BABHBEHH
See Also: Oracle Database Utilities for more information on the concepts behind the DBMS_DATAPUMP API, how it works, and how it is implemented in the Data Pump Export and Import utilities
https://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_overview.htm#i1009203