Monday, April 2, 2012

Server, database and application maintenance.

Code assimilated into my code base libraries via the Internet is more often than not I recoded a bit  adding input parameters and modifying the return data. My admin routines pass a server name and database name so they can be run on any target server database.  I have listed a few of the jobs I schedule or have available to run on my servers below. In some cases I use SQL Server to dynamically create and execute scripts such as VBScript, WMI, DOS, xp_cmdshell, SQLCMD, etc. 
Most of them call procedures in my personal DBA Tool's database.  I am currently in the process of splitting it up into Azure\cloud code and code that can only be executed on client machines such as File System code. 
Design Issues
Bad table or database design is not invisible.  There are just a few  simple concepts to understand to learn the most important aspects of database and table design quickly.

maint_notification_di_missing_clustered_index - Physically sorted on this index
maint_notification_di_missing_primary_keys - primary and foreign keys.
maint_notification_di_missing_real_data_unique_record_constraints
maint_notification_di_missing_referential_integrity_constraints

Maintenance - Server

maint_fs_defrag
maint_fs_cleanup_disk
maint_db_index_defrag_offline
maint_db_index_defrag_online
maint_db_integrity_checks
maint_db_statistics_update
maint_srvrall_index_maintenance
maint_notification_index_fragmentation

Maintenance - Database
main_db_repair_emergency
maint_db_fix_orphaned_logins
maint_db_growth_monitor
maint_ssrs_rpt_send_Perfmon
maint_backups_delete_old_zip_new
maint_db_autoshrink_off
maint_db_autoshrink_on
maint_db_backup_OLAP
maint_db_metadata_load
maint_db_recovery_models
maint_db_security_db_executor_update
maint_db_shrink_all_databases
maint_db_xp_cmdshell_set_pwds
maint_logs_RSExecutionLog_Update (Reporting Services Monitoring)
maint_notification_blocking
maint_notification_connections
maint_notification_db_growth_configuration
maint_notification_DBSizeAlert
maint_notification_disk_usage
maint_notification_diskspace
maint_notification_job_backups_disabled
maint_notification_job_errors_developer
maint_notification_job_show_running
maint_notification_jobs_disabled
maint_notification_jobs_scheduled
maint_notification_LogDirSize
maint_notification_missing_backups
maint_notification_server_down
maint_notification_server_issue_configuration
maint_notification_server_issue_counters
maint_notification_surface_area_configururation_issue
maint_rpt_jobs_scheduled
maint_rpt_srvr_user_accounts_DisabledOrExpireCheck
maint_dboptions - business closed
maint_dboptions - business open
maint_srvr_job_owner_assign
maint_srvr_option_monitor

Code Maintenancemaint_db_compile_modules                   Makes sure they all compile.
maint_db_compile_views                       Makes sure they all compile.

Maintenance - Data
rpt_ad_anomaly_detection                     Report application data issues. i.e. inactive date without active date.
maint_db_column_selectivity_log           Collect data population and selectivity statistics for all columns.

Application Support
maint_auditlogs_PopulateFromLocal
maint_db_move_subscription_data_files
maint_db_scriptall

Database Tuning Data
maint_trace_collect
maint_trace_database_tuning_wizard_run
maint_trace_flags_disable
maint_trace_flags_enable
maint_trace_import
maint_trace_jobs_disable
maint_trace_jobs_enable
maint_trace_killall
maint_trace_notification_cpu_usage_sp_who2
maint_trace_notification_sessions_active
maint_trace_notification_trace_show_cpu_intensive
maint_trace_purge_trace_job_history
maint_trace_rpt_running
maint_trace_rpt_table_counts
maint_trace_send_reports
maint_trace_start_DBName
maint_trace_start_specified
maint_trace_stop_DBName
maint_trace_stop_specified
maint_trace_table_limit_size
maint_db_index_hypothetical_delete

No comments:

Post a Comment