Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Friday, September 14, 2007

Good post clone procedure

Once you complete your clone, it is a good idea to run this to clean up fnd tables which contain information about source (Production) nodes:

EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT;

This step will delete all data from system tables such as FND_NODES, FND_OAM_CONTEXT_FILES etc. The correct information for the current instance will be repopulated once autoconfig is run.

So. Run Autoconfig.

Lets go a little deeper and go through the source code of this package:

SQL> desc apps.fnd_conc_clone
PROCEDURE SETUP_CLEAN
PROCEDURE TARGET_CLEAN

We'll take a look at setup_clean procedure for now:

351 procedure setup_clean is
352 begin
353 -- Delete info from FND_CONCURRENT_QUEUE_SIZE table
354
355 Delete From fnd_Concurrent_Queue_Size
356 where concurrent_queue_id in
357 (Select concurrent_queue_id
358 from fnd_concurrent_queues
359 where manager_type in (2,6));
360
361 Delete from fnd_concurrent_queue_size
362 where concurrent_queue_id in
363 (select concurrent_queue_id
364 from fnd_concurrent_queues
365 where manager_type in
366 ( select service_id
367 from fnd_cp_services
368 where upper(service_handle) in
369 ('FORMSL', 'FORMSMS', 'FORMSMC',
370 'REPSERV', 'TCF', 'APACHE',
371 'JSERV', 'OAMGCS')));
372
373 -- Delete from FND_CONCURRENT_QUEUES_TL table
374 Delete From fnd_Concurrent_Queues_tl
375 where concurrent_queue_id in
376 (Select concurrent_queue_id
377 from fnd_concurrent_queues
378 where manager_type in (2,6));
379
380 Delete from fnd_concurrent_queues_tl
381 where concurrent_queue_id in
382 (select concurrent_queue_id
383 from fnd_concurrent_queues
384 where manager_type in
385 (select service_id
386 from fnd_cp_services
387 where upper(service_handle) in
388 ('FORMSL', 'FORMSMS', 'FORMSMC',
389 'REPSERV', 'TCF', 'APACHE',
390 'JSERV', 'OAMGCS')));
391
392 -- Delete from FND_CONCURRENT_QUEUES table
393 Delete from fnd_concurrent_queues
394 where manager_type in (2,6);
395
396 Delete from fnd_concurrent_queues
397 where manager_type in
398 (select service_id
399 from fnd_cp_services
400 where upper(service_handle) in
401 ('FORMSL', 'FORMSMS', 'FORMSMC',
402 'REPSERV', 'TCF', 'APACHE',
403 'JSERV', 'OAMGCS'));
404
405 -- Delete from FND_NODES table
406 Delete from fnd_nodes;
407
408 --
409 -- TRUNCATE TABLES
410 --
411 -- Find out the database user for FND and JTF objects
412 get_database_user;
413
414 truncate_table(OracleUserFND , 'FND_OAM_CONTEXT_FILES');
415 truncate_table(OracleUserFND , 'FND_OAM_APP_SYS_STATUS');
416
417 -- Added following JTF tables based on bug 2949216
418 truncate_table(OracleUserJTF , 'JTF_PREFAB_HA_COMPS');
419 truncate_table(OracleUserJTF , 'JTF_PREFAB_HA_FILTERS');
420 truncate_table(OracleUserJTF , 'JTF_PREFAB_HOST_APPS');
421 truncate_table(OracleUserJTF , 'JTF_PREFAB_WSH_POES_B');
422 truncate_table(OracleUserJTF , 'JTF_PREFAB_WSH_POES_TL');
423 truncate_table(OracleUserJTF , 'JTF_PREFAB_WSHP_POLICIES');
424 truncate_table(OracleUserJTF , 'JTF_PREFAB_CACHE_STATS');
425
426
427 -- TRUNCATE TABLES RELATED TO TOPOLOGY
428 truncate_table_topology;
429 end;
430
431 end;

No comments: