The SCHEMA LOCK permission was denied on the object
Hi,Would like to ask if you already encountered this error message below? In the database I set the Restricted User Access after that I need to test what is effect of restricted user access, I run the...
View ArticleSSIS and SQL server upgrade from 2016 to 2019.
Hello GURU'sThanks for helping me!We have the SSIS server upgrade from 2016 to 2019 which was running in SQL 2016 so we have ran inplace SQL upgrade, along with integration services. We have both V13...
View ArticleQuery with 3 tables and MIN function
I asked this question of Bard and Bing chat, but they gave me conflicting answers. Maybe they are both wrong. So here goes:Write a SQL Server 2019 stored procedure for getting a list of invoices in...
View ArticleUrgent help Require
/* ---------------- */declare @AMT int; set @AMT = 5000/* -------------------- */select ApplicationID,AMT FROM [[DH].[twh].[Responses]where amt = (select convert(int,sum(Overdue_amt)) from...
View ArticleLogins denied due to service account being locked
Hi, Our SQL Server 2016 Service account got locked after 3 failed login attempts, When this happened, all login attempts by any login were denied due to trigger execution. After 30 minutes(account...
View ArticleConcatenate Multiple columns
I would like to concatenate contact1 & 2 and contact 3 & 4. I would like to show only distinct contacts for each person_id. However, there can be duplicate contacts for different person_ids....
View ArticleConverting ACL Script into SQL
Need help converting ACL Scripts into SQL//-------OPEN DDMASTCLASSIFY ON Branch SUBTOTAL CurrentBalance IF Status <> '2' & CurrentBalance >= 0 TO DDMAST_Dep OpenSort on Branch TO...
View ArticleSSMS 19.1.56 can't connect to SQL server on Windows 11
I have Windows 11 22H2 and SSMS 19.1.56 on my new laptop. Sometimes (I've only had the new laptop one week) I can connect to SQL server in SSMS and some days (or part of days) I get "The target...
View ArticleNeed to know my join was correct about or not?
DELETE FROM ms.ProjectCandidate FROM ms.Project p LEFT JOIN ms.ProjectCandidate pc ON p.ProjectId =pc.ProjectId WHERE p.ProjectId = @ProjectId;the abouve statement is correct?
View ArticleNeed to know my join was correct or not
DELETE FROM ms.ProjectCandidate FROM ms.Project p LEFT JOIN ms.ProjectCandidate pc ON p.ProjectId =pc.ProjectId WHERE p.ProjectId = @ProjectId;the abouve statement is correct?
View ArticleColumnstore Index
I have a query with 3 joins that performs a SUM over 1 columnSELECT SUM(ta.Col1) FROM TableA ta INNER JOIN TableB tb ON ta.id = tb.id INNER JOIN TableC ON tb.id = tc.idWhen I created a nonclustered...
View ArticleHow to query for specific servers in CMS
I would like to query only a few specific server not the whole cms .SELECT j.name, js.step_name, js.commandFROM msdb..sysjobs jJOIN msdb..sysjobsteps js on j.job_id = js.job_idWHERE j.name like...
View ArticleCan anyone help me with this?
You have been presented with a database used by a small library. The database consists of four tables: 'book', 'copy', 'lending' and 'borrower'. Primary keys in the tables are underlined, while foreign...
View ArticleHow to create the same domain for two SQL Servers?
Server: CIFE01 and Domain: CII.NETServer: CIFE02 and Domain: CII.NETThe purpose is to use cidata.cii.net for two servers for all configurations related to SQL if one goes down the other takes over.
View ArticleCan anyone help me with this?
You have been presented with a database used by a small library. The database consists of four tables: 'book', 'copy', 'lending' and 'borrower'. Primary keys in the tables are underlined, while foreign...
View Article