[Home] [Help]
1620: * Create node. If it already exists,then we'll Update instead
1621: */
1622: select count(*)
1623: into kount
1624: from fnd_nodes
1625: where upper(node_name) = upper(name);
1626:
1627: if (kount = 0) then
1628: insert into fnd_nodes
1624: from fnd_nodes
1625: where upper(node_name) = upper(name);
1626:
1627: if (kount = 0) then
1628: insert into fnd_nodes
1629: (node_id, node_name,
1630: support_forms, support_cp, support_web, support_admin,
1631: platform_code, created_by, creation_date,
1632: last_updated_by, last_update_date, last_update_login,
1632: last_updated_by, last_update_date, last_update_login,
1633: node_mode, server_id, server_address, description,
1634: host, domain,support_db, virtual_ip)
1635: select
1636: fnd_nodes_s.nextval, name,
1637: forms_tier, cp_tier, web_tier, admin_tier,
1638: platform_id, 1, SYSDATE,
1639: 1, SYSDATE, 0,
1640: 'O', p_server_id, p_address, p_description,
1648: * Apps system, but for different tiers. Essentially,
1649: * we're performing an 'OR' of the flags in the table
1650: * and those passed into the procedure.
1651: */
1652: update fnd_nodes set
1653: description = p_description,
1654: support_forms = decode(forms_tier, 'Y', 'Y', support_forms),
1655: support_cp = decode(cp_tier, 'Y', 'Y', support_cp),
1656: support_web = decode(web_tier, 'Y', 'Y', support_web),
1661: domain = p_domain,
1662: support_db = decode(db_tier,'Y','Y',support_db)
1663: where upper(node_name) = upper(name);
1664:
1665: -- If server_id is not null, update fnd_nodes.server_id.
1666: -- fnd_nodes.server_id can only be null if the application server node has been
1667: -- removed.
1668: if (p_server_id is not null) then
1669: update fnd_nodes
1662: support_db = decode(db_tier,'Y','Y',support_db)
1663: where upper(node_name) = upper(name);
1664:
1665: -- If server_id is not null, update fnd_nodes.server_id.
1666: -- fnd_nodes.server_id can only be null if the application server node has been
1667: -- removed.
1668: if (p_server_id is not null) then
1669: update fnd_nodes
1670: set server_id = p_server_id
1665: -- If server_id is not null, update fnd_nodes.server_id.
1666: -- fnd_nodes.server_id can only be null if the application server node has been
1667: -- removed.
1668: if (p_server_id is not null) then
1669: update fnd_nodes
1670: set server_id = p_server_id
1671: where upper(node_name) = upper(name);
1672: end if;
1673:
1670: set server_id = p_server_id
1671: where upper(node_name) = upper(name);
1672: end if;
1673:
1674: -- If server_address is not null, update fnd_nodes.server_address.
1675: if (p_address is not null) then
1676: update fnd_nodes
1677: set server_address = p_address
1678: where upper(node_name) = upper(name);
1672: end if;
1673:
1674: -- If server_address is not null, update fnd_nodes.server_address.
1675: if (p_address is not null) then
1676: update fnd_nodes
1677: set server_address = p_address
1678: where upper(node_name) = upper(name);
1679: end if;
1680:
1679: end if;
1680:
1681: -- if p_virtual_ip is not null update the fnd_node.virtual_ip
1682: if (p_virtual_ip is not null) then
1683: update fnd_nodes
1684: set virtual_ip = p_virtual_ip
1685: where upper(node_name) = upper(name);
1686: end if;
1687: end if;