5

To add a little bit, that check will find any reason that a query is forced to run single threaded: WITH XMLNAMESPACES('http://schemas.microsoft.com/sqlserver/2004/07/showplan' AS p) UPDATE ##BlitzCacheProcs SET is_forced_serial = 1 FROM #query_plan qp WHERE qp.SqlHandle = ##BlitzCacheProcs.SqlHandle AND SPID = @@SPID AND query_plan.exist('/...


3

SQL Server data types & functions can be tricky. Let's start with the ISDATE() function. The docs describe the function fairly concisely: Returns 1 if the expression is a valid date, time, or datetime value; otherwise, 0. Even though the function is ISDATE(), it might be better called ISDATEORTIMEORDATETIME(). I guess the latter name just didn't make ...


3

Yes, this would cause that problem. if nothing stands against it (other services, vms etc) use as values the number of cpus and with hyperthreading the number of all virtual cpus. For more information and recommendation you can see at https://docs.microsoft.com/en-US/sql/database-engine/configure-windows/configure-the-max-degree-of-parallelism-server-...


2

This is the essence of what it means to be a system_versioning temporal table. You cannot control the row start and row end values. If you want the rows to be deleted after 5 days, you'll have to have a job to delete them.


1

Echoing other comments from replies and answers I'd advise against opening up a SQL Server directly to the internet. Setting up a VPN on your network that the other person can connect to is the preferred solution. The steps to prepare SQL Server for a remote connection via VPN or directly are mostly the same so here's how to get your server ready: Before ...


1

Thanks to David Browne, I used procmon and could find the settings are stored in the below regedit section, Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\SQL Server Management Studio\18.0_IsoShell\General MRUListItemCount WindowMenuItemCount Change these values to 1-24


1

You could use Process Monitor https://docs.microsoft.com/en-us/sysinternals/downloads/procmon to discover where SSMS stores these settings.


1

ISDATE() can be a tricky function, and you probably are better off using the explicit TRY_CONVERT() function for testing if a value is properly formatted as a date. My guess is that example value you specified is being treated as a date with time which is why ISDATE() returns true, similar to the issue in this post.


1

You could try along: ;with Occupancy as ( select p.PackageId, p.Guests, p.Rooms, r.RoomID, case when r.RoomId < p.Guests - p.Rooms + 1 then 2 else 1 end as GuestsInRoom, case when r.RoomId < p.Guests - p.Rooms + 1 then 2 when r.RoomId > p.Guests then 0 else 1 end as GuestsInRoomWithSparesAndMissing from Package p cross ...


1

Based on the execution plans you provided, it appears that your table doesn't have a clustered index of any sorts, as noticeable by the RID Lookup operation. As a result, for the SELECT query, my guess is the SQL Engine is thinking using any available index to scan in conjunction with a RID Lookup would be the most performant operation for locating the data. ...


1

Reference: log_shipping_monitor_secondary (Transact-SQL) sp_help_log_shipping_monitor (Transact-SQL) Monitor Transaction Log shipping using T-SQL and SSMS by Jignesh Raiyani View the Log Shipping Report (SQL Server Management Studio) Using TSQL get details of last restored transaction log Backup (Subscriber Side): SELECT b.type, b.first_lsn, b.last_lsn, b....


Only top voted, non community-wiki answers of a minimum length are eligible