Closed BrentOzar closed 6 years ago
There's VARCHAR everywhere in here for database names, schema names, and index names. I fixed enough to where it'd run without erroring out, although just at a glance I think some of the results still have the wrong data in it.
For your testing environment, I'd add a database like this:
CREATE DATABASE [Database_¯\_(ツ)_/¯];
GO
USE [Database_¯\_(ツ)_/¯];
GO
CREATE SCHEMA [Schema_¯\_(ツ)_/¯];
CREATE TABLE [Schema_¯\_(ツ)_/¯].[Table_¯\_(ツ)_/¯] ([Field_¯\_(ツ)_/¯] INT IDENTITY(1,1) PRIMARY KEY CLUSTERED, Stuffing NVARCHAR(100));
CREATE NONCLUSTERED INDEX [Index_¯\_(ツ)_/¯] ON [Schema_¯\_(ツ)_/¯].[Table_¯\_(ツ)_/¯] ([Field_¯\_(ツ)_/¯]);
INSERT INTO [Schema_¯\_(ツ)_/¯].[Table_¯\_(ツ)_/¯] (Stuffing)
SELECT TOP 100 name
FROM sys.all_objects;
GO
Then if you ever see errors about database, schema, table, or index ¯_(?)_/¯ not existing, you'll know there's a varchar problem.
Thanks Brent, fixing now.
Not urgent at all, just filing because I'd heard Pedro talking about the script, figured I'd give it a shot.
Steps to repro:
Then run Check_BP_Servers, and it fails with errors like:
Root cause looks like the @dbname parameters being varchar, because this won't work:
Result: ¯_(?)_/¯
Environment: 14.0.1000.169, Windows, case-sensitive default collation.