Database using data pump migration encounters LOB fields

Source: Internet
Author: User

IMPDP system/clic1234 Attach=sys_import_ilearn_tra

Desc Ilearn_tra. Notifi_tactic

Desc Ilearn_tra. Msg_mail
Desc Ilearn_tra. Nt_history
Desc Ilearn_tra. Attempt
Desc Ilearn_tra. Notifi_tactic
Desc Ilearn_tra. User_init_exam

While True
Do
Ora Tsfree
Sleep 600
Done


CREATE TABLE T_lob AS SELECT DISTINCT (table_name) from [email protected]_datapump where owner = ' Ilearn_tra ';

SELECT DISTINCT (a.table_name) from dba_lobs A,t_lob b where a.table_name not in (select table_name from T_LOB) and A.owner = ' Ilearn_tra ';

Attempt
User_init_exam


Select Bytes/1024/1024,b.table_name,a.segment_name from dba_segments a,dba_lobs b where a.segment_name = B.segment_name and B.table_name in (' Attempt ', ' User_init_exam ') Order by BYTES;

Select SUM (a.bytes/1024/1024) as s_size from dba_segments a,dba_lobs b where a.segment_name = B.segment_name and B.owner = ' Ilearn_tra ' and b.table_name= ' user_init_exam ';


Subcategory_pk
Select bytes/1024/1024 from dba_segments where segment_name= ' subcategory_pk ';
Select round (COUNT (Distinct (constraint_name))/512*100,2) | | ' % ' as AA from all_constraints where owner= ' Ilearn_tra ' and constraint_type= ' R ';
Select COUNT (Distinct (constraint_name)) from all_constraints where owner= ' Ilearn_tra ' and constraint_type= ' R ';
Select Constraint_type from all_constraints where constraint_name= ' ILA_ORDER_PART_XREF_ORDER_FK ';

OWNER not NULL VARCHAR2 (30)
Constraint_name not NULL VARCHAR2 (30)
Constraint_type VARCHAR2 (1)
table_name


--create Table Lob_persent as
INSERT INTO Lob_persent
SELECT round (SUM (c.bytes/1024/1024)/SUM (a.bytes/1024/1024) * 100, 2) | | '% ' as Percent,to_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') as Nowtime
From [email Protected]_datapump A,
[Email Protected]_datapump B,
Dba_segments C,
Dba_lobs D
WHERE C.segment_name = D.segment_name
and D.owner = ' Ilearn_tra '
and d.table_name = ' User_init_exam '
and a.segment_name = B.segment_name
and B.owner = ' Ilearn_tra '
and b.table_name = ' user_init_exam ';
Commit
SELECT * from Lob_persent;

Create or replace procedure test as
Begin
SELECT round (SUM (c.bytes/1024/1024)/SUM (a.bytes/1024/1024) * 100, 2) | | '% ' as Percent,to_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') as Nowtime
From [email protected]_datapump a,[email protected]_datapump b,dba_segments c,dba_lobs D
WHERE C.segment_name = D.segment_name
and D.owner = ' Ilearn_tra '
and d.table_name = ' User_init_exam '
and a.segment_name = B.segment_name
and B.owner = ' Ilearn_tra '
and b.table_name = ' user_init_exam ';
End
/

Declare
JOB1 number;
Begin
Dbms_job.submit (JOB1, ' test; ', Sysdate, ' sysdate+1/144 ');
End
/

Select SUM (bytes/1024/1024) from dba_segments a,dba_lobs b where a.segment_name = b.segment_name and B.owner = ' Ilearn_tra ' ;


Power Collection Port
BYTES/1024/1024 table_name Segment_name
--------------- -------------------- ------------------------------
.0625 attempt sys_lob0000053178c00039$$
.0625 attempt sys_lob0000065763c00039$$
6 User_init_exam sys_lob0000054426c00018$$
User_init_exam sys_lob0000067328c00018$$
User_init_exam sys_lob0000067328c00028$$
244 User_init_exam sys_lob0000067328c00027$$
244 User_init_exam sys_lob0000067328c00029$$
7481 User_init_exam sys_lob0000054426c00017$$
67883 User_init_exam sys_lob0000067328c00017$$


Kark
BYTES/1024/1024 table_name Segment_name
--------------- ------------------------------ ------------------------------------------------------------------ ---------------
.0625 attempt sys_lob0000126246c00039$$
.0625 attempt sys_lob0000128357c00039$$
. User_init_exam sys_lob0000128579c00018$$
.5625 User_init_exam sys_lob0000126445c00018$$
2 User_init_exam sys_lob0000128579c00028$$
8 User_init_exam sys_lob0000128579c00027$$
User_init_exam sys_lob0000128579c00029$$
6859 User_init_exam sys_lob0000126445c00017$$
11980 User_init_exam sys_lob0000128579c00017$$



75930
75393.75

24732

1 min 256M


Source:
CREATE OR REPLACE VIEW User_init_exam_lob
(size)
As select sum (a.bytes/1024/1024) from dba_segments a,dba_lobs b where a.segment_name = b.segment_name and B.owner = ' ilear N_tra ' and b.table_name= ' user_init_exam ';


EXEC dbms_stats. Gather_schema_stats (' Ilearn_tra ', estimate_percent = Dbms_stats.auto_sample_size,method_opt = ' For all ' Columns size auto ', degree = 15,cascade = true);
EXEC dbms_stats. Gather_schema_stats (' Ila_sap ', estimate_percent = Dbms_stats.auto_sample_size,method_opt = ' For all columns Size auto ', degree = 15,cascade = true);
EXEC dbms_stats. Gather_schema_stats (' ilearn_job ', estimate_percent = Dbms_stats.auto_sample_size,method_opt = ' For all ' Columns size auto ', degree = 15,cascade = true);
EXEC dbms_stats. Gather_schema_stats (' Ilearn ', estimate_percent = Dbms_stats.auto_sample_size,method_opt = ' For all columns Size auto ', degree = 15,cascade = true);
EXEC dbms_stats. Gather_schema_stats (' Ilearn_beiyan ', estimate_percent = Dbms_stats.auto_sample_size,method_opt = ' For all ' Columns size auto ', degree = 15,cascade = true);
EXEC dbms_stats. Gather_schema_stats (' Apex_public_user ', estimate_percent = Dbms_stats.auto_sample_size,method_opt = ' For all ' Columns size auto ', degree = 15,cascade = true);


Ilearn_tra
Ila_sap
Ilearn_job
Ilearn
Ilearn_beiyan
Apex_public_user

Alter system set "_gc_policy_minimum" =1000000 sid= ' ilndb1 ' Scope=both;
Alter system set "_gc_affinity_ratio" =1000000 sid= ' ilndb1 ' Scope=both;

Alter system set "_gc_policy_minimum" =1000000 sid= ' ilndb2 ' Scope=both;
Alter system set "_gc_affinity_ratio" =1000000 sid= ' ilndb2 ' Scope=both;

Alter system set "_gc_policy_minimum" =1000000 sid= ' ilndb3 ' Scope=both;
Alter system set "_gc_affinity_ratio" =1000000 sid= ' ilndb3 ' Scope=both;


CONFIGURE SNAPSHOT controlfile NAME to ' +datadg/ilndb/controlfile/snapcf_ilndb1.f ';
CONFIGURE SNAPSHOT Controlfile NAME Clear

+datadg/ilndb/controlfile/snapcf_ilndb1.f

Database using data pump migration encounters LOB fields

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.