240: then
241:
242: select a.*
243: into l_sourceDesc
244: from fnd_tns_alias_descriptions a, fnd_databases b,
245: fnd_tns_aliases c
246: where b.db_guid = l_db_guid
247: and b.Default_Tns_Alias_Guid = c.tns_alias_guid
248: and c.tns_alias_guid = a.tns_alias_guid
933: );
934:
935: select a.db_guid , a.Default_TNS_Alias_Guid
936: into l_db_guid, l_db_Default_TNS_Alias_Guid
937: from fnd_databases a
938: where a.db_name = DatabaseName
939: and a.db_domain = Domain;
940:
941: fnd_app_system.register_Database_Asg
1371:
1372: cursor c1(p_System_Guid raw) is
1373: select b.db_guid,b.default_tns_alias_guid instance_tns_alias_guid,
1374: a.default_tns_alias_guid db_tns_alias_guid,b.instance_guid
1375: from fnd_databases a,fnd_database_instances b,
1376: fnd_system_server_map c, fnd_app_servers d
1377: where c.system_guid = p_System_Guid
1378: and d.server_guid = c.server_guid
1379: and d.server_type = fnd_app_system.C_DB_SERVER_TYPE
1691:
1692: cursor c1(p_System_Guid raw) is
1693: select c.alias_name instance_alias,d.alias_name load_balance_alias,
1694: a.db_name
1695: from fnd_databases a, fnd_database_instances b, fnd_tns_aliases c,
1696: fnd_tns_aliases d
1697: where b.default_tns_alias_guid = c.tns_alias_guid
1698: and b.db_guid = a.db_guid
1699: and a.Default_TNS_Alias_GUID = d.tns_alias_guid
2284: where Server_Guid = p_Server_Guid;
2285:
2286: cursor c2(p_db_guid raw)
2287: is select db_name,db_domain,default_tns_alias_guid,is_rac_db,version
2288: from fnd_databases
2289: where db_guid = p_db_guid;
2290:
2291: cursor c3(p_db_guid raw)
2292: is select assignment
2648: a.local_listener_alias,
2649: a.remote_listener_alias,
2650: b.db_guid,
2651: b.default_tns_alias_guid db_tns_alias_guid
2652: from fnd_database_instances a,fnd_databases b
2653: where a.Server_GUID = p_Server_GUID
2654: and a.Instance_Name = p_InstanceName
2655: and a.db_guid = b.db_guid
2656: and b.DB_Name = p_DatabaseName
2743: and not exists ( select b.instance_guid
2744: from fnd_db_service_members b
2745: where b.db_service_guid = a.db_service_guid );
2746:
2747: delete from fnd_databases a
2748: where a.db_guid = f_instance.db_guid
2749: and not exists ( select b.instance_guid
2750: from fnd_database_instances b
2751: where b.db_guid = a.db_guid );
2753: delete from fnd_database_assignments a
2754: where a.db_guid = f_instance.db_guid
2755: and a.assignment = fnd_app_system.C_APP_DB_ASSIGNMENT
2756: and not exists ( select 1
2757: from fnd_databases b
2758: where b.db_guid = a.db_guid ) ;
2759:
2760: end loop;
2761:
2917: and b.name = p_ServerName;
2918:
2919: cursor c3(p_Server_GUID raw) is
2920: select a.instance_name,b.DB_Name,b.DB_Domain
2921: from fnd_database_instances a,fnd_databases b
2922: where a.Server_GUID = p_Server_GUID
2923: and a.db_guid = b.db_guid;
2924:
2925: cursor c4(p_Server_GUID raw) is