Dropping views, functions and proc’s
.NET, Code Snippet, YAF February 5th, 2009Part 3 of my “Getting rid of YAF” series involves dropping views, functions and stored procedures.
SELECT 'DROP PROCEDURE '+name FROM dbo.sysobjects WHERE (type = 'P') union all SELECT 'DROP VIEW ' + name from dbo.sysobjects WHERE (type = 'V') union all SELECT 'DROP FUNCTION ' + name from dbo.sysobjects WHERE (type = 'FN')
Which should hopefully give you the following:
DROP PROCEDURE yaf_registry_list DROP PROCEDURE yaf_checkemail_save DROP PROCEDURE yaf_registry_save DROP PROCEDURE yaf_user_delete DROP PROCEDURE yaf_active_updatemaxstats DROP PROCEDURE yaf_user_approve DROP PROCEDURE yaf_eventlog_delete DROP PROCEDURE yaf_poll_stats DROP PROCEDURE yaf_eventlog_create DROP PROCEDURE yaf_poll_save DROP PROCEDURE yaf_bannedip_save DROP PROCEDURE yaf_choice_vote DROP PROCEDURE yaf_bannedip_list DROP PROCEDURE yaf_pollvote_check DROP PROCEDURE yaf_bannedip_delete DROP PROCEDURE yaf_post_list DROP PROCEDURE yaf_category_list DROP PROCEDURE yaf_user_accessmasks DROP PROCEDURE yaf_category_save DROP PROCEDURE yaf_forum_simplelist DROP PROCEDURE yaf_category_simplelist DROP PROCEDURE yaf_topic_delete DROP PROCEDURE yaf_topic_active DROP PROCEDURE yaf_forum_delete DROP PROCEDURE yaf_topic_latest DROP PROCEDURE yaf_forum_listpath DROP PROCEDURE yaf_post_last10user DROP PROCEDURE yaf_forum_listSubForums DROP PROCEDURE yaf_message_approve DROP PROCEDURE yaf_forum_moderatelist DROP PROCEDURE yaf_message_delete DROP PROCEDURE yaf_forum_list DROP PROCEDURE yaf_pageload DROP PROCEDURE yaf_forum_listall_fromcat DROP PROCEDURE yaf_forum_listall DROP PROCEDURE yaf_forum_save DROP PROCEDURE yaf_forum_listallmymoderated DROP PROCEDURE yaf_forum_updatelastpost DROP PROCEDURE yaf_category_listread DROP PROCEDURE yaf_forum_updatestats DROP PROCEDURE yaf_user_list DROP PROCEDURE yaf_forumaccess_group DROP PROCEDURE yaf_nntpforum_update DROP PROCEDURE yaf_group_save DROP PROCEDURE yaf_topic_updatelastpost DROP PROCEDURE yaf_message_update DROP PROCEDURE yaf_topic_move DROP PROCEDURE yaf_nntptopic_savemessage DROP PROCEDURE yaf_system_initialize DROP PROCEDURE yaf_nntpforum_list DROP PROCEDURE yaf_system_updateversion DROP PROCEDURE yaf_message_save DROP PROCEDURE yaf_active_list DROP PROCEDURE yaf_topic_prune DROP PROCEDURE yaf_attachment_list DROP PROCEDURE yaf_topic_save DROP PROCEDURE yaf_board_create DROP PROCEDURE yaf_board_delete DROP PROCEDURE yaf_watchforum_list DROP PROCEDURE yaf_board_poststats DROP PROCEDURE yaf_category_delete DROP PROCEDURE yaf_accessmask_delete DROP PROCEDURE yaf_forumaccess_list DROP PROCEDURE yaf_forumaccess_save DROP PROCEDURE yaf_group_delete DROP PROCEDURE yaf_forum_moderators DROP PROCEDURE yaf_user_find DROP PROCEDURE yaf_user_guest DROP PROCEDURE yaf_pmessage_save DROP PROCEDURE yaf_group_list DROP PROCEDURE yaf_group_member DROP PROCEDURE yaf_active_stats DROP PROCEDURE yaf_usergroup_list DROP PROCEDURE yaf_mail_createwatch DROP PROCEDURE yaf_mail_delete DROP PROCEDURE yaf_mail_list DROP PROCEDURE yaf_message_findunread DROP PROCEDURE yaf_message_getReplies DROP PROCEDURE yaf_message_list DROP PROCEDURE yaf_message_unapproved DROP PROCEDURE yaf_board_stats DROP PROCEDURE yaf_message_simplelist DROP PROCEDURE yaf_watchtopic_list DROP PROCEDURE yaf_post_list_reverse10 DROP PROCEDURE yaf_topic_listmessages DROP PROCEDURE yaf_user_activity_rank DROP PROCEDURE yaf_pmessage_list DROP PROCEDURE yaf_forum_listread DROP PROCEDURE yaf_pmessage_prune DROP PROCEDURE yaf_topic_list DROP PROCEDURE yaf_userpmessage_list DROP PROCEDURE yaf_user_deleteold DROP PROCEDURE yaf_pmessage_delete DROP PROCEDURE yaf_smiley_delete DROP PROCEDURE yaf_smiley_list DROP PROCEDURE yaf_smiley_listunique DROP PROCEDURE yaf_smiley_save DROP PROCEDURE yaf_topic_lock DROP PROCEDURE yaf_topic_findnext DROP PROCEDURE yaf_topic_findprev DROP PROCEDURE yaf_topic_info DROP PROCEDURE yaf_topic_simplelist DROP PROCEDURE yaf_forum_listtopics DROP PROCEDURE yaf_user_removepointsbytopicid DROP PROCEDURE yaf_user_resetpoints DROP PROCEDURE yaf_user_removepoints DROP PROCEDURE yaf_user_login DROP PROCEDURE yaf_user_recoverpassword DROP PROCEDURE yaf_user_nntp DROP PROCEDURE yaf_user_savepassword DROP PROCEDURE yaf_user_saveavatar DROP PROCEDURE yaf_user_suspend DROP PROCEDURE yaf_user_setpoints DROP PROCEDURE yaf_active_listtopic DROP PROCEDURE yaf_user_savesignature DROP PROCEDURE yaf_active_listforum DROP PROCEDURE yaf_userforum_list DROP PROCEDURE yaf_user_upgrade DROP PROCEDURE yaf_eventlog_list DROP PROCEDURE yaf_user_simplelist DROP PROCEDURE yaf_user_emails DROP PROCEDURE yaf_user_getsignature DROP PROCEDURE yaf_user_addpoints DROP PROCEDURE yaf_user_adminsave DROP PROCEDURE yaf_user_avatarimage DROP PROCEDURE yaf_user_changepassword DROP PROCEDURE yaf_user_deleteavatar DROP PROCEDURE yaf_user_getpoints DROP PROCEDURE yaf_watchforum_delete DROP PROCEDURE yaf_watchforum_add DROP PROCEDURE yaf_watchforum_check DROP PROCEDURE yaf_watchtopic_delete DROP PROCEDURE yaf_watchtopic_check DROP PROCEDURE yaf_watchtopic_add DROP PROCEDURE yaf_attachment_save DROP PROCEDURE yaf_attachment_delete DROP PROCEDURE yaf_attachment_download DROP PROCEDURE yaf_usergroup_save DROP PROCEDURE yaf_rank_delete DROP PROCEDURE yaf_rank_list DROP PROCEDURE yaf_rank_save DROP PROCEDURE yaf_accessmask_save DROP PROCEDURE yaf_accessmask_list DROP PROCEDURE yaf_userforum_save DROP PROCEDURE yaf_userforum_delete DROP PROCEDURE yaf_board_save DROP PROCEDURE yaf_board_list DROP PROCEDURE yaf_nntpserver_delete DROP PROCEDURE yaf_nntpserver_list DROP PROCEDURE yaf_nntpserver_save DROP PROCEDURE yaf_nntpforum_save DROP PROCEDURE yaf_nntpforum_delete DROP PROCEDURE yaf_nntptopic_list DROP PROCEDURE yaf_pmessage_info DROP PROCEDURE yaf_userpmessage_delete DROP PROCEDURE yaf_pmessage_markread DROP PROCEDURE yaf_replace_words_delete DROP PROCEDURE yaf_replace_words_edit DROP PROCEDURE yaf_replace_words_list DROP PROCEDURE yaf_user_save DROP PROCEDURE yaf_replace_words_save DROP PROCEDURE yaf_checkemail_update DROP VIEW yaf_vaccess DROP FUNCTION yaf_forum_topics DROP FUNCTION yaf_forum_posts DROP FUNCTION yaf_bitset
Using the scrips below and this script should be all you need to have a YAF free database.


Recent Comments