SDU Tools

SDU Tools Free tools for developers and DBAs

Free for anyne on the SDUInsiders email list. Current release is v24.

Download Now

SDU Tools is an easy to use toolkit. You just run a single script to install it in any database. Each release completely replaces all contents of the SDU_Tools schema. It contains utility functions, procedures, and views. Many of the functions are useful when performing troubleshooting but others are just general purpose functions. This toolkit is updated every few months.

Find the latest version or sign up to be notified of updates right here, and for suggestions or bug reports, please email sdutools @ sqldownunder.com.

To see how any of the tools work, click the name or description of the tool below for a short video presentation.

Tools Information

Topic Description
Overview https://www.youtube.com/watch?v=o0im4sE5lsA Watch an overview of the tools
Installation https://www.youtube.com/watch?v=zRPvryGYYXU Watch a video that shows how to install the tools (it's easy)
Removal https://www.youtube.com/watch?v=lYFjGmG5lew Watch a video that shows how to remove the tools (it's also easy)
SDUToolsVersion https://www.youtube.com/watch?v=AsYA9Bd0t0k Returns the version of SDU Tools that is installed
Tools https://www.youtube.com/watch?v=4Sn-H_jAk8Y Allows querying all the installed tools

Strings

Topic Description
AlphabeticOnly https://youtu.be/R51509NbAf0 Removes all non-alphabetic characters in a string
AlphanumericOnly https://youtu.be/R51509NbAf0 Removes all non-alphanumeric characters in a string
AsciiOnly https://youtu.be/0YFYPN0Bivo Removes or replaces all non-ASCII characters in a string
CamelCase https://youtu.be/OZ-ozo7R9eU Apply Camel Casing to a string
CobolCase https://youtu.be/i1rnVlOR760 Apply Cobol Casing to a string
CountWords https://youtu.be/H_BUVEqZy0c Counts words in a string, using English syntax
DigitsOnly https://youtu.be/28e8p1oz7D4 Removes all non-digit characters in a string
ExtractToken https://youtu.be/vT8GpbwaKzU Extracts a specific token from a delimited string
ExtractTrigrams https://youtu.be/Bx8tijrm84E Extracts all trigrams (up to 3 character substrings) from a string
ExtractTrimmedWords https://youtu.be/wkSF0VWZwOs Returns an ordered table of trimmed words extracted from the string
FormatAustralianPhoneNumber https://youtu.be/J4SIZI52hO4 Formats a string as an Australian phone number
InitialsFromName https://youtu.be/bWPsidPGrCQ Returns the initials from a name, separated by a separator
InvertString https://youtu.be/GhNOr0p1-lM Inverts a string by using USD Encoding as per https://en.wikipedia.org/wiki/Transformation_of_text#Upside-down_text
KebabCase https://youtu.be/6IcLkMEQtkY Apply Kebab Casing to a string
LeftPad https://youtu.be/P-r1zmX1MpY Left pads a string
NumberAsText https://youtu.be/_jgU-5jUUA8 Converts a number to a text string (using English words)
NumberOfTokens https://youtu.be/vT8GpbwaKzU Counts the number of tokens in a delimited string (usually either a CSV or TSV)
PascalCase https://youtu.be/OZ-ozo7R9eU Apply Pascal Casing to a string
PercentEncode https://youtu.be/pNjaasXYvEQ Apply percent encoding to a string (could be used for URL Encoding)
PreviousNonWhitespaceCharacter https://youtu.be/rY5-eLlzuKU Locates the previous non-whitespace character in a string
ProperCase https://youtu.be/OZ-ozo7R9eU Apply Proper Casing to a string
QuoteString https://youtu.be/uIj-hTIhIZo Quotes a string (also doubles embedded quotes)
RightPad https://youtu.be/P-r1zmX1MpY Right pads a string
ROT13 https://youtu.be/xZt__QIPEzA Performs ROT-13 encoding or decoding of a string
ScreamingSnakeCase https://youtu.be/6IcLkMEQtkY Apply Screaming Snake Casing to a string
SeparateByCase https://youtu.be/kyr8C2hY5HY Insert a separator between Pascal cased or Camel cased words
SingleSpaceWords https://youtu.be/h5SGwS-uHzI Removes any whitespace characters and returns words single-spaced
SnakeCase https://youtu.be/OZ-ozo7R9eU Apply Snake Casing to a string
SplitDelimitedString https://youtu.be/Ubt4HSKE2QI Splits a delimited string (usually either a CSV or TSV)
SplitDelimitedStringIntoColumns https://youtu.be/yigwHDzPST0 Splits a delimited string into columns (usually either a CSV or TSV)
SpongeBobSnakeCase https://youtu.be/6IcLkMEQtkY Apply SpongeBob Snake Casing to a string
StringLength https://youtu.be/ztzQ7SLQWlE Determines the length of a string. Unlike LEN(), does not ignore trailing blanks
StripDiacritics https://youtu.be/Aqiqa9OXNqQ Strips diacritics (accents, graves, etc.) from a string
TitleCase https://youtu.be/OZ-ozo7R9eU Apply Title Casing to a string (similar to book titles)
TrainCase https://youtu.be/6IcLkMEQtkY Apply Train Casing to a string
Translate https://youtu.be/k8zbN1f8fgI Replace a set of characters in a string with a replacement set of characters
TrimWhitespace https://youtu.be/cYaUC053Elo Trims all whitespace around a string
TruncateTrailingZeroes https://youtu.be/DGnUdJVIxmU Returns the value converted to a string with trailing zeroes truncated
XMLDecodeString https://youtu.be/zZiCxGHyGsY XML decodes a string
XMLEncodeString https://youtu.be/zZiCxGHyGsY XML encodes a string

Dates and Times

Topic Description
AddWeekdays https://youtu.be/P7-nGcDOVyI Adds a number of weekdays (non-weekend-days) to a start date
CalculateAge https://youtu.be/4XTubsQKPlw Return an age in years from a starting date to a calculation date
CalculateAgeInMonths https://youtu.be/AZaEfnIqt_E Return an age in months from a starting date to a calculation date
ChineseNewYearAnimalName https://youtu.be/FM-SPBzXCYM Returns the zodiac animal name for Chinese New Year in a given year
ChineseYears https://youtu.be/FM-SPBzXCYM Maps Years to Chinese Years
DateDiffNoSundays https://youtu.be/bfyIuyLy0VE Determines the number of days (Monday to Saturday) between two dates
DateDiffNoWeekends https://youtu.be/BhPtrYEWT6I Determines the number of days (Monday to Friday) between two dates
DateDimensionColumns https://youtu.be/oxJi41TnE94 Returns a single row with date dimension columns
DateDimensionPeriodColumns https://youtu.be/pcoaHYK70nU Returns a single row table with date dimension period columns
DateOfChineseNewYear https://youtu.be/FM-SPBzXCYM Calculates the date of Chinese New Year for a given year
DateOfEasterSunday https://youtu.be/Cru9RVZqFZU Calculates the date of Easter Sunday (Christian Easter) for a given year
DateOfOrthodoxEaster https://youtu.be/QbYx4k0ey8k Returns the date of Orthodox Easter in a given year
DatesBetween https://youtu.be/oxJi41TnE94 Returns all dates between the two dates supplied (inclusive)
DatesBetweenNoWeekends https://youtu.be/m5GtvUHXOFQ Returns a table of dates excluding weekends
DatesFYTD TODO Returns all dates from the start of the financial year to the date given
DatesInPeriod https://youtu.be/D_abxiKmOHY Returns a table of dates
DatesYTD TODO Returns all dates from the start of the calendar year to the date given
DayNumberOfMonth https://youtu.be/BeVXs-J4soo Returns the nth nominated day of the month
DaysInMonth https://youtu.be/BWl2jdNzjJU Returns the total number of days in the month for a given date
EndOfFinancialYear https://youtu.be/wc8ZS_XPKZs Calculates the last date of the financial year for any given date
EndOfMonth https://youtu.be/ZZ9NR8M5lRc Calculates the last date of the month for any given date
EndOfWeek https://youtu.be/8ITn30E8240 Calculates the last date of the week for any given date
EndOfWorkingWeek https://youtu.be/8ITn30E8240 Calculates the last date of the working week for any given date
EndOfYear https://youtu.be/8ITn30E8240 Calculates the last date of the year for any given date
GetDateDimension https://youtu.be/jYKkh52TEqo Outputs date dimension columns for all dates in the supplied range of dates
GetTimePeriodDimension https://youtu.be/jYKkh52TEqo Outputs time period dimension columns for an entire day
IsLeapYear https://youtu.be/zVwRSJIYz2A Determines if a given year is a leap year
IsWeekday https://youtu.be/yizREK9tCZA Determines if the provided date is a week day (Monday to Friday)
IsWeekend https://youtu.be/yizREK9tCZA Determines if the provided date is a weekend day (Saturday or Sunday)
NearestWeekday https://youtu.be/YSkWiD5Sfeg Returns the nominated day closest to the date supplied
StartOfFinancialYear https://youtu.be/wc8ZS_XPKZs Calculates the first date of the financial year for any given date
StartOfMonth https://youtu.be/ZZ9NR8M5lRc Calculates the first date of the month for any given date
StartOfWeek https://youtu.be/8ITn30E8240 Calculates the first date of the week for any given date
StartOfWorkingWeek https://youtu.be/8ITn30E8240 Calculates the first date of the working week for any given date
StartOfYear https://youtu.be/8ITn30E8240 Calculates the first date of the year for any given date
TimePeriodDimensionColumns https://youtu.be/14UrzoIgrwA Returns a single row of time period dimension columns
TimePeriodsBetween https://youtu.be/YAHLiGHjtfw Returns a table of time periods (start of each time period)
TimezoneOffsetToHours https://youtu.be/2JRKZeNEIrE Calculates a number of hours from a timezone offset
WeekdayAcrossYears https://youtu.be/k4wY1isY1G0 Returns a table of days of the week for a given day over a set of years
WeekdayOfMonth https://youtu.be/VFNJLTiqBnY Returns the nth weekday of the month
WeekdayOfSameWeek https://youtu.be/XHMrwNvqwdQ Returns the nominated day in the same week as the target date

Data Conversion Functions

Topic Description
Base64ToVarbinary https://youtu.be/k6yHYdHn7NA Converts a base 64 value to varbinary
CharToHexadecimal https://youtu.be/aT4viskU7fE Converts a single character to a hexadecimal string
DateTime2ToUnixTime https://youtu.be/tGplVv-G3E4 Converts a datetime2 value to Unix time
DateTimeToExcelSerial https://youtu.be/hxmGtKjkcwk Convert a SQL Server datetime to an Excel serial value (datetime)
DateToJulianDayNumber https://youtu.be/eLk2Bgj-aPo Converts the date to a Julian day number
ExcelSerialToDateTime https://youtu.be/hxmGtKjkcwk Convert an Excel serial value (datetime) to a SQL Server datetime
FilePathComponents https://youtu.be/e-QUAeA_qb0 Extracts components from a file path
FilePathToFileExtension https://youtu.be/ZtIrR-o319s Extracts a file extension from a file path
FilePathToFileName https://youtu.be/ZtIrR-o319s Extracts a filename from a file path
FilePathToFolderPath https://youtu.be/ZtIrR-o319s Extracts a folder path from a file path
HexCharStringToChar https://youtu.be/2BMd9uYjHVQ Converts a hexadecimal character string to a character
HexCharStringToInt https://youtu.be/2BMd9uYjHVQ Converts a hexadecimal character string to an integer
JulianDayNumberToDate https://youtu.be/eLk2Bgj-aPo Converts a Julian day number to a date
NullIfBlank https://youtu.be/u1fCB08407s Returns a NULL string if the string contains no characters, else trims the string
NullIfZero https://youtu.be/u1fCB08407s Returns a NULL decimal if the value is zero
NumberToRomanNumerals https://youtu.be/msCDdOdYwAo Converts a number to a text string containing Roman Numerals
SecondsToDuration https://youtu.be/beANzSe1-jE Convert a number of seconds to a SQL Server duration string
SQLVariantInfo https://youtu.be/em62I-GBCEY Returns information about a SQL_variant value
UnixTimeToDateTime2 https://youtu.be/tGplVv-G3E4 Converts a Unix time to a datetime2 value
URLComponents https://youtu.be/DyKoWCTXzEs Extracts components from a URL
URLToAnchor https://youtu.be/DyKoWCTXzEs Extracts anchor from a URL
URLToHostName https://youtu.be/DyKoWCTXzEs Extracts host name from a URL
URLToPathName https://youtu.be/DyKoWCTXzEs Extracts path name from a URL
URLToProtocol https://youtu.be/DyKoWCTXzEs Extracts protocol from a URL
URLToSearchTerms https://youtu.be/DyKoWCTXzEs Extracts search terms from a URL
VarbinaryToBase64 https://youtu.be/k6yHYdHn7NA Converts a varbinary value to base 64 encoding

Database and Table Comparison Tools

Topic Description
GetDBSchemaCoreComparison https://youtu.be/8Q8dsxBU6XQ Checks the schema of two databases, looking for basic differences (user objects only)
GetTableSchemaComparison https://youtu.be/8Q8dsxBU6XQ Check the schema of two tables, looking for basic differences

Database Utilities

Topic Description
AnalyzeTableColumns https://youtu.be/V-jCAT-TCXM Provide metadata for a table's columns and list the distinct values held in the column (up to a maximum number)
CalculateTableLoadingOrder https://youtu.be/7p5RXUplO40 Work out dependency between tables and work out loading order
CheckInstantFileInitializationState https://youtu.be/N02HbnDldrk Checks if IFI is enabled (Note: for systems earlier than SQL Server 2014 SP2 the procedure must create and drop a database to test)
ClearServiceBrokerTransmissionQueue https://youtu.be/WFucJKtoN-Y Removes all messages in the service broker transmission queue by ending all existing conversations
CreateLinkedServerToAzureSQLDatabase https://youtu.be/UyYiv0XMCSU Creates a linked server that points to an Azure SQL Database
CreateSQLLoginWithSIDFromDB https://youtu.be/cY9pabyQbEQ Creates a SQL Login with SID retrieved from a database
CurrentSessionDecimalSeparator https://youtu.be/Jy_qVDOjUzI Works out what the decimal separator is for the current session
CurrentSessionThousandsSeparator https://youtu.be/Jy_qVDOjUzI Works out what the thousands separator is for the current session
DropTemporaryTableIfExists https://youtu.be/lbbjm-k8Axc If the temporary table is defined in the current session, the table is dropped
EmptySchema https://youtu.be/ygQNeirGdlM Removes objects in the specified schema in the specified database
EmptySchemaInCurrentDatabase https://youtu.be/A0y2Ltemz3g Removes objects in the specified schema in the current database
ExecuteCommandInEachDB https://youtu.be/W4BnHt1VeYE Executes a T-SQL Command in each database
ExecuteJobAndWaitForCompletion https://youtu.be/zTNMgez6ubo Executes a SQL Server Agent job synchronously (waits for it to complete)
FindStringWithinADatabase https://youtu.be/OpTdjMMjy8w Finds a string anywhere within a database. Can be useful for testing masking of data.
IsIPv4Address https://youtu.be/lTyVkgjL7wo Determines if an input string is a valid IP v4 address
IsJobRunning https://youtu.be/dUEhe4Or3GM Determines if a SQL Server Agent job is running
IsLockPagesInMemoryEnabled https://youtu.be/QRgAwqSJysg Checks if LPIM is enabled
IsXActAbortON https://youtu.be/Bx81-MTqr1k Checks if XACT_ABORT is on
LastSQLServerRestart https://youtu.be/bHydP1dzSXE Returns the last time the SQL Server was restarted
LatestSQLServerBuilds https://youtu.be/iukl9tItxJ0 View returning latest release and patch level for all supported SQL Server versions
ListAllDataTypesInUse https://youtu.be/1MzqnkLeoNM Lists all data types in use
ListColumnsAndDataTypes https://youtu.be/FlkRho_Hngk Lists the data types for all columns (user tables only)
ListConstraintsWithSystemNames https://youtu.be/YA_6891BDds List constraints that have system generated names (prefer appropriate assigned names)
ListDisabledIndexes https://youtu.be/oLfp8y7XRdE List indexes that are disabled with both key and included column lists
ListEmptyUserTables https://youtu.be/31uOTcyljWY Lists the schema and table names for all empty tables
ListForeignKeyColumns https://youtu.be/NC1na-Jn0ck List foreign keys with both source and referenced columns
ListForeignKeys https://youtu.be/NC1na-Jn0ck List foreign keys with column lists
ListIncomingForeignKeys https://youtu.be/NnkAcm_b9ks List foreign keys with column lists filtered by the target schemas and tables
ListIndexes https://youtu.be/Mgwjw5mXnN8 List indexes with both key and included column lists
ListInstalledSQLServerInstances https://youtu.be/hCAAUXLbv1k Lists all installed SQL Server instances
ListMismatchedDatabaseCollations https://youtu.be/73Px7Ml04N0 List databases with collations that don't match the server's collation
ListMismatchedDataTypes https://youtu.be/i6mmzhu4T9g List columns with the same name that are defined with different data types (user tables only)
ListNonIndexedForeignKeys https://youtu.be/VAD8PyQ1RUs List foreign keys where the foreign key columns are not present as the first components of at least one non-clustered index
ListPotentialDateColumns https://youtu.be/X2F82WmcgIg Lists columns that are named as dates but use datatypes with time
ListPotentialDateColumnsByValue https://youtu.be/2bmhVXq_02Y Lists columns that are defined with datatypes that include a time component but no time value is present
ListPrimaryKeyColumns https://youtu.be/usTlhzOJj9o Lists the columns that are used in primary keys for all tables
ListSubsetIndexes https://youtu.be/aICj46bmKJs Lists indexes that appear to be subsets of other indexes
ListUntrustedCheckConstraints https://youtu.be/d2-8ZMeaB0A Lists untrusted check constraints. Ignores disabled constraints.
ListUntrustedForeignKeys https://youtu.be/d2-8ZMeaB0A Finds foreign keys that are not trusted
ListUnusedIndexes https://youtu.be/SNVSBWPsBnw List indexes that appear to be unused (user tables only)
ListUseOfDeprecatedDataTypes https://youtu.be/XaRtOR1m8QI Lists any use of deprecated data types (user tables only)
ListUserDefinedDataTypes https://youtu.be/Xay5qdsSJ7Y Lists the user defined data types in a database
ListUserHeapTables https://youtu.be/hhrLzkSY3pQ Lists the user tables that do not have a clustered index declared
ListUserTableAndIndexSizes https://youtu.be/mwOpnit0zqg Lists the size and number of rows for all or selected user tables and indexes
ListUserTableSizes https://youtu.be/mwOpnit0zqg Lists the size and number of rows for all or selected user tables
ListUserTablesWithNoPrimaryKey https://youtu.be/HVMEBhJS-GQ Lists the user tables that do not have a primary key declared
ListViewColumnsAndDataTypes https://youtu.be/kuJBf6R8P2Q Lists the data types for all columns (user views only)
NonDefaultSystemConfigurationOptions https://youtu.be/PZy2zWH0Nzc View returning SQL Server Configuration options that are not at their default values
OperatingSystemConfiguration https://youtu.be/vppwkKyWCwQ Configuration of the current operating system
PGObjectName https://youtu.be/2ZPa1dgOZew Converts a SQL Server object name to a PostgreSQL object name
PrintMessage https://youtu.be/Coabe1oY8Vg Prints a message immediately rather than waiting for PRINT to be returned
ProductVersionComponents https://youtu.be/st9RO_Ir1tc Extracts the components of a product version
ProductVersionToBuild https://youtu.be/st9RO_Ir1tc Extracts a product build from a build number (product version)
ProductVersionToMajorVersion https://youtu.be/st9RO_Ir1tc Extracts a product major version from a build number (product version)
ProductVersionToMinorVersion https://youtu.be/st9RO_Ir1tc Extracts a product minor version from a build number (product version)
ProductVersionToRelease https://youtu.be/st9RO_Ir1tc Extracts a product release from a build number (product version)
ReadCSVFile https://youtu.be/ypuHanV2c6E Reads a CSV file's data and outputs it as a set of columns
ReseedSequenceBeyondTableValues https://youtu.be/q-Ng3vQRo50 Sets the sequence to a value beyond any column value that uses it as a default
ReseedSequences https://youtu.be/q-Ng3vQRo50 Sets the sequences to a value beyond any column value that uses them as a default
ResetSequence https://youtu.be/mCvnqOAO58w Resets the next sequence value to start with 1
RetrustCheckConstraints https://youtu.be/UM1NFlu4z28 Tries to retrust untrusted check constraints. Ignores disabled constraints.
RetrustForeignKeys https://youtu.be/UM1NFlu4z28 Tries to retrust untrusted foreign keys. Ignores disabled foreign keys
ScriptAnalyticsView https://youtu.be/lodq1ZvS51s Scripts a data model table as an analytics view
ServerMaximumDBCompatibilityLevel https://youtu.be/79tGktJsZyM Returns the maximum database compatibility level for the server
SetAnsiNullsOnForTable https://youtu.be/dQGBjchJYzc Changes the ANSI Nulls setting for a table to ON
SetAnsiNullsQuotedIdentifierForStoredProcedures https://youtu.be/EoYV_FbvkZQ Changes the ANSI_NULLS and QUOTED_IDENTIFIER settings for selected procedures
SetDatabaseCompabilityForAllDatabasesToMaximum https://youtu.be/2FX9DU5xLP8 Sets the database compability level for all databases to the maximum supported level
ShowBackupCompletionEstimates https://youtu.be/M-Gh4CfQkIg Shows completion estimates for any currently executing backups
ShowCurrentBlocking https://youtu.be/utIPkuqfTu0 Lists sessions holding locks, the SQL they are executing, then lists blocked items and the SQL
Sleep https://youtu.be/csUCf2GWGec Sleeps for the given number of seconds
SQLServerType https://youtu.be/tASWb2eN-8w Returns the type of SQL Server for the current session
SQLServerVersion https://youtu.be/_5DzK4ywxOU Returns the version of SQL Server (e.g. 2012, 2014, 2008R2)
SQLServerVersionForCompatibilityLevel https://youtu.be/3i6xB7guzVM Converts a database compatibility level to a SQL Server version
TableOfNumbers https://youtu.be/Ox-Ig043oeg Returns a table of numbers with a specified number of rows from the specified starting value
UpdateStatistics https://youtu.be/MW8pFHb4DhQ Update statistics for selected set of user tables

Reporting Services Functions

Topic Description
RSListContentItems https://youtu.be/1eSKt2E0rbY Details of all reporting services content (reports, folders, etc.)
RSListUserAccess https://youtu.be/1eSKt2E0rbY Details Reporting Services users and their roles
RSListUserAccessToContent https://youtu.be/1eSKt2E0rbY Details which RS users have access to which content (reports, folders, etc.)

Scripting Functions

Topic Description
ExecuteOrPrint https://youtu.be/cABGotl_yHY Execute or Print One or More SQL Commands in a String
FormatDataTypeName https://youtu.be/Cn3jK3roWLg Converts data type components into an output string
ScriptDatabaseObjectPermissions https://youtu.be/Yz_869V-hRw Scripts all database object premissions
ScriptDatabaseUsers https://youtu.be/IbsUyfLh2Po Scripts all database users
ScriptServerPermissions https://youtu.be/pszTHe2PhVQ Scripts all Server Permissions
ScriptServerRoleMembers https://youtu.be/pszTHe2PhVQ Scripts all Server Role Members
ScriptSQLLogins https://youtu.be/pszTHe2PhVQ Scripts all specified SQL logins, with password hashes, security IDs, default databases and languages
ScriptTable https://youtu.be/U62ACZQUDk4 Create a script for a table
ScriptTableAsUnpivot https://youtu.be/03f6NDB19ms Create a script for a table that unpivots its results. The script can be a view or a query.
ScriptUserDefinedDatabaseRolePermissions https://youtu.be/EHMbDKFOS-E Scripts all permissions for user-defined database roles
ScriptUserDefinedDatabaseRoles https://youtu.be/EHMbDKFOS-E Scripts all user-defined database roles, including disabled state where applicable
ScriptUserDefinedServerRolePermissions https://youtu.be/EHMbDKFOS-E Scripts all permissions for user-defined server roles
ScriptUserDefinedServerRoles https://youtu.be/EHMbDKFOS-E Scripts all user-defined server roles, including disabled state where applicable
ScriptWindowsLogins https://youtu.be/pszTHe2PhVQ Scripts all specified Windows logins, with default databases and languages

Performance Tuning Functions and Procedures

Topic Description
AnalyzePerformanceTuningTrace https://youtu.be/Laq7d4pFlQ0 Analyzes a loaded performance tuning trace file in terms of both normalized and unnormalized forms
CapturePerformanceTuningTrace https://youtu.be/Laq7d4pFlQ0 Captures a performance tuning trace file then terminates
DeExecuteSQLString Locates the command and reorganizes parameters from within an sp_executeSQL string
ExtractSQLTemplate https://youtu.be/yX5q00m_uCA Extracts a query template from a SQL command string
LastParameterStartPosition Locates the starting position of the last parameter in an sp_executeSQL string
LoadPerformanceTuningTrace https://youtu.be/Laq7d4pFlQ0 Loads a performance tuning trace file and optionally normalizes the queries in it

Utility and Reference Views

Topic Description
Countries https://youtu.be/5HnBk323Lis View listing all countries
Currencies https://youtu.be/VuKJEtZ44WY View returning common world currencies
CurrenciesByCountry https://youtu.be/VuKJEtZ44WY View listing countries and the currencies they use
FutureReservedWords https://youtu.be/WITnoiWRPsI View returning SQL Server declared future reserved words, and the color they normally appear in SSMS
Languages https://youtu.be/itf_2Zlfuos View returning all the world languages
LoginTypes https://youtu.be/DFo9Yl2M3P0 Maps login types to names and descriptions
ODBCReservedWords https://youtu.be/WITnoiWRPsI View returning SQL Server ODBC reserved words, and the color they normally appear in SSMS
OperatingSystemLocales https://youtu.be/vppwkKyWCwQ View returning locales used by operating systems
OperatingSystemSKUs https://youtu.be/vppwkKyWCwQ View returning SKUs used by operating systems
OperatingSystemVersions https://youtu.be/vppwkKyWCwQ View returning names of operating systems by versions
ReservedWords https://youtu.be/WITnoiWRPsI View returning SQL Server reserved words, and the color they normally appear in SSMS
RSCatalogTypes https://youtu.be/1eSKt2E0rbY Maps reporting services catalog types to names
SQLServerProductVersions https://youtu.be/st9RO_Ir1tc View returning Product Versions for SQL Server
SystemConfigurationOptionDefaults https://youtu.be/PZy2zWH0Nzc View returning SQL Server Configuration Option Default values
SystemDataTypeNames https://youtu.be/WITnoiWRPsI View returning SQL Server system data type names, and the color they normally appear in SSMS
SystemWords https://youtu.be/WITnoiWRPsI View returning SQL Server reserved words, future reserved words, ODBC reserved words, and system data type names
UserTypes https://youtu.be/DFo9Yl2M3P0 Maps user types to names and descriptions