marcingminski/sqlwatch

Could not find stored procedure 'dbo.usp_sqlwatch_config_set_table_compression'.

francesco1119 opened this issue · 7 comments

Describe the bug
Following your documentation at this page https://docs.sqlwatch.io/configuration/basics/ I found out that two of your stored procedures are missing

To Reproduce
Steps to reproduce the behavior:

  1. Follow the official guide and install SQLWATCH through DBATools
  2. Run:
exec [dbo].[usp_sqlwatch_config_set_table_compression];
exec [dbo].[usp_sqlwatch_config_set_index_compression];

and you will receive the error:

Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'dbo.usp_sqlwatch_config_set_table_compression'.
Msg 2812, Level 16, State 62, Line 2
Could not find stored procedure 'dbo.usp_sqlwatch_config_set_index_compression'.

Expected behavior
Those Stored Procedures should exist
Screenshots
Look at the first two lines: the text is underlined in red in SSMS, simptom that the two Stored Procedure don't exist:

image

Windows Server (please complete the following information):

Edition	Windows 10 Enterprise
Version	20H2
Installed on	‎29.‎07.‎2021
OS build	19042.1348
Experience	Windows Feature Experience Pack 120.2212.3920.0

SQL Server (please complete the following information):
Microsoft SQL Server 2019 (RTM-CU14) (KB5007182) - 15.0.4188.2 (X64) Nov 3 2021 19:19:51 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Enterprise 10.0 <X64> (Build 19042: ) (Hypervisor)

SQL Server Management Studio (SSMS -> about -> copy info):

SQL Server Management Studio						15.0.18390.0
SQL Server Management Objects (SMO)						16.100.46521.71
Microsoft Analysis Services Client Tools						15.0.19714.0
Microsoft Data Access Components (MDAC)						10.0.19041.1
Microsoft MSXML						3.0 6.0 
Microsoft .NET Framework						4.0.30319.42000
Operating System						10.0.19042

SQLWATCH version (from DACPAC or from sysinstances)
I have installed it today from DBATools so your live distribution as per today 07/01/2022

The documentation is out of date, procedures have been renamed recently but are still there

I think I found them.

If so you need to change to your documentation:

exec [dbo].[usp_sqlwatch_config_set_table_compression];
exec [dbo].[usp_sqlwatch_config_set_index_compression];

to:

exec [dbo].[usp_sqlwatch_config_enable_compression_sqlwatch_indexes]
exec [dbo].[usp_sqlwatch_config_enable_compression_sqlwatch_tables]

documentation is open source, you can change it too :)

Hi, sorry, I had to rectify: the two stored procedures are indeed missing in the list.

If I run on SQLWATCH Select [NAME] from sysobjects where type = 'P' and category = 0 I have a list of all stored procedure, they are 77 and those two are missing:

usp_sqlwatch_config_add_action
usp_sqlwatch_config_add_check
usp_sqlwatch_config_add_report
usp_sqlwatch_config_enable_compression_sqlwatch_indexes
usp_sqlwatch_config_enable_compression_sqlwatch_tables
usp_sqlwatch_config_repository_create_linked_server
usp_sqlwatch_config_sqlserver_set_blocked_proc_threshold
usp_sqlwatch_internal_action_queue_get_next
usp_sqlwatch_internal_add_check
usp_sqlwatch_internal_add_database
usp_sqlwatch_internal_add_job
usp_sqlwatch_internal_add_master_file
usp_sqlwatch_internal_add_memory_clerk
usp_sqlwatch_internal_add_os_volume
usp_sqlwatch_internal_add_performance_counter
usp_sqlwatch_internal_add_procedure
usp_sqlwatch_internal_add_system_configuration
usp_sqlwatch_internal_add_wait_type
usp_sqlwatch_internal_create_agent_job
usp_sqlwatch_internal_expand_checks
usp_sqlwatch_internal_get_last_snapshot_time
usp_sqlwatch_internal_get_last_snapshot_time_in_tables
usp_sqlwatch_internal_get_query_plans
usp_sqlwatch_internal_insert_header
usp_sqlwatch_internal_log
usp_sqlwatch_internal_purge_deleted_items
usp_sqlwatch_internal_query_to_html_table
usp_sqlwatch_internal_retention
usp_sqlwatch_internal_run_job
usp_sqlwatch_internal_start_xes
usp_sqlwatch_internal_tester
usp_sqlwatch_internal_update_xes_query_count
usp_sqlwatch_logger_agent_job_history
usp_sqlwatch_logger_disk_utilisation_os_volume
usp_sqlwatch_logger_errorlog
usp_sqlwatch_logger_hadr_database_replica_states
usp_sqlwatch_logger_index_histogram
usp_sqlwatch_logger_missing_index_stats
usp_sqlwatch_logger_performance
usp_sqlwatch_logger_procedure_stats
usp_sqlwatch_logger_query_stats
usp_sqlwatch_logger_requests_and_sessions
usp_sqlwatch_logger_system_configuration
usp_sqlwatch_logger_whoisactive
usp_sqlwatch_logger_xes_query_problems
usp_sqlwatch_purge_orphaned_snapshots
usp_sqlwatch_repository_get_remote_data
usp_sqlwatch_repository_populate_tables_to_import
usp_sqlwatch_repository_remote_table_dequeue
usp_sqlwatch_repository_remote_table_enqueue
usp_sqlwatch_repository_remote_table_import_worker
usp_sqlwatch_trend_perf_os_performance_counters
usp_sqlwatch_config_create_default_agent_jobs
usp_sqlwatch_config_repository_add_remote_instance
usp_sqlwatch_config_repository_create_agent_jobs
usp_sqlwatch_internal_action_queue_update
usp_sqlwatch_internal_foreachdb
usp_sqlwatch_internal_get_xes_data
usp_sqlwatch_internal_process_reports
usp_sqlwatch_logger_disk_utilisation
usp_sqlwatch_logger_disk_utilisation_table
usp_sqlwatch_logger_index_usage_stats
usp_sqlwatch_logger_xes_blockers
usp_sqlwatch_logger_xes_diagnostics
usp_sqlwatch_logger_xes_long_queries
usp_sqlwatch_logger_xes_waits
usp_sqlwatch_repository_remote_table_import
usp_sqlwatch_internal_add_index
usp_sqlwatch_internal_add_index_missing
usp_sqlwatch_internal_add_table
usp_sqlwatch_internal_process_actions
usp_sqlwatch_internal_process_checks
usp_sqlwatch_internal_broker_diagnostics
usp_sqlwatch_internal_exec_activated
usp_sqlwatch_internal_exec_activated_async
usp_sqlwatch_internal_migrate_jobs_to_queues
usp_sqlwatch_internal_restart_queues

Have they been removed?

usp_sqlwatch_config_enable_compression_sqlwatch_indexes
usp_sqlwatch_config_enable_compression_sqlwatch_tables

those two are missing? I can see them in your list?
Which version of sqlwatch are you using?

No, the two that are missing are:

exec [dbo].[usp_sqlwatch_config_set_table_compression];
exec [dbo].[usp_sqlwatch_config_set_index_compression];

and the guide says they should be there: https://docs.sqlwatch.io/configuration/basics/

Where can I check the SQLWATCH version?

They’re not missing. They have been renamed to:

usp_sqlwatch_config_enable_compression_sqlwatch_indexes
usp_sqlwatch_config_enable_compression_sqlwatch_tables

the guide clearly says:

You can do so by running the below, depending on your version of SQLWATCH:

So in your case, it’s either of those two examples