Database Reference
In-Depth Information
the funny looking connect string uses an oracle Secure external password Store. It allows you to store
the connection credentials for a tnS alias in a securely encrypted file. Chapter 10 explains the password store
in more detail.
Note
What you will certainly learn to appreciate is that the file you get can be used for all sorts of transformations.
Storage options can be skipped, owners can be replaced with the REMAP_DATA, REMAP_DATAFILE, REMAP_
TABLESPACE, REMAP_SCHEMA, and REMAP_TABLE functions. More importantly you can get all DDL statement
from the flat file if you specify the sqlfile option. Using the INCLUDE or EXCLUDE options you can limit yourself to
individual objects. If you are interested in the table DDL for a specific schema, the following will work for you:
[oracle@server1 ~]$ impdp /@pdb1 dumpfile=exp_2013-10-04.dmp \
> logfile=imp_job001.log directory=exp_dir sqlfile=tables_user1.sql \
> include=table schemas=user1
The result is the same as you would get from the dbms_metada package. Like with the package you can further
transform the output using the TRANSFORM clause in addition to the ones shown in the example. This way you
could save the day for a developer who needs to revert back to last week's code he forgot to check into the version
control system.
Additional technology available
Backup and recovery are all well and good. Sometimes however there is only a small problem and a full restore and
media recovery would take just too long. Beginning with Oracle 10g further options are available to you to get out of a
precarious situation. Most of these technologies are prefixed “flashback”, which makes it quite confusing at first. In a
backup and recovery scenario the following options can become useful, especially if the fault is discovered quickly.
Flashback table
Flashback database
Storage snapshot
Flashback table is a very nice feature relying on UNDO information in the undo-tablespace to get information
back to a table that has accidentally been changed. Note that the undo information actually has to be available in
the undo tablespace for this to work. Furthermore, your table must have row movement enabled. Flashback table is
demonstrated in the following code snippet. First, the table is created:
USER1@PDB1> create table fbtab1 enable row movement
2 as select * from all_objects;
Table created.
USER1@PDB1> select count(1) from fbtab1;
COUNT(1)
----------
89646
 
 
Search WWH ::




Custom Search