Laden...
|
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Finding Data Types | |
What is the value of system_type_name returned in the result set from this code? DECLARE @query nvarchar(max) = 'select ''1'' + ''2'' + 4'; EXEC sp_describe_first_result_set @query, null; | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Concatenating Strings If I use the CONCAT() function instead of a plus (+) to combine strings, is there a limit to how many strings I can concatenate together? Answer: Yes, you are limited to 254 strings Explanation: 254 is the limit. Ref: concat() - https://learn.microsoft.com/en-us/sql/t-sql/functions/concat-transact-sql?view=sql-server-ver16 |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2019 - Administration |
64KB and 32KB cluster size for log drives and tempdb - Hi, I was told that sometimes log and tempdb drives benefit from 32KB cluster size as opposed the traditional 64KB. How can I check this theory for a specific system? I guess different database servers have different write patterns. How do I find out what write sizes a particular server uses the most and if […] |
Timeout while trying to add database to availability group - Hello experts, I'm trying to learn what network access is being blocked when I get the timeout error below. It happens after I click Connect in the Add Database to Availability Group wizard. I have sometimes gotten around this by using T-SQL to add the db, but I want to finally understand how to fix […] |
Using the Database Migration Assistant - Getting questionable results. - Hello, Firstly, apologies if I have posted in the wrong spot, I could not find a 'Migration' forum here. Happy to move it elsewhere if need be. I am using the Database Migration Assistant to recommend an Azure SQL Managed Instance SKU for an on-premises SQL Server 2017 instance. I ran the assessment over 3-4 […] |
Windows 11 & sudden SSMS sorting nuisance - When I was still in Windows 10, I'd open up SSMS (version 18) and go to Object Explorer Details, where I would see the folders System Databases and Database Snapshots up at top and all the individual database names listed in alphabetically order (unless I sorted otherwise). Now that I've upgraded to Windows 11, something […] |
SQL Server 2019 - Development |
Why am I getting a "Incorrect syntax near '@tblName' error message? - I'm working on a SQL script to delete all old tables starting with the name of "Old_". I'm testing in my test database, but it raises errors. However, if I use the PRINT statement, everything is fine. I don't get what's wrong. I'm following Microsoft's Learn page on sp_executesql, and as far as I know, […] |
How to calculate potential IO benefits of changes - I work on a multi terabyte warehouse database application which typically ingests between 130 and 180 million rows of data per day and processes into a data mart for them for consumption into a Tableau report. This is an on prem database using a virtual machine with 18 cores and 300 GB allocated to SQL […] |
Lag function on an update not working - I have a table with odds from sportsbook, and I need to populate a gamedate value that is null . The gamedate in question coincides with the even numbered rotation rows of the data, below are samples of what i'm working with Create [dbo].gameresults ( gamedate date null, team varchar(50) null, rotation int null, odds […] |
Reporting Services |
What do I do about OBJ files, when I try to commit to a Git repository? - Today I was trying to store an SSRS project into a Git repository. (The SSRS project was written by a vendor.) I wanted to put it into Git so that if I needed to revert to an older version, I could do that more easily. I was going to use GitHub to store the repo […] |
Powershell |
Checking flag sometimes false\positive result - I have this script checking a SQL table looking for a result of True in a table. 99% of the times it works as designed, but on certain occasions it does not. I check this with a scheduler every 5 minutes. It sometimes produces a result of true in which hasn't been set to that […] |
extract data from all servers and dump it into a table - I have 5 servers in the servers table . The code is not looping through all servers. Its only going to the ABC server 5 times and capturing data from ABC server 5 times. $Servers = Invoke-Sqlcmd -Query "SELECT ServerName FROM dbo.Servers" -ServerInstance "ABC" -Database "DB" foreach ($Server in $Servers) { $ServerName = $Server.ServerName If […] |
Testing |
Test1 - test |
SSDT |
SSIS MSOLEDBSQL: ConnectRetryCount, ConnectRetryInterval - Using SSISDB on server A, we have a parent package that loops through a configuration table and executes several hundred stored procedures on server B. Occasionally one of the processes fails with Failed to acquire connection "". Connection may not be configured correctly, or you may not have the right permissions on this connection. This […] |
Analysis Services |
How to create a Visual Studio project from an SSAS Multidimentional cube? - I was hoping there would be some sort of "import" feature but can't find it... |
Job Postings |
Hiring 15 skilled SQL devs for part-time freelance work. Jobs start @ $40 / hour - Are you a skilled SQL developer? Are you looking to supplement your income with high-paying, fully-remote freelance work? Are you interested in learning more about AI and its impact on the future? Join our talented community of SQL experts supporting the world's leading AI companies, and be competitively compensated for your hard-earned skills and insights. […] |
SQL Server 2022 - Development |
Index Update Reports - Scans/Seeks - SELECT DB_Name() As CurrentDatabase, objects.name AS Table_name, indexes.name AS Index_name, SUM(dm_db_index_usage_stats.user_seeks) as UserSeeks, SUM(dm_db_index_usage_stats.user_scans) as UserScans, SUM(dm_db_index_usage_stats.user_updates) as UserUpdates, GETDATE() as Createdttm FROM sys.dm_db_index_usage_stats INNER JOIN sys.objects ON dm_db_index_usage_stats.OBJECT_ID = objects.OBJECT_ID INNER JOIN sys.indexes ON indexes.index_id = dm_db_index_usage_stats.index_id AND dm_db_index_usage_stats.OBJECT_ID = indexes.OBJECT_ID WHERE dm_db_index_usage_stats.user_lookups = 0 ANDdm_db_index_usage_stats.user_seeks < 1 ANDdm_db_index_usage_stats.user_scans < 1 AND indexes.name IS […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. [email protected] |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...