86: l_num_prll := NULL;
87: END IF;
88:
89: BEGIN
90: ctx_ddl.drop_preference('HZ_DQM_STORAGE');
91: EXCEPTION
92: WHEN OTHERS THEN
93: NULL;
94: END;
102: from fnd_product_installations
103: where application_id = '222';
104: END IF;
105:
106: ctx_ddl.create_preference('HZ_DQM_STORAGE', 'BASIC_STORAGE');
107: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp|| ' storage (initial 4K next 8M pctincrease 0)');
108: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'K_TABLE_CLAUSE', 'tablespace ' || ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0)');
109: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'R_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0) lob (data) store as (cache) ');
110: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_INDEX_CLAUSE', 'tablespace '|| ctx_index_tbsp || ' storage (initial 4K next 8M pctincrease 0) compress 2');
103: where application_id = '222';
104: END IF;
105:
106: ctx_ddl.create_preference('HZ_DQM_STORAGE', 'BASIC_STORAGE');
107: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp|| ' storage (initial 4K next 8M pctincrease 0)');
108: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'K_TABLE_CLAUSE', 'tablespace ' || ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0)');
109: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'R_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0) lob (data) store as (cache) ');
110: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_INDEX_CLAUSE', 'tablespace '|| ctx_index_tbsp || ' storage (initial 4K next 8M pctincrease 0) compress 2');
111:
104: END IF;
105:
106: ctx_ddl.create_preference('HZ_DQM_STORAGE', 'BASIC_STORAGE');
107: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp|| ' storage (initial 4K next 8M pctincrease 0)');
108: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'K_TABLE_CLAUSE', 'tablespace ' || ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0)');
109: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'R_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0) lob (data) store as (cache) ');
110: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_INDEX_CLAUSE', 'tablespace '|| ctx_index_tbsp || ' storage (initial 4K next 8M pctincrease 0) compress 2');
111:
112: BEGIN
105:
106: ctx_ddl.create_preference('HZ_DQM_STORAGE', 'BASIC_STORAGE');
107: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp|| ' storage (initial 4K next 8M pctincrease 0)');
108: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'K_TABLE_CLAUSE', 'tablespace ' || ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0)');
109: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'R_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0) lob (data) store as (cache) ');
110: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_INDEX_CLAUSE', 'tablespace '|| ctx_index_tbsp || ' storage (initial 4K next 8M pctincrease 0) compress 2');
111:
112: BEGIN
113: ctx_ddl.drop_preference('dqm_lexer');
106: ctx_ddl.create_preference('HZ_DQM_STORAGE', 'BASIC_STORAGE');
107: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp|| ' storage (initial 4K next 8M pctincrease 0)');
108: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'K_TABLE_CLAUSE', 'tablespace ' || ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0)');
109: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'R_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0) lob (data) store as (cache) ');
110: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_INDEX_CLAUSE', 'tablespace '|| ctx_index_tbsp || ' storage (initial 4K next 8M pctincrease 0) compress 2');
111:
112: BEGIN
113: ctx_ddl.drop_preference('dqm_lexer');
114: EXCEPTION
109: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'R_TABLE_CLAUSE', 'tablespace '|| ctx_tbsp || ' storage (initial 4K next 8M pctincrease 0) lob (data) store as (cache) ');
110: ctx_ddl.set_attribute('HZ_DQM_STORAGE', 'I_INDEX_CLAUSE', 'tablespace '|| ctx_index_tbsp || ' storage (initial 4K next 8M pctincrease 0) compress 2');
111:
112: BEGIN
113: ctx_ddl.drop_preference('dqm_lexer');
114: EXCEPTION
115: WHEN OTHERS THEN
116: null;
117: END;
115: WHEN OTHERS THEN
116: null;
117: END;
118:
119: ctx_ddl.create_preference('dqm_lexer', 'BASIC_LEXER');
120: ctx_ddl.set_attribute ( 'dqm_lexer', 'index_themes', 'NO');
121: ctx_ddl.set_attribute ( 'dqm_lexer', 'index_text', 'YES');
122:
123: END ;
116: null;
117: END;
118:
119: ctx_ddl.create_preference('dqm_lexer', 'BASIC_LEXER');
120: ctx_ddl.set_attribute ( 'dqm_lexer', 'index_themes', 'NO');
121: ctx_ddl.set_attribute ( 'dqm_lexer', 'index_text', 'YES');
122:
123: END ;
124:
117: END;
118:
119: ctx_ddl.create_preference('dqm_lexer', 'BASIC_LEXER');
120: ctx_ddl.set_attribute ( 'dqm_lexer', 'index_themes', 'NO');
121: ctx_ddl.set_attribute ( 'dqm_lexer', 'index_text', 'YES');
122:
123: END ;
124:
125:
419: BEGIN
420: log('------------------------------------');
421: log('Calling add_section');
422: IF p_stype = 'ZONE' THEN
423: ctx_ddl.add_zone_section(p_dsname, p_attr,p_attr);
424: ELSE
425: ctx_ddl.add_field_section(p_dsname, p_attr,p_attr,TRUE);
426: END IF;
427: END;
421: log('Calling add_section');
422: IF p_stype = 'ZONE' THEN
423: ctx_ddl.add_zone_section(p_dsname, p_attr,p_attr);
424: ELSE
425: ctx_ddl.add_field_section(p_dsname, p_attr,p_attr,TRUE);
426: END IF;
427: END;
428:
429: PROCEDURE create_uds_prefs
431: BEGIN
432: log(' In create_uds_prefs ');
433: begin
434: log('Trying to drop user data store preferences');
435: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_party_uds');
436: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_party_site_uds');
437: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_contact_uds');
438: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_contact_point_uds');
439:
432: log(' In create_uds_prefs ');
433: begin
434: log('Trying to drop user data store preferences');
435: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_party_uds');
436: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_party_site_uds');
437: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_contact_uds');
438: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_contact_point_uds');
439:
440: exception
433: begin
434: log('Trying to drop user data store preferences');
435: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_party_uds');
436: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_party_site_uds');
437: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_contact_uds');
438: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_contact_point_uds');
439:
440: exception
441: when others then
434: log('Trying to drop user data store preferences');
435: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_party_uds');
436: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_party_site_uds');
437: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_contact_uds');
438: ctx_ddl.drop_preference(G_SCHEMA_NAME || '.hz_contact_point_uds');
439:
440: exception
441: when others then
442: log(' Exception while dropping preferences');
444: end;
445:
446: begin
447: log('Creating user data store preferences for PARTY');
448: ctx_ddl.create_preference('hz_party_uds', 'user_datastore');
449: ctx_ddl.set_attribute( 'hz_party_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_ds');
450: ctx_ddl.set_attribute( 'hz_party_uds', 'output_type', 'CLOB');
451:
452: log('Creating user data store preferences for PARTY SITE');
445:
446: begin
447: log('Creating user data store preferences for PARTY');
448: ctx_ddl.create_preference('hz_party_uds', 'user_datastore');
449: ctx_ddl.set_attribute( 'hz_party_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_ds');
450: ctx_ddl.set_attribute( 'hz_party_uds', 'output_type', 'CLOB');
451:
452: log('Creating user data store preferences for PARTY SITE');
453: ctx_ddl.create_preference('hz_party_site_uds', 'user_datastore');
446: begin
447: log('Creating user data store preferences for PARTY');
448: ctx_ddl.create_preference('hz_party_uds', 'user_datastore');
449: ctx_ddl.set_attribute( 'hz_party_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_ds');
450: ctx_ddl.set_attribute( 'hz_party_uds', 'output_type', 'CLOB');
451:
452: log('Creating user data store preferences for PARTY SITE');
453: ctx_ddl.create_preference('hz_party_site_uds', 'user_datastore');
454: ctx_ddl.set_attribute('hz_party_site_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_site_ds');
449: ctx_ddl.set_attribute( 'hz_party_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_ds');
450: ctx_ddl.set_attribute( 'hz_party_uds', 'output_type', 'CLOB');
451:
452: log('Creating user data store preferences for PARTY SITE');
453: ctx_ddl.create_preference('hz_party_site_uds', 'user_datastore');
454: ctx_ddl.set_attribute('hz_party_site_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_site_ds');
455: ctx_ddl.set_attribute('hz_party_site_uds', 'output_type', 'CLOB');
456:
457: log('Creating user data store preferences for CONTACT');
450: ctx_ddl.set_attribute( 'hz_party_uds', 'output_type', 'CLOB');
451:
452: log('Creating user data store preferences for PARTY SITE');
453: ctx_ddl.create_preference('hz_party_site_uds', 'user_datastore');
454: ctx_ddl.set_attribute('hz_party_site_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_site_ds');
455: ctx_ddl.set_attribute('hz_party_site_uds', 'output_type', 'CLOB');
456:
457: log('Creating user data store preferences for CONTACT');
458: ctx_ddl.create_preference('hz_contact_uds', 'user_datastore');
451:
452: log('Creating user data store preferences for PARTY SITE');
453: ctx_ddl.create_preference('hz_party_site_uds', 'user_datastore');
454: ctx_ddl.set_attribute('hz_party_site_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_site_ds');
455: ctx_ddl.set_attribute('hz_party_site_uds', 'output_type', 'CLOB');
456:
457: log('Creating user data store preferences for CONTACT');
458: ctx_ddl.create_preference('hz_contact_uds', 'user_datastore');
459: ctx_ddl.set_attribute('hz_contact_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_ds');
454: ctx_ddl.set_attribute('hz_party_site_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.party_site_ds');
455: ctx_ddl.set_attribute('hz_party_site_uds', 'output_type', 'CLOB');
456:
457: log('Creating user data store preferences for CONTACT');
458: ctx_ddl.create_preference('hz_contact_uds', 'user_datastore');
459: ctx_ddl.set_attribute('hz_contact_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_ds');
460: ctx_ddl.set_attribute('hz_contact_uds', 'output_type', 'CLOB');
461:
462: log('Creating user data store preferences for CONTACT POINT');
455: ctx_ddl.set_attribute('hz_party_site_uds', 'output_type', 'CLOB');
456:
457: log('Creating user data store preferences for CONTACT');
458: ctx_ddl.create_preference('hz_contact_uds', 'user_datastore');
459: ctx_ddl.set_attribute('hz_contact_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_ds');
460: ctx_ddl.set_attribute('hz_contact_uds', 'output_type', 'CLOB');
461:
462: log('Creating user data store preferences for CONTACT POINT');
463: ctx_ddl.create_preference('hz_contact_point_uds', 'user_datastore');
456:
457: log('Creating user data store preferences for CONTACT');
458: ctx_ddl.create_preference('hz_contact_uds', 'user_datastore');
459: ctx_ddl.set_attribute('hz_contact_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_ds');
460: ctx_ddl.set_attribute('hz_contact_uds', 'output_type', 'CLOB');
461:
462: log('Creating user data store preferences for CONTACT POINT');
463: ctx_ddl.create_preference('hz_contact_point_uds', 'user_datastore');
464: ctx_ddl.set_attribute('hz_contact_point_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_point_ds');
459: ctx_ddl.set_attribute('hz_contact_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_ds');
460: ctx_ddl.set_attribute('hz_contact_uds', 'output_type', 'CLOB');
461:
462: log('Creating user data store preferences for CONTACT POINT');
463: ctx_ddl.create_preference('hz_contact_point_uds', 'user_datastore');
464: ctx_ddl.set_attribute('hz_contact_point_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_point_ds');
465: ctx_ddl.set_attribute('hz_contact_point_uds', 'output_type', 'CLOB');
466:
467:
460: ctx_ddl.set_attribute('hz_contact_uds', 'output_type', 'CLOB');
461:
462: log('Creating user data store preferences for CONTACT POINT');
463: ctx_ddl.create_preference('hz_contact_point_uds', 'user_datastore');
464: ctx_ddl.set_attribute('hz_contact_point_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_point_ds');
465: ctx_ddl.set_attribute('hz_contact_point_uds', 'output_type', 'CLOB');
466:
467:
468:
461:
462: log('Creating user data store preferences for CONTACT POINT');
463: ctx_ddl.create_preference('hz_contact_point_uds', 'user_datastore');
464: ctx_ddl.set_attribute('hz_contact_point_uds', 'procedure', 'HZ_STAGE_MAP_TRANSFORM_SHADOW.contact_point_ds');
465: ctx_ddl.set_attribute('hz_contact_point_uds', 'output_type', 'CLOB');
466:
467:
468:
469: exception
514: log('In create_section_group_prefs for ' || p_entity);
515: log('Trying to drop section group preferences');
516: BEGIN
517: IF p_entity='PARTY' THEN
518: ctx_ddl.drop_section_group(g_schema_name || '.HZ_DQM_PARTY_GRP');
519: /* No Need for R12 SHADOW Staging
520: UPDATE HZ_TRANS_ATTRIBUTES_B set TEMP_SECTION=NULL
521: WHERE ENTITY_NAME='PARTY';
522: */
522: */
523: END IF;
524:
525: IF p_entity='PARTY_SITES' THEN
526: ctx_ddl.drop_section_group(G_SCHEMA_NAME || '.HZ_DQM_PS_GRP');
527: /* No Need for R12 SHADOW Staging
528: UPDATE HZ_TRANS_ATTRIBUTES_B set TEMP_SECTION=NULL
529: WHERE ENTITY_NAME='PARTY_SITES';
530: */
530: */
531: END IF;
532:
533: IF p_entity='CONTACTS' THEN
534: ctx_ddl.drop_section_group(G_SCHEMA_NAME || '.HZ_DQM_CONTACT_GRP');
535: /* No Need for R12 SHADOW Staging
536: UPDATE HZ_TRANS_ATTRIBUTES_B set TEMP_SECTION=NULL
537: WHERE ENTITY_NAME='CONTACTS';
538: */
538: */
539: END IF;
540:
541: IF p_entity='CONTACT_POINTS' THEN
542: ctx_ddl.drop_section_group(G_SCHEMA_NAME || '.HZ_DQM_CPT_GRP');
543: /* No Need for R12 SHADOW Staging
544: UPDATE HZ_TRANS_ATTRIBUTES_B set TEMP_SECTION=NULL
545: WHERE ENTITY_NAME='CONTACT_POINTS';
546: */
555: END;
556:
557: IF p_entity='PARTY' THEN
558: log('Creating party section group',FALSE);
559: ctx_ddl.create_section_group(G_SCHEMA_NAME || '.HZ_DQM_PARTY_GRP','BASIC_SECTION_GROUP');
560:
561: OPEN c_trns('PARTY');
562: LOOP
563: FETCH c_trns INTO l_trns;
569: END IF;
570:
571: IF p_entity='PARTY_SITES' THEN
572: log('Creating party site section group',FALSE);
573: ctx_ddl.create_section_group(G_SCHEMA_NAME || '.HZ_DQM_PS_GRP','BASIC_SECTION_GROUP');
574:
575: OPEN c_trns('PARTY_SITES');
576: LOOP
577: FETCH c_trns INTO l_trns;
585: END IF;
586:
587: IF p_entity='CONTACTS' THEN
588: log('Creating contact section group',FALSE);
589: ctx_ddl.create_section_group(G_SCHEMA_NAME || '.HZ_DQM_CONTACT_GRP','BASIC_SECTION_GROUP');
590: OPEN c_trns('CONTACTS');
591: LOOP
592: FETCH c_trns INTO l_trns;
593: EXIT WHEN c_trns%NOTFOUND;
600: END IF;
601:
602: IF p_entity='CONTACT_POINTS' THEN
603: log('Creating contact point section group',FALSE);
604: ctx_ddl.create_section_group(G_SCHEMA_NAME || '.HZ_DQM_CPT_GRP','BASIC_SECTION_GROUP');
605: -- add_section(G_SCHEMA_NAME || '.HZ_DQM_CPT_GRP','CONTACT_POINT_TYPE','FIELD');
606:
607: OPEN c_trns('CONTACT_POINTS');
608: LOOP