DBA Data[Home] [Help]

APPS.FND_NET_SERVICES SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 88

       execute immediate 'select a.node_id ' ||
                         '  from fnd_nodes a ' ||
                         ' where upper(a.node_name) = upper(:v1) '
                     into l_node_id
                    using l_node_name;
Line: 134

         select a.Tns_Alias_Address_List_Guid,a.sequence_number,
                a.failover,a.load_balance
           from fnd_tns_alias_address_lists a
          where a.Tns_Alias_Description_Guid = p_tns_description_guid
            and a.sequence_number >= 0
          order by a.sequence_number;
Line: 142

         select a.Listener_Port_Guid
           from fnd_tns_alias_addresses a
          where a.Tns_Alias_Address_List_Guid = p_tns_address_list_guid
          order by a.Listener_Port_Guid;
Line: 154

  select a.*
    into l_root_desc
    from fnd_tns_alias_descriptions a
   where a.tns_alias_guid = l_descRec.tns_alias_guid
     and a.sequence_number = 0;
Line: 162

  select a.Db_Guid
    into l_db_guid
    from fnd_database_services a
   where a.Db_Service_Guid = l_root_desc.Db_Service_Guid;
Line: 169

  select count(*)
    into l_valid_service
    from fnd_database_services a
   where a.Db_Guid = l_db_guid
     and a.Service_Name = p_Service_Name;
Line: 180

    select count(*)
      into l_valid_instance
      from fnd_database_instances a, fnd_database_services b,
           fnd_db_service_members c
     where a.db_guid = l_db_guid
       and a.Instance_Name = p_Instance_name
       and a.db_guid = b.db_guid
       and b.Service_Name = p_Service_Name
       and b.Db_Service_Guid = c.Db_Service_Guid
       and c.Instance_Guid = a.Instance_Guid
       and c.db_guid = b.db_guid;
Line: 206

    delete from fnd_tns_alias_addresses a
     where a.Tns_Alias_Address_List_Guid
           in ( select b.Tns_Alias_Address_List_Guid
                  from fnd_tns_alias_address_lists b
                 where b.Tns_Alias_Description_Guid
                               = l_descRec.Tns_Alias_Description_Guid );
Line: 213

    delete from fnd_tns_alias_address_lists a
     where a.Tns_Alias_Description_Guid
                 = l_descRec.Tns_Alias_Description_Guid ;
Line: 242

     select a.*
       into l_sourceDesc
       from fnd_tns_alias_descriptions a, fnd_databases b,
            fnd_tns_aliases c
      where b.db_guid = l_db_guid
        and b.Default_Tns_Alias_Guid = c.tns_alias_guid
        and c.tns_alias_guid = a.tns_alias_guid
        and a.sequence_number = 0;
Line: 253

     select a.*
       into l_sourceDesc
       from fnd_tns_alias_descriptions a, fnd_database_instances b,
            fnd_tns_aliases c
      where b.db_guid = l_db_guid
        and b.Instance_Name = p_instance_name
        and b.Default_Tns_Alias_Guid = c.tns_alias_guid
        and c.tns_alias_guid = a.tns_alias_guid
        and a.sequence_number = 0;
Line: 297

  delete from fnd_tns_alias_addresses a
   where a.Tns_Alias_Address_List_Guid
         in ( select b.Tns_Alias_Address_List_Guid
                from fnd_tns_alias_address_lists b
               where b.Tns_Alias_Description_Guid
                             = l_descRec.Tns_Alias_Description_Guid );
Line: 304

  delete from fnd_tns_alias_address_lists a
   where a.Tns_Alias_Description_Guid
               = l_descRec.Tns_Alias_Description_Guid ;
Line: 361

          is select a.Tns_Alias_Address_List_Guid,a.sequence_number
               from fnd_tns_alias_address_lists a
              where a.Tns_Alias_Description_Guid = p_desc_guid
                and a.sequence_number >= 0
              order by a.sequence_number;
Line: 387

         is select a.Tns_Alias_Description_Guid,a.Sequence_Number,
                   abs(a.Sequence_Number) abs_sequence_number
              from fnd_tns_alias_descriptions a
             where a.tns_alias_guid = p_tns_alias_guid_parm
               and a.Sequence_Number <> 0
            order by abs(a.Sequence_Number);
Line: 395

         is select a.Tns_Alias_Description_Guid,a.Sequence_Number
              from fnd_tns_alias_descriptions a
             where a.tns_alias_guid = p_tns_alias_guid_parm
               and a.Sequence_Number <> 0
               and abs(a.Sequence_Number) > p_actual_count;
Line: 416

     select a.tns_alias_guid
       into l_tns_alias_guid
       from fnd_tns_aliases a, fnd_tns_alias_sets b
      where b.tns_alias_set_name = p_alias_set_name
        and b.tns_alias_set_guid = a.alias_set_guid
        and a.alias_name     = p_alias_name;
Line: 439

  select a.*
    into l_descRec
    from fnd_tns_alias_descriptions a
   where a.Tns_Alias_Guid = l_tns_alias_guid
     and a.Sequence_Number = 0;
Line: 529

  select count(*)
    into l_actual_alt_count
    from fnd_tns_alias_descriptions a
   where a.tns_alias_guid = l_tns_alias_guid
     and a.sequence_number <> 0 ;
Line: 545

      select a.*
        into l_descRec
        from fnd_tns_alias_descriptions a
       where a.tns_alias_guid = l_tns_alias_guid
         and abs(a.sequence_number) = i;
Line: 576

       delete from fnd_tns_alias_descriptions a
        where a.Tns_Alias_Description_Guid =
                      f_unused.Tns_Alias_Description_Guid;
Line: 587

         delete from fnd_tns_alias_addresses a
          where a.Tns_Alias_Address_List_Guid
                in ( select b.Tns_Alias_Address_List_Guid
                       from fnd_tns_alias_address_lists b
                      where b.Tns_Alias_Description_Guid
                                    = f_unused.Tns_Alias_Description_Guid );
Line: 594

         delete from fnd_tns_alias_address_lists a
          where a.Tns_Alias_Description_Guid
                      = f_unused.Tns_Alias_Description_Guid ;
Line: 610

      select a.*
        into l_descRec
        from fnd_tns_alias_descriptions a
       where a.tns_alias_guid = l_tns_alias_guid
         and abs(a.sequence_number) = i;
Line: 639

       select a.*
         into l_descRec
         from fnd_tns_alias_descriptions a
        where a.tns_alias_guid = l_tns_alias_guid
          and abs(a.sequence_number) = i;
Line: 761

         is select a.remote_listener_alias
              from fnd_database_instances a
             where a.db_guid = p_db_guid
               and a.remote_listener_alias is not null;
Line: 767

         is select a.listener_port_guid,a.port
              from fnd_tns_listener_ports a
             where a.listener_guid = p_listener_guid;
Line: 779

         is select f.Tns_Alias_Description_Guid,
                   e.alias_name,d.tns_alias_set_name
              from fnd_system_server_map a, fnd_app_servers b,
                   fnd_tns_alias_set_usage c,fnd_tns_alias_sets d,
                   fnd_tns_aliases e, fnd_tns_alias_descriptions f
             where a.System_GUID = p_System_Guid
               and a.Server_GUID = b.Server_GUID
               and b.server_type = fnd_app_system.C_DB_SERVER_TYPE
               and a.Server_GUID = c.Server_GUID
               and c.tns_alias_set_guid = d.tns_alias_set_guid
               and d.tns_alias_set_type = fnd_app_system.C_ALIAS_SET_NAME_PUB
               and d.tns_alias_set_guid = e.alias_set_guid
               and e.tns_alias_guid = f.tns_alias_guid
               and f.sequence_number <> 0;
Line: 795

         is select a.service_name,b.instance_name
              from fnd_database_services a,fnd_database_instances b
             where a.db_guid = p_db_guid
               and b.db_guid = p_db_guid
               and (  b.Instance_Guid <> p_instance_guid
                    or (  b.Instance_Guid = p_instance_guid and
                          a.service_name  <> p_service_name )
                   )
             order by 1,2;
Line: 852

  select a.System_Guid
    into l_System_Guid
    from fnd_apps_system a
   where a.name = SystemName;
Line: 875

  execute immediate 'select a.node_id ' ||
                    '  from fnd_nodes a ' ||
                    ' where upper(a.node_name) = upper(:v1) '
                into l_node_id
               using l_node_name;
Line: 893

  select a.Oracle_Home_Id
    into l_Oracle_Home_Id
    from fnd_oracle_homes a
   where a.node_id = l_node_id
     and a.path    = OracleHomePath;
Line: 913

  select a.Server_Guid
    into l_Server_Guid
    from fnd_app_servers a
   where a.name = ServerName;
Line: 935

  select a.db_guid , a.Default_TNS_Alias_Guid
    into l_db_guid, l_db_Default_TNS_Alias_Guid
    from fnd_databases a
   where a.db_name = DatabaseName
     and a.db_domain = Domain;
Line: 966

  select a.*
    into l_instRec
    from fnd_database_instances a
   where a.db_guid = l_db_guid
     and a.Instance_Name = InstanceName;
Line: 1003

  select a.db_service_guid
    into l_db_service_guid
    from fnd_database_services a
   where a.db_guid    = l_db_guid
     and a.Service_name = ServiceName;
Line: 1028

   select a.tns_alias_set_guid
     into l_tns_alias_set_guid_pub
     from fnd_tns_alias_sets a
    where a.tns_alias_set_name = l_public_alias_set_name;
Line: 1041

   select a.tns_alias_set_guid
     into l_tns_alias_set_guid_int
     from fnd_tns_alias_sets a
    where a.tns_alias_set_name = l_internal_alias_set_name;
Line: 1060

  select a.Listener_GUID
    into l_Listener_GUID
    from fnd_tns_listeners a
   where a.Server_GUID = l_Server_Guid
     and a.Listener_Name = ServerName;
Line: 1090

  select a.listener_port_guid
    into l_listener_port_guid
    from fnd_tns_listener_ports a
   where a.listener_guid= l_Listener_GUID
     and a.port = ListenerPort;
Line: 1213

  select count(*)
    into l_db_alias_exists
    from fnd_system_server_map a, fnd_app_servers b,
         fnd_tns_alias_set_usage c,fnd_tns_alias_sets d,
         fnd_tns_aliases e
   where a.System_GUID = l_System_Guid
     and a.Server_GUID = b.Server_GUID
     and b.server_type = fnd_app_system.C_DB_SERVER_TYPE
     and b.server_guid <> l_Server_Guid
     and a.Server_GUID = c.Server_GUID
     and c.tns_alias_set_guid = d.tns_alias_set_guid
     and d.tns_alias_set_type = fnd_app_system.C_ALIAS_SET_NAME_PUB
     and d.tns_alias_set_guid = e.alias_set_guid
     and e.alias_name = DatabaseName;
Line: 1233

        select a.TNS_ALIAS_GUID
          into l_tns_db_alias
          from fnd_tns_aliases a
         where a.Alias_Name = DatabaseName
           and a.alias_set_guid = l_tns_alias_set_guid_pub;
Line: 1278

  select count(*)
    into l_db_alias_exists
    from fnd_tns_aliases a
   where a.Alias_Name = InstanceSid
     and a.alias_set_guid = l_tns_alias_set_guid_pub;
Line: 1329

    select a.*
      into l_resolveDescRec
      from fnd_tns_alias_descriptions a
     where a.Tns_Alias_Description_Guid = f_resolve.Tns_Alias_Description_Guid;
Line: 1373

    select b.db_guid,b.default_tns_alias_guid instance_tns_alias_guid,
           a.default_tns_alias_guid db_tns_alias_guid,b.instance_guid
     from fnd_databases a,fnd_database_instances b,
          fnd_system_server_map c, fnd_app_servers d
    where c.system_guid = p_System_Guid
      and d.server_guid = c.server_guid
      and d.server_type = fnd_app_system.C_DB_SERVER_TYPE
      and b.server_guid = d.server_guid
      and b.db_guid = a.db_guid;
Line: 1384

    select a.db_service_guid
      from fnd_database_services a
     where a.db_guid = p_db_guid ;
Line: 1389

    select a.tns_alias_guid,a.alias_type
      from fnd_tns_aliases a
     where a.alias_name = p_alias_name
       and a.alias_set_guid = p_alias_set_guid
       and (    a.alias_type = nvl(p_alias_type,a.alias_type)
             or a.alias_type = fnd_app_system.C_DB_INST_TNS_ALIAS_TYPE );
Line: 1397

    select c.listener_port_guid
      from fnd_tns_alias_descriptions a, fnd_tns_alias_address_lists b,
           fnd_tns_alias_addresses c
     where a.tns_alias_guid = p_tns_alias_guid
       and a.sequence_number= 0
       and b.Tns_Alias_Description_Guid = a.Tns_Alias_Description_Guid
       and c.Tns_Alias_Address_List_Guid = b.Tns_Alias_Address_List_Guid;
Line: 1406

    select e.Tns_Alias_Guid,e.Alias_Type
      from fnd_system_server_map a,fnd_tns_alias_set_usage b,
           fnd_tns_alias_sets c, fnd_app_servers d,
           fnd_tns_aliases e
     where a.system_guid = p_System_Guid
       and a.server_guid = b.server_guid
       and b.tns_alias_set_guid = c.tns_alias_set_guid
       and c.tns_alias_set_type = fnd_app_system.C_ALIAS_SET_NAME_PUB
       and a.server_guid = d.server_guid
       and d.server_type = fnd_app_system.C_DB_SERVER_TYPE
       and e.alias_set_guid = b.tns_alias_set_guid
       and e.alias_name = p_alias_name
       and (    e.alias_type = nvl(p_alias_type,e.alias_type)
             or e.alias_type = fnd_app_system.C_DB_INST_TNS_ALIAS_TYPE );
Line: 1422

    select a.Tns_Alias_Description_Guid
      from fnd_tns_alias_descriptions a
     where a.Tns_Alias_Guid = p_tns_alias_guid
       and a.sequence_number >= 0
     order by a.sequence_number;
Line: 1448

    select a.*
      into l_tns_aliases_rec
      from fnd_tns_aliases a
     where a.tns_alias_guid = f_valid.Tns_Alias_Guid;
Line: 1455

      select a.*
        into l_tns_descriptions_rec
        from fnd_tns_alias_descriptions a
       where a.Tns_Alias_Description_Guid = f_desc.Tns_Alias_Description_Guid;
Line: 1490

    select a.*
      into l_tns_aliases_rec
      from fnd_tns_aliases a
     where a.alias_name = alias
       and a.alias_set_guid = alias_set_guid;
Line: 1498

      select a.*
        into l_tns_descriptions_rec
        from fnd_tns_alias_descriptions a
       where a.Tns_Alias_Description_Guid = f_desc.Tns_Alias_Description_Guid;
Line: 1693

    select c.alias_name instance_alias,d.alias_name load_balance_alias,
           a.db_name
     from fnd_databases a, fnd_database_instances b, fnd_tns_aliases c,
          fnd_tns_aliases d
    where b.default_tns_alias_guid  = c.tns_alias_guid
      and b.db_guid = a.db_guid
      and a.Default_TNS_Alias_GUID = d.tns_alias_guid
      and b.server_guid in  ( select x.server_guid
                                from fnd_system_server_map x, fnd_app_servers y
                               where x.system_guid = p_System_Guid
                                 and y.server_guid = x.server_guid
                                 and y.server_type =
                                        fnd_app_system.C_DB_SERVER_TYPE
                            ) ;
Line: 1709

         is select a.listener_port_guid,a.port
              from fnd_tns_listener_ports a
             where a.listener_guid = p_listener_guid;
Line: 1723

  select a.System_Guid
    into l_System_Guid
    from fnd_apps_system a
   where a.name = SystemName;
Line: 1745

  execute immediate 'select a.node_id ' ||
                    '  from fnd_nodes a ' ||
                    ' where upper(a.node_name) = upper(:v1) '
                into l_node_id
               using l_node_name;
Line: 1784

  select a.Oracle_Home_Id
    into l_Pri_Oracle_Home_Id
    from fnd_oracle_homes a
   where a.node_id = l_node_id
     and a.path    = PriOracleHomePath;
Line: 1790

  select a.Oracle_Home_Id
    into l_Aux_Oracle_Home_Id
    from fnd_oracle_homes a
   where a.node_id = l_node_id
     and a.path    = AuxOracleHomePath;
Line: 1796

  select a.appl_top_guid
    into l_Appl_Top_Guid
    from fnd_appl_tops a
   where a.node_id = l_node_id
     and a.path    = ApplTopPath;
Line: 1816

  select a.Server_Guid
    into l_Server_Guid
    from fnd_app_servers a
   where a.name = ServerName;
Line: 1836

  select a.tns_alias_set_guid
    into l_tns_alias_set_guid_pub
    from fnd_tns_alias_sets a
   where a.tns_alias_set_name = l_public_alias_set_name;
Line: 1859

  select a.Listener_GUID
    into l_Listener_GUID
    from fnd_tns_listeners a
   where a.Server_GUID = l_Server_Guid
     and a.Listener_Name = fnd_app_system.C_APPS_LISTENER_ID ||
					'_' || ServerName;
Line: 1892

  select a.listener_port_guid
    into l_listener_port_guid
    from fnd_tns_listener_ports a
   where a.listener_guid= l_Listener_GUID
     and a.port = to_number(RPCPort);
Line: 1918

       select a.TNS_ALIAS_GUID
         into l_fndfs_tns_alias
         from fnd_tns_aliases a
        where a.Alias_Name = l_fndfs_alias
          and a.Alias_set_guid = l_tns_alias_set_guid_pub;
Line: 1931

       select a.TNS_ALIAS_GUID
         into l_fndsm_tns_alias
         from fnd_tns_aliases a
        where a.Alias_Name = l_fndsm_alias
          and a.Alias_set_guid = l_tns_alias_set_guid_pub;
Line: 2014

cursor c1 is select d.listener_name,c.port,
                    a.sequence_number,a.failover,a.load_balance
               from fnd_tns_alias_address_lists a, fnd_tns_alias_addresses b,
                    fnd_tns_listener_ports c, fnd_tns_listeners d
              where a.Tns_Alias_Description_Guid = p_Tns_Alias_Description_Guid
                and a.Tns_Alias_Address_List_Guid =
                                            b.Tns_Alias_Address_List_Guid
                and b.listener_port_guid = c.listener_port_guid
                and c.Listener_GUID  = d.Listener_GUID
              order by a.sequence_number,b.listener_port_guid;
Line: 2052

cursor c1 is select a.service_name
               from fnd_database_services a
              where a.DB_Service_GUID = p_DB_Service_GUID;
Line: 2073

cursor c1 is select a.service_name,b.Instance_Name,b.Instance_Number,
                    c.instance_type
               from fnd_database_services a, fnd_database_instances b,
                    fnd_db_service_members c
              where a.DB_Service_GUID = p_DB_Service_GUID
                and b.Instance_Guid   = p_instance_guid
                and a.Db_Service_Guid = c.Db_Service_Guid
                and c.Instance_Guid = p_instance_guid ;
Line: 2106

cursor c1 is select a.alias_name,a.Alias_Type,
                    a.Failover,a.Load_Balance,
                    b.tns_alias_set_name,
		    b.tns_alias_set_type
               from fnd_tns_aliases a,fnd_tns_alias_sets b
              where a.tns_alias_guid = p_tns_alias_guid
                and a.alias_set_guid = b.tns_alias_set_guid;
Line: 2114

cursor c2 is select c.tns_alias_description_guid,
                    c.DB_Service_GUID,c.DB_Instance_Guid,
                    c.Service_Name,c.Instance_Name,
                    c.Failover,c.Load_Balance,
                    c.sequence_number
               from fnd_tns_alias_descriptions c
              where c.tns_alias_guid = p_tns_alias_guid
               order by c.sequence_number;
Line: 2244

  select a.TNS_ALIAS_GUID
    from fnd_tns_aliases a, fnd_tns_alias_set_usage b
   where a.Alias_Name like 'FNDFS%'
     and a.Alias_Type = fnd_app_system.C_FNDFS_TNS_ALIAS_TYPE
     and b.server_guid = p_Server_Guid
     and a.alias_set_guid = b.tns_alias_set_guid;
Line: 2252

  select a.TNS_ALIAS_GUID
    from fnd_tns_aliases a, fnd_tns_alias_set_usage b
   where a.Alias_Name like 'FNDSM%'
     and a.Alias_Type = fnd_app_system.C_FNDSM_TNS_ALIAS_TYPE
     and b.server_guid = p_Server_Guid
     and a.alias_set_guid = b.tns_alias_set_guid;
Line: 2279

cursor c1 is select db_guid,Instance_Guid,Instance_Name,Instance_Number,
                    Sid_GUID,Default_TNS_Alias_GUID,sid,
                    Local_Listener_Alias,Remote_Listener_Alias,
                    Configuration,Description,Interconnect_name
               from fnd_database_instances
              where Server_Guid = p_Server_Guid;
Line: 2287

          is select db_name,db_domain,default_tns_alias_guid,is_rac_db,version
               from fnd_databases
              where db_guid = p_db_guid;
Line: 2292

          is select assignment
               from fnd_database_assignments
              where db_guid = p_db_guid;
Line: 2299

          is select sid
               from fnd_sids
              where sid_guid = p_sid_guid;
Line: 2307

          is select DB_Service_GUID,db_guid,Service_Name,Description
               from fnd_database_services
              where db_guid = p_db_guid;
Line: 2312

      select a.TNS_ALIAS_GUID
        from fnd_tns_aliases a, fnd_tns_alias_set_usage b
       where a.Alias_Name   = p_db_name
         and a.Alias_Type   = fnd_app_system.C_DB_INST_TNS_ALIAS_TYPE
         and b.Server_Guid  = p_server_guid
         and b.Tns_Alias_Set_Guid = a.Alias_Set_Guid;
Line: 2409

      select count(*)
        into l_service_member
        from fnd_db_service_members a
       where a.db_service_guid = f_service.db_service_guid
         and a.Instance_Guid   = f_instance.Instance_Guid ;
Line: 2447

cursor c1 is select name,Version,Owner,CSI_Number,System_GUID
               from fnd_apps_system
              where name = SystemName;
Line: 2452

          is select a.Server_GUID,a.name,a.Node_Id,a.Internal,a.Appl_Top_Guid,
                    a.Server_type,a.Pri_Oracle_Home,a.Aux_Oracle_Home
               from fnd_app_servers a, fnd_system_server_map b
              where b.System_Guid = p_System_Guid
                and a.Server_GUID = b.Server_GUID
              order by a.node_id,a.Internal,a.Server_type,a.name;
Line: 2460

          is select name,Path,Shared
               from fnd_appl_tops
              where appl_top_guid = p_appl_top_guid;
Line: 2465

          is select name,Path,Version,Description
               from fnd_oracle_homes
              where oracle_home_id = p_oracle_home_id;
Line: 2503

       execute immediate 'select a.* ' ||
                         '  from fnd_nodes a ' ||
                         ' where a.node_id = :v1 '
                     into l_nodeRec
                    using f_server.node_id;
Line: 2629

          select a.System_Guid
            from fnd_apps_system a
           where a.name = p_SystemName
             for update of a.System_Guid;
Line: 2635

          select a.Server_GUID,b.PRI_ORACLE_HOME,c.listener_guid
            from fnd_system_server_map a, fnd_app_servers b,
                 fnd_tns_listeners c
           where a.System_GUID = p_System_GUID
             and a.Server_GUID = b.Server_GUID
             and b.name = p_ServerName
             and b.server_type = fnd_app_system.C_DB_SERVER_TYPE
             and b.Server_GUID = c.Server_GUID(+);
Line: 2646

          select a.instance_guid,a.sid_guid,
                 a.default_tns_alias_guid instance_tns_alias_guid,
                 a.local_listener_alias,
                 a.remote_listener_alias,
                 b.db_guid,
                 b.default_tns_alias_guid db_tns_alias_guid
            from fnd_database_instances a,fnd_databases b
           where a.Server_GUID = p_Server_GUID
             and a.Instance_Name = p_InstanceName
             and a.db_guid = b.db_guid
             and b.DB_Name = p_DatabaseName
             and b.DB_Domain = p_Domain;
Line: 2664

      delete from fnd_oracle_homes a
       where a.oracle_home_id = f_server.pri_oracle_home
         and not exists ( select b.name
                            from fnd_app_servers b
                           where (   b.pri_oracle_home
                                          = f_server.pri_oracle_home
                                  or b.aux_oracle_home
                                          = f_server.pri_oracle_home
                                 )
                             and b.server_guid <> f_server.server_guid
                        );
Line: 2679

         delete from fnd_tns_alias_address_lists a
          where a.Tns_Alias_Address_List_Guid
                 in ( select b.Tns_Alias_Address_List_Guid
                        from fnd_tns_alias_addresses b,fnd_tns_listener_ports c
                       where b.listener_port_guid = c.listener_port_guid
                         and c.Listener_GUID = f_server.Listener_GUID )
            and 1 = ( select count(*)
                        from fnd_tns_alias_addresses c
                       where c.Tns_Alias_Address_List_Guid
                                           = a.Tns_Alias_Address_List_Guid );
Line: 2700

         delete from fnd_tns_alias_descriptions a
          where not exists ( select 1
                                from fnd_tns_alias_address_lists b
                               where b.Tns_Alias_Description_Guid
                                             = a.Tns_Alias_Description_Guid )
            and a.sequence_number >= 0;
Line: 2709

         delete from fnd_tns_aliases a
          where not exists ( select 1
                               from fnd_tns_alias_descriptions b
                              where b.Tns_Alias_Guid = a.Tns_Alias_Guid );
Line: 2714

         delete from fnd_tns_alias_addresses b
          where b.Listener_port_GUID
                  in ( select c.listener_port_guid
                         from fnd_tns_listener_ports c
                        where c.Listener_GUID = f_server.Listener_GUID );
Line: 2720

         delete from fnd_tns_listener_ports a
          where a.Listener_GUID = f_server.Listener_GUID;
Line: 2723

         delete from fnd_tns_listeners a
          where a.Listener_GUID = f_server.Listener_GUID;
Line: 2731

        delete from fnd_database_instances a
         where a.instance_guid = f_instance.instance_guid;
Line: 2734

        delete from fnd_db_service_members a
         where a.db_guid = f_instance.db_guid
           and a.instance_guid = f_instance.instance_guid;
Line: 2738

        delete from fnd_sids a
         where a.sid_guid = f_instance.sid_guid;
Line: 2741

        delete from fnd_database_services a
         where a.db_guid = f_instance.db_guid
           and not exists ( select b.instance_guid
                              from fnd_db_service_members b
                             where b.db_service_guid = a.db_service_guid );
Line: 2747

        delete from fnd_databases a
         where a.db_guid = f_instance.db_guid
           and not exists ( select b.instance_guid
                              from fnd_database_instances b
                             where b.db_guid = a.db_guid );
Line: 2753

        delete from fnd_database_assignments a
         where a.db_guid = f_instance.db_guid
           and a.assignment = fnd_app_system.C_APP_DB_ASSIGNMENT
           and not exists ( select 1
                              from fnd_databases b
                             where b.db_guid = a.db_guid ) ;
Line: 2778

          select a.System_Guid
            from fnd_apps_system a
           where a.name = p_SystemName
             for update of a.System_Guid;
Line: 2784

          select a.Server_GUID,b.PRI_ORACLE_HOME,c.listener_guid,
                 b.APPL_TOP_GUID,b.AUX_ORACLE_HOME
            from fnd_system_server_map a, fnd_app_servers b,
                 fnd_tns_listeners c
           where a.System_GUID = p_System_GUID
             and a.Server_GUID = b.Server_GUID
             and b.name = p_ServerName
             and b.server_type = fnd_app_system.C_APP_SERVER_TYPE
             and b.Server_GUID = c.Server_GUID(+);
Line: 2800

      delete from fnd_oracle_homes a
       where a.oracle_home_id = f_server.pri_oracle_home
         and not exists ( select b.name
                            from fnd_app_servers b
                           where (   b.pri_oracle_home
                                          = f_server.pri_oracle_home
                                  or b.aux_oracle_home
                                          = f_server.pri_oracle_home
                                 )
                             and b.server_guid <> f_server.server_guid
                        );
Line: 2814

         delete from fnd_oracle_homes a
          where a.oracle_home_id = f_server.aux_oracle_home
            and not exists ( select b.name
                               from fnd_app_servers b
                              where (   b.pri_oracle_home
                                             = f_server.aux_oracle_home
                                     or b.aux_oracle_home
                                             = f_server.aux_oracle_home
                                    )
                                and b.server_guid <> f_server.server_guid
                           );
Line: 2830

         delete from fnd_appl_tops a
          where a.appl_top_guid = f_server.appl_top_guid
            and not exists ( select b.name
                               from fnd_app_servers b
                              where b.appl_top_guid = f_server.appl_top_guid
                                and b.server_guid <> f_server.server_guid
                           );
Line: 2842

        delete from fnd_tns_alias_address_lists a
         where a.Tns_Alias_Address_List_Guid
                 in ( select b.Tns_Alias_Address_List_Guid
                        from fnd_tns_alias_addresses b,fnd_tns_listener_ports c
                       where b.listener_port_guid = c.listener_port_guid
                         and c.Listener_GUID = f_server.Listener_GUID )
           and 1 = ( select count(*)
                       from fnd_tns_alias_addresses c
                      where c.Tns_Alias_Address_List_Guid
                                           = a.Tns_Alias_Address_List_Guid );
Line: 2863

         delete from fnd_tns_alias_descriptions a
          where not exists ( select 1
                                from fnd_tns_alias_address_lists b
                               where b.Tns_Alias_Description_Guid
                                             = a.Tns_Alias_Description_Guid )
            and a.sequence_number >= 0;
Line: 2872

         delete from fnd_tns_aliases a
          where not exists ( select 1
                               from fnd_tns_alias_descriptions b
                              where b.Tns_Alias_Guid = a.Tns_Alias_Guid );
Line: 2877

         delete from fnd_tns_alias_addresses b
          where b.Listener_port_GUID
                  in ( select c.listener_port_guid
                         from fnd_tns_listener_ports c
                        where c.Listener_GUID = f_server.Listener_GUID );
Line: 2883

         delete from fnd_tns_listener_ports a
          where a.Listener_GUID = f_server.Listener_GUID;
Line: 2886

         delete from fnd_tns_listeners a
          where a.Listener_GUID = f_server.Listener_GUID;
Line: 2907

          select a.System_Guid
            from fnd_apps_system a
           where a.name = p_SystemName
             for update of a.System_Guid;
Line: 2913

          select a.Server_GUID,b.Server_type
            from fnd_system_server_map a, fnd_app_servers b
           where a.System_GUID = p_System_GUID
             and a.Server_GUID = b.Server_GUID
             and b.name = p_ServerName;
Line: 2920

          select a.instance_name,b.DB_Name,b.DB_Domain
            from fnd_database_instances a,fnd_databases b
           where a.Server_GUID = p_Server_GUID
             and a.db_guid = b.db_guid;
Line: 2926

          select a.tns_alias_guid,b.Tns_Alias_Description_Guid,
                 c.Tns_Alias_Address_List_Guid
            from fnd_tns_aliases a,fnd_tns_alias_descriptions b,
                 fnd_tns_alias_address_lists c,fnd_tns_alias_set_usage d
           where d.server_guid = p_server_guid
             and d.tns_alias_set_guid = a.alias_set_guid
             and a.tns_alias_guid = b.tns_alias_guid
             and b.Tns_Alias_Description_Guid = c.Tns_Alias_Description_Guid(+);
Line: 2962

           delete from fnd_tns_alias_descriptions a
            where a.Tns_Alias_Description_Guid =
                       f_alias.Tns_Alias_Description_Guid;
Line: 2969

              delete from fnd_tns_alias_address_lists a
               where a.Tns_Alias_Address_List_Guid =
                          f_alias.Tns_Alias_Address_List_Guid;
Line: 2973

              delete from fnd_tns_alias_addresses a
               where a.Tns_Alias_Address_List_Guid =
                          f_alias.Tns_Alias_Address_List_Guid;
Line: 2979

           delete from fnd_tns_aliases a
            where a.tns_alias_guid = f_alias.tns_alias_guid;
Line: 2986

      delete from fnd_tns_alias_sets a
       where a.tns_alias_set_guid
                 in ( select b.tns_alias_set_guid
                        from fnd_tns_alias_set_usage b
                       where b.server_guid = f_server.server_guid );
Line: 2992

      delete from fnd_tns_alias_set_usage a
       where a.server_guid = f_server.server_guid;
Line: 2995

      delete from fnd_system_server_map a
       where a.System_GUID = f_system.System_Guid
         and a.Server_GUID = f_server.Server_GUID;
Line: 2999

      delete from fnd_app_servers a
       where a.Server_GUID = f_server.Server_GUID;
Line: 3016

          select a.System_Guid
            from fnd_apps_system a
           where a.name = p_SystemName
             for update of a.System_Guid;
Line: 3022

          select a.Server_GUID,b.name
            from fnd_system_server_map a, fnd_app_servers b
           where a.System_GUID = p_System_GUID
             and a.Server_GUID = b.Server_GUID;
Line: 3036

    delete from fnd_apps_system a
     where a.System_GUID = f_system.System_Guid ;