Top Banner
Advanced Supply Chain Planning Agenda Module Objective Memory Based Planning (MBP) Overview Ilog Technologies Supply Chain Optimizer High Level Scheduler Memory Based Planner (MBP) Memory Based Planner Database Maintenance Simulation Planning
22
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MB_PLAN

Advanced Supply Chain Planning

Agenda

• Module Objective • Memory Based Planning (MBP) Overview • Ilog Technologies • Supply Chain Optimizer • High Level Scheduler • Memory Based Planner (MBP) • Memory Based Planner Database Maintenance • Simulation Planning

Page 2: MB_PLAN

Copyright Oracle Corporation, 2000. All rights reserved.

Memory Based Planner

Oracle Applications 10.7 / 11.x / 11i

Application Data Repository

Staging Tables

APS Snapshots

APS Views

Application Data Repository

APS Snapshots

APS Views

Key Transformation

Operational Data StorePlanning Data Store

Advanced Planning and Scheduling

$APPLCSF/out/ASCII Flat Files

Advanced Supply Chain Planning

Oracle Applications 10.7 / 11.x / 11i

Supply Chain Optimizer High Level Scheduler

Planner’s Work Bench

ASCII Flat Files

SimulationPlanning

Collection Work BenchGlobal Available

to Promise

Global Availableto Promise

Planner’s Work

Bench updates

ASCP Processing

Planning Snapshot:

• ODS and/or PDS writes to ASCII flat files. The practice of deleting these ASCII flat files israther common to save space. Please note that if these files are not present for a specific plan,simulation re-plans are not possible. The MBP would have to be launched again and newASCII flat files would have to be created. • The process uses $APPLCSF, if set. If $APPLCSF is not set, $MSC_TOP/out is used.They can be identified by their extensions of .ctl, .dis, .dat and .bad. • MBP Performs loop checking/ low level code computations while MBP loads data from flatfiles

Page 3: MB_PLAN

Memory Based Planner:

• Load Flat files to MBP trees.• MBP is invoked to prepare data for SCO• Invoke SCO• Invoke MBP for netting purposes• Invoke HLS• Write output to ascii flat files• Load data to PDS, possibly consuming a partition

If the profile option Direct Load is set to yes, all SQL*Loader issues apply.

Oracle Advanced Supply Chain Planning Engine

Oracle Memory Based Planner (MBP)

Ilog High Level Scheduler (HLS)Ilog Supply Chain Optimizer (SCO)

Advanced Supply Chain Planner (ASCP)

There are three components to the Advanced Supply Chain Planning Engine (ASCP). Thesethree components share a common data model and are linked together in a single executablenamed MSONEW. Data conversion during processing does not need to occur, thusperformance of the ASCP plan is not affected when data is transferred between Ilog modulesand Oracle's Memory Based Planner (MBP).

Page 4: MB_PLAN

The three modules perform specific functions critical in producing an MRP plan that can beproduced within the manufacturing organization. Virtually every plan will have exceptions.From the inability to secure raw materials to resource shortages. ASCP recognizes theseshortcomings and produces resource and material constrained plans that are optimized to meetbusiness objectives while alerting the user to exceptions that exist while producing to the plan.Plans may also be optimized to meet business objectives such as On Time Delivery.

ASCP Components:

SCO - suggest planned orders after considering all constraintsMBP - netting and planned order placementHLS - allocation and optimization of resource usage

Advanced Supply Chain Planning (ASCP) operates in three modes; Unconstrained,Constrained, Optimized.

• An unconstrained plan offers the ability to execute ASCP without respect to material orcapacity constraints. The MBP will assume infinite capacity and infinite supply. This is thelogic offered previous to 11i.

• A constraint-based scheduling engine will ensure the plan is feasible and respects all of given

material or resource constraints. A constrained plan respects the realistic limitations of thedefined supply chain. Every entity in the supply chain, that is defined, will be exploited tothe extent that it offers resources or materials required to meet the given demand. Materialsand resources limit the maximum production output of the manufacturing plant. Alternatesuppliers, resources and substitute components offer greater flexibility when key productionparticipants are taxed beyond ability or availability.

• An optimized plan manipulates and delivers ASCP output that best matches the stated plan

objectives. Objectives include maximum inventory turns, maximize on time delivery,minimize inventory costs, and maximize overall plan profit. ASCP simultaneously plansmaterial and capacity while considering the weighted objectives of optimization settings.Constraints must be used if optimization if desired. If the plan is setup to maximize on timedelivery, the ASCP engine will not violate available resources or stated supply to meet ontime deliveries. Exception messages relating to late delivery are still likely given the availablematerials and resources.

ASCP creates infinite, constrained and/or optimized MRP plans that are coordinated for eachorganization defined in the plan.

Page 5: MB_PLAN

ILOG

Only Ilog supports multiple, complementary optimization technologies covering the entire breadthof industry problems, from high-level planning to tactical operations. Based in France, Ilog hasexcelled at delivering programmatic solutions that resolve complex problems. Additionalinformation concerning Ilog may be obtained at www.ilog.com.

Memory Based Planner - MSONEW

Oracle Advanced Supply Chain Planning Engine

Oracle Memory Based Planner (MBP)

Ilog High Level Scheduler (HLS)Ilog Supply Chain Optimizer (SCO)

Third Generation of Material Requirements Planning in memory. What does Memory Basedactually mean? The three executables, SCO, MBP, HLS make a unique executable, sharing thesame memory.

The advantages are:• All executables and data are in memory, so critical I/o bottlenecks are avoided• We use the existing MBP data model thus reducing the possibilities of new bugs• Process lifecycle is shortened

Page 6: MB_PLAN

ILOG CPLEX Supply Chain Optimizer - MSONEW

Oracle Advanced Supply Chain Planning Engine

Oracle Memory Based Planner (MBP)

Ilog High Level Scheduler (HLSIlog Supply Chain Optimizer (SCO)

• C library used in solving large-scale optimization problems in the area of planning and resourceallocation. • Cplex uses techniques from linear programming and mixed integer programming. • Constraint programming uses information contained in the problem to prune the search space,in order to more rapidly identify feasible solutions. It is ideally suited for operational problems,which require fast, feasible answers. An MRP plan is good example of this. Given stateddemand, constrained time, limited materials and resources, what is the proper order ofmanufacturing and what is the most efficient use of resources. • It is important to note that as you adjust Penalty Factors or Plan Objectives, the volume ofexception messages created will fluctuate.

Resources considered in the problem area include:• Transportation• Supplier Capacity• Material On Hand• Available Resources

Page 7: MB_PLAN

Supply Chain Optimizer (SCO) OverviewTim

e

To MRP

:Cutoff

Months Available Resources

Demand-Supply

Given Constraints

Given Constraints

x

x

x

x

Optimized, best fit plan

honed to user settings

Possible plans produced

during SCO passes

The SCO makes several passes at the planning problem eventually making the determinationthat further analysis would provide diminished results. As indicated in the diagram above, Xrepresents attempts at problem resolution by the SCO.

• Oracle ASCP solves the problem of planning the production of ordered products, given finitecapacity while considering practical industrial constraints. • Given an amount of TIME, as indicated by the setting of the MRP:Cutoff Months profileoption.

Page 8: MB_PLAN

• Allocated with available RESOURCES as made available from the source Application DataStore (ADS) instances. • Assigned a number of TASKS contained within demand, supply, netting, etc. • Oracle ASCP stops the processing of SCO when the results produced are within anacceptable tolerance range when compared to a best previous plan in the current session. TheASCP engine must take over at some point otherwise the SCO engine would execute until theresults were as near perfection as possible.

High Level Scheduler - MSONEW

Oracle Advanced Supply Chain Planning Engine

Oracle Memory Based Planner (MBP)

Ilog High Level Scheduler (HLS)Ilog Supply Chain Optimizer (SCO)

ILOG solver and optimization technology optimizes plans to strategic objectives. Incorporatedwith third-generation memory based planning, the High Level Scheduler (HLS) producesoptimal resource usage decisions aiding in the delivery of production and distribution plans foreach organization's resources.

The ILOG Solver or High Level Scheduler is a C++ library for solving problems in planning,allocation, and optimization exploiting constraint programming and object orientedprogramming. The most efficient use of resources is an example of this type of problem. Givena proposed schedule of resource utilization, fine tune and hone the resource usage by groupinglike activities, like products, comparing costs, demand dates and resource availability.

Page 9: MB_PLAN

High Level Scheduler (HLS) Overview

Resource Utilization Before HLS

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

Day 1

Day 2

Day 3

Day 4

Day 5

Resource Utilization Before HLS

MBP produces planned orders with a start date that is indifferent to resource utilizationconcerns. Planned order start dates can leave a resource schedule similar to the scheduleabove. Above, the resource is insufficiently utilized as indicated by the gray shaded boxes.The white boxes indicate times when the resource is not being scheduled to fulfill a plannedorder.

Page 10: MB_PLAN

High Level Scheduler (HLS) Overview

Resource Utilization After HLS

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

8am 12pm9am 10am 11am 1pm 2pm 3pm 4pm 5pm

Day 1

Day 2

Day 3

Day 4

Day 5

8am

Resource Utilization After HLS

After the HLS finishes smoothing resource utilization, there may be resource downtime due tosupply chain lags, resource maintenance and user defined plan objectives and penalties. Theabove graph indicates that HLS has utilized the resource to the best of it’s ability leaving fewtimes of resource utilization lags. The results of HLS processing will change the planned orderstart date prior to the plan results being delivered to the end user.

HLS Data FilesIf you are experiencing problems with the HLS, you may need the HLS data files. As data isunloaded from the MBP, data files are prepared that are loaded into HLS. These data files canbe captured by executing the following commands:

Page 11: MB_PLAN

It is highly recommended that an extraction of MBP data files be supplied to Developmentbefore discussing MSONEW/HLS behavior or MSONEW/HLS errors.

Before proceeding, consider attempting the Advanced Supply Chain Planner -Memory Based Planner after relinking the MSONEW executable:

Adrelink.sh should be at version 115.58 or higher. Apply patch1497013 to bring adrelink,sh up to this version. This patch is included in AD-D1627493 and above and in11i.AU.C 1622303 and above.The command to relink is as follows:issue adrelink.sh force=y "mso MSONEW"

Extracting MBP and HLS debug and data files from the ASCP MSONEWexecutables:

1) Determine the unix shell being used: $ echo $SHELL /bin/ksh or $ env | grep SHELL SHELL=/bin/ksh

2) Depending upon the shell being used, set the FDWHOAMI variable: ksh (korne shell) $ export FDWHOAMI=0,704,20454 sh (bourne shell) $ FDWHOAMI=0,704,20454 $ export FDWHOAMI csh (cshell) setenv FDWHOAMI 0,704,20454

Verify that FDWHOAMI is set by: $ echo $FDWHOAMI

3) Make a directory that will hold the data files:

$ mkdir data under $MSC_TOP. Ensure that space and privileges are adequate.

Page 12: MB_PLAN

4) Attain the plan_id: The plan id may be obtained either from the planner work bench by using the drop down menu: Help/Diagnostics/Examine. Then look for plan_id. Alternatively, execute the following query from sqlplus:

select plan_id from msc_plans where compile_designator='&plan_name';

5) $MSO_TOP/bin/MSONEW <dbuser/passwd@db> 0 Y -d <plan_id> db is the database sid or instance

6) After the Memory Based Planner - MBP process completes, tar the files

in the $MSC_TOP/data directory. - cd $MSC_TOP/data - tar -cuf data.tar data

7) Upload the tar file and log files from the MBP process to Metalink.

* NT instructions will be available via Metalink.

Page 13: MB_PLAN

Load all planning data from files into data structures in memory. (C - Function)

Run MBP and flush output data back to Memory. (C - Function)

if Supply Chain Optimizer Module is invoked: (C++ - Function). Run SCO and Output results to the common C-data structures

Plan problem in memory and update data structures with output results. MBP massages databefore HLS is invoked

(C++ - Function). Run HLS and output results to the common C-data structures

Write data from Oracle Temporary Tables to ASCII Flat Files

Inside the Memory Based Planner

Loop checking is done in the snapshot as well as low level computations. Loop checking isdone for WIP, Sourcing and BOM. In Unix, raise your stack size if looping becomes and issue.

• The processing flow of MSONEW is new to APS. With the introduction of ILOG libraries,additional data manipulation must take place. As we pass supply/demand information to ILOGand receive possible plans from ILOG, additional adjustments need to be made to the plannedorders, time fences and dates.

• The three sequential modules, discussed above, make ASCP. These modules, combinedtogether, make a unique executable, sharing the same memory. This, in memory data model, isthe existing C MBP data model currently used in 10.7 and 11.x. The difference is that C++data wrappers are added to the data to make it presentable to the ILOG modules.

Page 14: MB_PLAN

The MBP is an Application Object Library (AOL) concurrent program called MSONEW.MBP will cache data objects within your APS server memory. MBP performs netting andflushes the results into ASCII flat files. Finally loading these changes into PDS

NOTE: MSONEW is launched when Constraints or Optimization is used or licensed.MSCNEW is used when the constraint option is not chosen or installed.

Completion of ASCP When Using Plan Partitions

MSONEWCompletesProcessing

PlanningMarks PDSPartition asUnusable

UnusablePDSPartition isTruncated

ASCII Flat Files Swapped into Unusable PDS Partition

UnusablePDSPartition isTruncated

ASCII Flat files produced by the MBP are deleted after being loadedinto the PDS.

• While the data is swapped from the Oracle temporary tables into the PDS data store, theactive partition is marked as unusable while the swap occurs. • This leaves remaining plans, residing in their respective plan partitions, active and available tousers via the Planner's Workbench. However, this functionality will not allow for theconcurrent execution of multiple MBPs at the same time.

Page 15: MB_PLAN

• Once the data is swapped from memory into the correct plan partition, the partition ismarked as active, execution occurs as before MBP ran. • If the ASCP process fails during the truncation and swapping process, the local partitionindexes could be left marked as unusable. Please see the section regarding partitions to enablethe partition indexes. • If MSC:Share Plan Partitions is set to YES, the above functionality is not used. The MBPwill have to delete the MBP data from the prior successful MBP for the specific plan.

Copyright Oracle Corporation, 2000. All rights reserved.

Applied = no and status = 0This is done for eachdata that is changed via Planner’s Workbench

Load data into MBP afresh

Perform all necessary MBP/SCO/HLS data manipulations

Write ASCII flat files

Update PDS data store

Load Simulation Changes from PDS

Erase PDS ASCII Flat Files

Load ASCII flat filesfrom previous ASCPexecution

Simulation Planning

The five data groups that can be manipulated for simulation replan purposes are:Supply, Demand, Supplier Capacity, Resource Requirements, Resource Availability

Page 16: MB_PLAN

Simulation Change DetectionSimulation changes are changes affected by the user using the PWB. These changes are savedby the PWB with applied = ‘N’, or 2, and status =0. These attributes are used to identify and loadthese changes back into MBP. Data changed by the workbench is written into the PDS. SCOand HLS may decide to plan for assemblies and/or components that have been affected by userchanges introduced via the Planner’s Workbench. For example, adding a new resource wouldtrigger additional replanning activities.

Simulation PlanningThis SQL will reveal the rows in msc_demands that have been changed within the Planner'sWorkbench while preparing to execute a simulation plan.

select SCHEDULE_DESIGNATOR_ID sch_desg, PLAN_ID, INVENTORY_ITEM_ID, SR_INSTANCE_ID, APPLIED from msc_demands where applied = 2;

The above select would extract data from the Planning Data Store (PDS).

MSC_FILES

The MSC_FILES table is used to store the list of files which are used in the generation of anMPS, MRP or DRP plan. Data in this table is updated each time a plan is run. TheFILE_TYPE column contains predefined values that are used during a planning run. Noinformation is available concerning the file_type code meanings. The FILE_NAME columncontains the name of the data file generated during the last plan run.

This information may prove useful when saving data files for simulation planning purposes.Based upon the compile_designator found within msc_plans, the query below joins the plan_idof msc_plans to msc_files to retrieve the .dat files created during the planning run. These are thedata files that are required for simulation planning purposes.

select substr(file_name,1,50),file_creation_datefrom msc_files a, msc_plans bwhere b.compile_designator = '&my_plan'and a.plan_id = b.plan_id;

Page 17: MB_PLAN

ASCP Performance

Performance problems are easy to detect, but the root cause is often difficult to diagnose. Ifyou believe the performance of ASCP unacceptably slow or if you've noticed a degradation ofperformance over time, these general tips may improve your performance.

PCTFREE:• Make sure the database objects in the MSC schema have a PCTFREE of zero. Pctused

and Pctfree determine the usage of Oracle blocks for row storage. Pctfree instructs theOracle RDBMS to leave a percentage of the row length * Pctfree available for rowexpansion. Pctused instructs the Oracle RDBMS to begin using the same Oracle block foranother row after row length * pctused is used. Pctused is not is important as pctfree.

• Additionally, Storage clauses control the spread of data within Oracle blocks. At a number

of sites the major tuning act we have accomplished has been to improve the blocking factoron an otherwise fixed I/O bound application. Improper blocking and a pctfree > 0 canhave a profound effect on performance.

• When building your indexes consider setting the pctfree to zero. If the table(s) indexed are

not subject to growth, setting the pctfree may improve disk access. Set the pctfree to alower number if the table is expected to grow.

• Since data rows within the PDS does not expand in size, instructing the Oracle RDBMS to

fill each row, leaving zero bytes free for row expansion, is a logical approach.

Analyze (Gather Schema Statistics)• 11i uses the Cost Based Optimizer (CBO). Your init.ora should reflect this change. It is

recommended that you set this to CHOOSE or FIRST_ROWS. FIRST_ROWS simplyreturns the first rows from a data set as extracted from the RDBMS by SQL. This tends togive the appearance of improved performance, as the user does not have to wait for theentire data set to be extracted before being presented with the set.

• Analyze should be performed on a regular basis according to your resource usage.

Obviously a shop where ASCP is ran more often would require more frequent execution ofanalyze. It is strongly recommended that you use the Oracle supplied utility for analyzing.$MSC_TOP/sql/MSCSTAT.sql will analyze the MSC schema.

• Alternatively, submit the concurrent program 'Gather Schema Statistics' for MSC.

Page 18: MB_PLAN

• Analyze each partition separately using the following:

-- Gather ASCP Table Partition Statistics -- -- -- -- It is recommended that this form of analyze be executed after every -- -- Complete refresh, after a partial refresh that has added or deleted -- -- significant amounts of data or after an MBP plan has been executed. -- -- This script should be executed from SQL*Plus if executing Gather -- -- Schema Statistics for ALL or MSC has not enhanced performance. --

PROMPT TABLE MSC_COMPONENT_SUBSTITUTES execfnd_stats.gather_table_stats('MSC','MSC_COMPONENT_SUBSTITUTES',granularity=>'ALL');

PROMPT TABLE MSC_PLANS execfnd_stats.gather_table_stats('MSC','MSC_PLANS',granularity=>'ALL');

PROMPT TABLE MSC_PLAN_ORGANIZATIONS execfnd_stats.gather_table_stats('MSC','MSC_PLAN_ORGANIZATIONS',granularity=>'ALL');

PROMPT TABLE MSC_SYSTEM_ITEMS execfnd_stats.gather_table_stats('MSC','MSC_SYSTEM_ITEMS',granularity=>'ALL');

PROMPT TABLE MSC_BOMS execfnd_stats.gather_table_stats('MSC','MSC_BOMS',granularity=>'ALL');

PROMPT TABLE MSC_BOM_COMPONENTS execfnd_stats.gather_table_stats('MSC','MSC_BOM_COMPONENTS',granularity=>'ALL');

PROMPT TABLE MSC_DEMANDS execfnd_stats.gather_table_stats('MSC','MSC_DEMANDS',granularity=>'ALL');

PROMPT TABLE MSC_SUPPLIES execfnd_stats.gather_table_stats('MSC','MSC_SUPPLIES',granularity=>'ALL');

PROMPT TABLE MSC_EXCEPTION_DETAILS execfnd_stats.gather_table_stats('MSC','MSC_EXCEPTION_DETAILS',granularity=>'ALL');

PROMPT TABLE MSC_FULL_PEGGING execfnd_stats.gather_table_stats('MSC','MSC_FULL_PEGGING',granularity=>'ALL');

Page 19: MB_PLAN

PROMPT TABLE MSC_ITEM_CATEGORIES execfnd_stats.gather_table_stats('MSC','MSC_ITEM_CATEGORIES',granularity=>'ALL');

PROMPT TABLE MSC_ITEM_EXCEPTIONS execfnd_stats.gather_table_stats('MSC','MSC_ITEM_EXCEPTIONS',granularity=>'ALL');

PROMPT TABLE MSC_NET_RESOURCE_AVAIL execfnd_stats.gather_table_stats('MSC','MSC_NET_RESOURCE_AVAIL',granularity=>'ALL');

PROMPT TABLE MSC_OPERATION_RESOURCES execfnd_stats.gather_table_stats('MSC','MSC_OPERATION_RESOURCES',granularity=>'ALL');

PROMPT TABLE MSC_OPERATION_RESOURCE_SEQS execfnd_stats.gather_table_stats('MSC','MSC_OPERATION_RESOURCE_SEQS',granularity=>'ALL');

PROMPT TABLE MSC_RESOURCE_REQUIREMENTS execfnd_stats.gather_table_stats('MSC','MSC_RESOURCE_REQUIREMENTS',granularity=>'ALL');

PROMPT TABLE MSC_ROUTINGS execfnd_stats.gather_table_stats('MSC','MSC_ROUTINGS',granularity=>'ALL');

PROMPT TABLE MSC_ROUTING_OPERATIONS execfnd_stats.gather_table_stats('MSC','MSC_ROUTING_OPERATIONS',granularity=>'ALL');

PROMPT TABLE MSC_SALES_ORDERS execfnd_stats.gather_table_stats('MSC','MSC_SALES_ORDERS',granularity=>'ALL');

Page 20: MB_PLAN

PCTINCREASEWhen implementing the ASCP and APS suite, account for the pct increase for each databaseobject and the default settings for the tablespace. Newly created database objects that lack astorage clause inherit the storage clause default from the tablespace in which the databaseobject is created. For ASCP processing, Oracle recommends a pctincrease of 1. This willavoid many of the database errors that are associated with a higher pctincrease. Use thefollowing SQL to determine pctincrease changes.

This script will identify database objects that require pctincrease adjustment. select 'alter '||segment_type||' '||owner||'.'||segment_name||' storage(pctincrease 0);' from dba_segments where pct_increase > 0 and (segment_type = 'TABLE' or segment_type = 'INDEX') and owner in (select oracle_username from applsys.fnd_oracle_userid);

The second script is for the 11i MSC schema, i.e., MSC.

select 'alter '||segment_type||' '||owner||'.'||segment_name||' storage(pctincrease 0);' from dba_segments where pct_increase > 0 and (segment_type = 'TABLE' or segment_type = 'INDEX') and owner = 'MSC';

ASCP and MemoryAs ASCP utilizes memory, the process may experience a memory shortage. This programidentifies the max SWAP area (memory) limit. At the shell prompt type:ulimt -a to identify Data swap area.This is a Unix parameter, which correlates to the Maxdsize parameter. Compile this program,CC -o <<file name >>, then execute the compiled file to find hardware memory limit. Verifythat apps is using the same max memory allocated. If not do the following:

Page 21: MB_PLAN

Modify the $AD_TOP/bin/adrelink.sh file. Under HP9000 settings is a variable called CPP_LDFLAGS.

Default is set to: CPP_LDFLAGS='-Wl,-a,default,+s -L$(LIBHOME)'

Change it to:

CPP_LDFLAGS='-N -Wl,-a,default,+s -L$(LIBHOME)'

Then relink the library with the following command:

adrelink.sh force=Y ranlib=Y "mso MSONEW"

Then restart the plan and check the memory used by ASCP.

#include <stdlib.h>

main(int argc, char **argv){ size_m chunk; char *pointer; long allocated;

if (argc > 1) chunk = (size_m) atoi(argv[1])*1024; else chunk = 1024;

for (allocated = 1; pointer = (char *)malloc(chunk); allocated++) ;

printf("alocated %d\n", allocated*chunk);}/* end of program */

MAXEXTENTSThis script will identify the database objects that require max extent adjustments. While we aresetting the maxextents to 4000, your operating system may allow for a higher setting. Of course,after your first complete iterations of the data collection and execution of the Advanced SupplyChain Planner, consider resizing the MSC schema according to your specific needs.

Page 22: MB_PLAN

The first script is for the 11i applications schema, i.e., wip, mrp, inv, etc.set lines 130set pages 0set feedback offset heading offset termout offset verify offspo max_extent.sqlselect 'spo max_extent' from sys.dual;select 'set echo on' from sys.dual;select 'set term off' from sys.dual;select 'alter '||segment_type||' '||owner||'.'||segment_name||' storage(maxextents 4000);'from dba_segmentswhere max_extents < 51and (segment_type='TABLE'or segment_type='INDEX')and owner in (selectoracle_usernamefrom applsys.fnd_oracle_userid);select 'set echo off' from sys.dual;select 'spo off' from sys.dual;spo off

The second script is for the 11i MSC schema, i.e., MSC. select 'alter '||segment_type||' '||owner||'.'||segment_name||' storage(maxextents 4000);' from dba_segments where max_extents < 51 and (segment_type = 'TABLE' or segment_type = 'INDEX') and owner = 'MSC';