EmanueleMeazzo / tsql.tech-Code-snippets

Useful SQL Server scripts/SPs for DBA or SQL Developers that I use and/or have created
http://tsql.tech
MIT License
93 stars 33 forks source link

Issue with code - help? #2

Open sam0smith opened 1 year ago

sam0smith commented 1 year ago

Hi Emanuele!

I'm having an issue with this code but would really love to use it. After messing with it for a while, I'm not sure how to fix the issue. Any ideas?

githubcomnt

(Also new to github and apologize if this is not the appropriate space for this!)

EmanueleMeazzo commented 1 year ago

Hi Sam,

this is the perfect place! Before we start troubleshooting, which version of SQL Server are you running this on?

sam0smith commented 1 year ago

Awesome!

I am using SQL Server Mangement Studio - v18.12.1 I've included the component info below in case that's helpful:

SQL Server Management Studio 15.0.18424.0 SQL Server Management Objects (SMO) 16.100.47021.0+7eef34a564af48c5b0cf0d617a65fd77f06c3eb1 Microsoft Analysis Services Client Tools 15.0.19750.0 Microsoft Data Access Components (MDAC) 10.0.19041.2251 Microsoft MSXML 3.0 6.0 Microsoft .NET Framework 4.0.30319.42000 Operating System 10.0.19044

EmanueleMeazzo commented 1 year ago

That's the SSMS version, what's needed is the SQL Server version, run this query to find out:

SELECT @@VERSION

sam0smith commented 1 year ago

😃

Microsoft SQL Server 2014 (SP3-GDR) (KB5014165) - 12.0.6169.19 (X64) Apr 21 2022 18:01:27 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)