/****************************************************************************
*
* Filename         - $Workfile:   drop_procs.sql  $
*
*                     Name              Date      Version     CR Number
* Author           - See revision history below.
* Last Update      - See revision history below.
*
* Project Name     - TAGTRAK(Oracle Database)
*
* Source Code
* Identifier       - 0/3/300/8010/112
*
* Design Spec
* Section          - 
*
* Contents         - 
*		An sqlplus script to drop all the procedures and packages
*		for the live schema.
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*
*****************************************************************************/

/*
 * Drop all of the procedures, funcs, etc
 * Count the number of Procs/Packages/Funcs that exist for this user
 */
drop function convert_class;
drop function extract_carrier;
drop function add_blo_indicator;
drop function get_uld_pos;
drop package flts_bag_count_pkg;
drop package flts_ldg_prog_by_time_pack;
drop package flts_px_bg_cnt_by_tim_mws_pack;
drop package get_bag_data_pack;
drop package get_break_down_data2_pack;
drop package get_latest_uld_trace_pkg;
drop package get_pax_bags_pkg;
drop package get_pax_list_data_pack;
drop package get_ulds_details_pack;
drop package get_uld_data_pack;
drop package get_uni_mix_ulds_pkg;
drop package mail_pack;
drop package tu_tagtrak_users_pack;
drop package uld_ldg_prog_pack;
drop package uld_ldg_prog_scanner_pack;
drop package codeshare;
drop package config;
drop package carrier;
drop package flightinfo;
drop procedure add_bag;
drop procedure add_bag_alert_record;
drop procedure add_bag_to_uld;
drop procedure add_bag_trace_record2;
drop procedure add_bag_trace_record;
drop procedure add_class_to_list;
drop procedure add_crew_bag;
drop procedure add_flight;
drop procedure add_flight_trace_record;
drop procedure add_flt_access;
drop procedure add_gate_bag;
drop procedure add_gate_pax_and_bag;
drop procedure add_hold_uld;
drop procedure add_loadall_pax;
drop procedure add_loaded_bag;
drop procedure add_log_rec;
drop procedure add_pax;
drop procedure add_pax_creds;
drop procedure add_rush_bag;
drop procedure add_uld_dests_record;
drop procedure add_uld_record;
drop procedure add_uld_trace_record;
drop procedure add_user_trace_record;
drop procedure check_bag_for_load;
drop procedure check_bag_for_unload;
drop procedure check_bag_transfer;
drop procedure check_priv;
drop procedure check_ulds;
drop procedure check_unload_alert;
drop procedure clear_bag;
drop procedure clear_pd_marker;
drop procedure clear_rush_bag;
drop procedure dcs_up_down;
drop procedure deassign_uld;
drop procedure delete_all_bags;
drop procedure delete_bag;
drop procedure delete_pax2;
drop procedure del_flight_priv_record;
drop procedure encrypt_password;
drop procedure erase_mail;
drop procedure erase_mba_flights;
drop procedure flightpax_bags;
drop procedure flightpax_id;
drop procedure flight_bag_count;
drop procedure flight_close;
drop procedure flight_id2;
drop procedure flight_id;
drop procedure flight_loading_progress;
drop procedure flight_no2;
drop procedure flight_no;
drop procedure generate_bpmid;
drop procedure generate_trolley_uld;
drop procedure getaddno;
drop procedure get_addr_count;
drop procedure get_alert_counts;
drop procedure get_alpha_code;
drop procedure get_bag_count;
drop procedure get_bpm_data1;
drop procedure get_bpm_data2;
drop procedure get_bpm_data4;
drop procedure get_bpm_status;
drop procedure get_carrier_code3;
drop procedure get_carrier_code;
drop procedure get_crew_bag_creds;
drop procedure get_first_bag_load1;
drop procedure get_first_bag_locn;
drop procedure get_gate_pax_creds;
drop procedure get_last_bag_load1;
drop procedure get_last_bld_trace;
drop procedure get_ldg_strat;
drop procedure get_pax_data;
drop procedure get_pax_details;
drop procedure get_priv;
drop procedure grant_all_flt_access;
drop procedure grant_by_flight;
drop procedure grant_contract_access;
drop procedure grant_flt_access;
drop procedure how_many_messages;
drop procedure increment_warn_count;
drop procedure is_uld_shipside;
drop procedure load_bag;
drop procedure mail_bpm1;
drop procedure mail_bpm2;
drop procedure mail_bpm3;
drop procedure mail_bpm4;
drop procedure mba_new_flights;
drop procedure mba_new_flt_warns;
drop procedure mba_new_warns;
drop procedure modify_flight;
drop procedure modify_flight_dests;
drop procedure modify_flight_status;
drop procedure modify_pax;
drop procedure modify_pax_bag_count;
drop procedure modify_uld_record;
drop procedure offload_bag;
drop procedure pax_and_bag_count;
drop procedure pax_bag_count;
drop procedure pax_id2;
drop procedure pax_id;
drop procedure priv_id_to_flt_access;
drop procedure rec_uld_posn;
drop procedure remove_bag_from_uld;
drop procedure reuse_bag;
drop procedure reuse_pax;
drop procedure reuse_rush_bag;
drop procedure reuse_exception_bag;
drop procedure revoke_all_by_flight;
drop procedure set_password;
drop procedure split_tags;
drop procedure store_bpm_user;
drop procedure user_logout;
drop procedure validate_access;
drop procedure validate_location;
drop procedure validate_password;
drop procedure xfer_bag;
drop procedure calc_stats;
drop procedure stats_last_hour;
drop procedure set_location;
drop procedure user_login;
drop procedure add_stats_access;
drop procedure make_sequence_no;
drop procedure add_carrier_map;
drop procedure add_weight;
drop procedure check_flight;
drop procedure get_gate_apron;
drop procedure derive_seq_no;
drop procedure log_flight_event;
drop procedure add_gate_pax;
drop procedure add_hel_fids_data;
drop procedure add_bsm.sql;
drop procedure add_bsm_data.sql;

drop procedure add_onward_flight;
drop function derive_seq_no;
drop package fasl_fids;
drop procedure get_onward_flight;
drop package mach_fids;
drop package onward_flight_defs;
drop package sysint;
drop package erase_records;
drop package hel_fids;
drop procedure get_event_type;
drop procedure set_event_type;
drop procedure validate_flight_direction;
drop package pax_match;

drop package modify_uld_onwards_details;


set heading off;
select
	count(*),
	'Procs/Packages/Funcs now exist for this user'
from
	user_objects
where
	object_type = 'PROCEDURE' or
	object_type = 'PACKAGE' or
	object_type = 'FUNCTION';
set heading on;
