![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How do you list the files contained in a directory database object in Oracle? I'm working with some dumps made with expdp on Oracle 11.2.0.1.0. We say something like this: expdp scott/tiger@DEVDB DIRECTORY=build_dumps DUMPFILE=${timestamp}.dmp Then later: impdp scott/tiger@DEVDB DIRECTORY=build_dumps DUMPFILE=${timestamp}.dmp With lots of extra parameters, of course. 'build-dumps' here is the name of a directory object which our DBA set up, something like this: CREATE DIRECTORY build_dumps AS '/var/whatever/data'; The trouble is, at the point at which we want to load a dump, we don't actually know if the dump exists or not. If it doesn't, that's fine, we can run a build process to set the database up, rather than using the dump. But we do need to be able to tell if the dump exists, so we can decide what to do. How can we do this? At the moment, we just run impdp, and if it doesn't work, we assume it's probably the file being missing, and run the build process. I'd like to be a bit more elegant than this, though. |
![]() |
| Thread Tools | |
| Display Modes | |
| |