External tables & tkprof in DBA

EXTERNAL TABLES

External tables are the tables which access the data present in external source This table has the data that is stored in outside database We can query this table which has data outside the database

We use external table when data present outside the database is needed for some particular operation in our database And at this scenario we can create external table Since it does not support DML operations, we can view it temporarily and we can drop the table

I have two files called country1.txt and country.txt and now I am going to create an external table for these two files

Created a directory and also created the external table

When I viewed the table it provided me the below result

 

TKPROF

The main purpose of tkprof is make the oracle trace files on readable format Tkprof helps us to identify the root cause if the server is slow or if there is any long running query processing We have to enable the sql_trace to true

ALTER SESSION SET SQL_TRACE = TRUE;

Initially I have enabled the sql_trace to true, by getting into the location of trace I found lot of trace files

And I converted the recent trace file to readble format using tkprof command

TKPROF  FILENAME.TRC  OUTPUT.OUT

 

Posted by:Sakthi Sethu Perumal S

Recent Posts