Now the default log generated from datapump tells you enough of the basic detail to be useful (and is further enhanced in 12c) however there is more information that the log could be telling us that it doesn't.
This information can be squeezed out of the master table, where datapump keeps all its processing information, as long as you don't throw this away (which unfortunately is the default....)
So first up for it to be useful to us after the event we need to keep the table - to do this we simply specify:
keep_master=y
A simple extra switch to the export. If we do this all that juicy metadata is left behind.
So assuming we did that what can we do with that information?
Well here are a couple of examples - these two assume you did a full db export and the master table is called OSAORACLE.SYS_EXPORT_FULL_06 (now the chance of your table being called that are pretty much zero - so you'll need to replace it with the appropriate table name).
So first example is this
select object_path_seqno,
object_type,
completed_rows as number_exported,
object_type_path,
(completion_time - start_time) * 60 * 60 * 24 as elapsed
from osaoracle.sys_export_full_06
where process_order = -5
order by object_path_seqno
This produces the following output
So we can see how many objects of a certain type were extracted, the order they were done in and how long that extract took
Tables are a little more tricky as the metadata is split over a couple of lines - but we can sort that with some basic analytics - so the next example is this
select process_order,
tab_owner,
tab_name,
obj_tbs,
round((est_size / (1024 * 1024 * 1024)), 2) || ' GB' estimated_size,
round((dump_length / (1024 * 1024 * 1024)), 2) || ' GB' actual_SIZE,
unload_meth,
completed_rows,
elapsed_time
from (select base_object_schema,
object_name,
(lag(object_name, 1) over(order by process_order)) as TAB_NAME,
(lag(base_object_schema, 1) over(order by process_order)) as TAB_OWNER,
(lag(object_tablespace, 1) over(order by process_order)) as obj_tbs,
(lag(size_estimate, 1) over(order by process_order)) as est_size,
(lag(unload_method, 1) over(order by process_order)) as unload_meth,
completed_rows,
elapsed_time,
process_order,
dump_length,
unload_method
from osaoracle.sys_export_full_06
where object_type_path = 'DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA'
and process_order >= 1)
where object_name is null
order by process_order
So with this we get some extra useful info, estimated size vs actual, tablespace names for objects, unload method used and elapsed time.
You might think this all pretty pointless but if you are trying to analyze where all the time is spent on export (and indeed import - though different queries are needed here) it can be a very useful tool.
Thanks...
ReplyDeleteUseful blog. Every post is crisp and simple. Thanks for your time.
ReplyDeletevery good thanks admin
ReplyDeletethanks admin
ReplyDeletegood admin
ReplyDeleteMüşterilerimizin tam ihtiyacı olan çözümü belirleyip, tüm beklentileriniz karşılayacak şekilde hizmet vermeyi amaçlıyoruz.
ReplyDeleteNice GOod Thanks..
ReplyDeleteNice post
ReplyDeleteWe Produce Quality Awnings to the World. Our Products are Our Business With 5 Years Warranty Awning. http://www.tenteimalatcisi.com/
ReplyDeleteAutomatic Pergola Systems That Will Change the Air of Your Space, Suitable for All Weather Conditions. http://www.pergoleimalatcisi.com/
ReplyDeleteThe guillotine glass system is a remote-controlled system that can be opened vertically with the help of a motor. http://www.giyotincamimalatcisi.com/
ReplyDeleteWouldn't you like to experience that we are one of the leading companies in the sector in the production of Outdoor, Beach, Garden, Balcony, Sea, Cafe, Restaurant Umbrellas by getting support about product information and having knowledge of every detail of the production of the systems you order? http://www.semsiyeimalatcisi.com/
ReplyDeletewhich meets all their needs by offering a wide range of products to its domestic and foreign customers under the quality and reliability of the Elitplus Manufacturer Company, is constantly growing. We manufacture, assemble and export Aluminum, Aluminum Profile, Aluminum Pipe, Aluminum Joinery, Composite Coating, Aluminum Plate, Aluminum Grilles to all over the world. http://www.aluminyumimalatcisi.com/
ReplyDeleteLegend!
ReplyDelete