minimum right to run this script - Hello everyone I will need to run this query on all my databasesDECLARE @t_spaceused TABLE ( DatabaseName SYSNAME, DatabaseNameLogic VARCHAR(255), DatabaseNamePhysical VARCHAR(255), TypeDesc...
Availibity group and windows cluster - We are planning to install a SQL server 2017 standard. But in near future we probably will create another instance...
SSDT 2017/2015 Installation failure on Windows 10 - Hi guys, I've exhausted my ideas on this one, and no amount of Googling seems to add the matter. I'm having...
SQL Server Database Table Size Limit - Hi, I have go through the limitations of SQL Server on the official documents but please let me know a table...
Generate a unique number for a combination - How do you generate unique number based on a Loannumber , Date columns Example Declare @loannumber Int = 1234565 ,@date Date = '12-01-2017' Declare @test...
Adding new server to AG fails, log file errors - the log in this backup set...which is too recent to apply to the database?! - Ok, I am at a lost to understand this. I am trying to add a new server to an AG. 1. The new...
Different plan on secondary vs Primary - I have found an issue where a query plan on the secondary replica is much different than the primary? Results...
Script to Copy SSRS Content between Report Servers - Any one know where can I download the script for copying SSRS reports to another server. And does it still work...
Trigger woes - Hi all We've got an application that inserts information into an SQL table (table A). The trigger on table A then either...
Backing up to UNC path - I'd like to backup my databases to a UNC path. IE - \\servername\share1\. I'm a bit confused about the configuration, does the...
Cant stop sql server - I couldn't add databases, so I attempted to give myself the privilege. It wouldn't let me. So I went to...
SQL Server agent job not working - Hi All I am using Windows 2012 and SQL Server 2012. I am trying to execute a job in SQL...
SP_UPDATESTATS vs UPDATE STATISTICS - There is a daily sp_update stats (on db which is 4TB) that is causing high CPU. To reduce the CPU,...
How would you parse 000.024.000 into 24H? - My table holds values like 000.004.000, 000.02.000, 000.024.000. What is the best/easiest way to get 4H, 2H, or 24H respectively?
Weeding through duplicates - Our database has a lot of duplicate records (one person with more than one record). I'd like to write a...
Pivot interview questions - Hi Everyone, I attended a interview in top company last week . They asked me to write a query based on following scenarios [code...
Anomaly/Question: SQL Server 2008 R2: Maintenace Plan Full backups no longer compressed. (Started happening on it's own without reason) - Today one of our production SQL Servers started behaving strangely. The daily full backup job which runs a "Maintenance Plan" task...
automate scripting of server level objects (linked servers, jobs, logins)... but linked servers in particular - As part of a DR enhancement, I'd like to have a SQL Agent job that runs daily and writes out...
HTML using XML PATH - Hi, I am generating the HTML using the XML PATH query, which is happening using the below mentioned code, the only...
Is it possible to get permissions of attached database files via powershell? - I had a problem recently where the permissions on a database file were wrong and I wanted an automated way...