Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Editions and supported features in SQL 2017 - I am trying to do some research in terms of keeping cost to see if we can go with standard edition instead of Enterprise edition. Based on my research i found that standard edition has some limitation like 24 cores ,128 GB memory, online index create and rebuild, resumable online index rebuilds, Hot add memory […] |
When updating INT to BIGINT do rows with nulls matter - Table has 30 million rows, 11 GB in size, I need to alter one column from INT into BIGINT. I need to keep downtime to 10 min max. Presently there are some values in that column, mostly zeroes, these values are no longer needed. If I update the column to be all nulls before altering […] |
SQL Server 2017 - Development |
Fill in missing Dates for Shift - Hi, I have two tables DimCalendar and DimPersonShift, I want a SQL query which will fill in the missing dates that are not in the DimPersonShift table. SQL Script to Create Tables DimCalendar and DimPersonShift CREATE TABLE [dbo].[DimCalendar]( [ISOdateKey] [int] NOT NULL, [DateKey] [smalldatetime] NULL, [DayNum] [int] NULL, [WeekDayNum] [int] NULL, [Day] [varchar](9) NULL, […] |
Administration - SQL Server 2014 |
Backup Availability Group Database - I am new to Availability Group, but not new to SQL Server and I want to set up a good FULL and DIFF backup of my SQL Databases Currently we are using the Ola Hallengren SQL Database Backup script\process and I am finding it is not working well for us. I want to create a […] |
SQL 2012 - General |
How to get all parts from temp table in case it return nothing ? - I work on SQL server 2012 I face issue I can't return data not have relation with function create table #TempPC ( PartNumber NVARCHAR(300), CompanyId INT, Status nvarchar(200) ) insert into #TempPC (PartNumber,CompanyId) values ('9C06031A2R43FKHFT',1233345), ('VJ0805AIR5CXAMT',8433324) when make select as below : Select t.PartNumber,t.CompanyName,pc.FamilyName,t.Status FROM #TempPC t cross apply [PC].FN_PartCheck_Test( t.[PartNumber],0,1,1,t.CompanyId) pc Where pc.GroupID>-2 […] |
Write to sparse file error and ndf files - Hi, We have ABC.mdf and ABC2.ndf and a relatively newly created ABC3.ndf We created ABC3.ndf because ABC2.ndf was on a 2TB drive and was running out of diskspace. The drive ABC2.ndf is on is pretty much full now. We are seeing Write a sparse file errors (17053 and 5128) saying there is a lack of […] |
SQL Server 2019 - Administration |
Always on AG - I was planing to configure AG between 3 servers. So Primary and Secondary Replica 1 on the same location and then Secondary Replica 2 on DR location. Primary Replica - Full, Diff and Log backups & Maintenance Jobs etc. Secondary Replica 1 (same location Sync mode for fail over) - Reporting purposes and data transfer(with […] |
SQL Server 2019 - Development |
getdate () brings me a different time than my operating system - Hello, I have SQL Server 2019 installed on a server with windows server 2019, in the operating system the time is 11:10 am but in SQL Server when I give it SELECT GETDATE () it brings 10:10, I don't know what else to check. many of the stored procedures use getdate () and obviously this […] |
Duplicate rows when selecting from multiple Phone numbers - I have a query that is intended to select a single alternate phone number from a record (There can be as many as 10 additional numbers for each client). It works fine if there is 1 default phone number and 1 alternate phone (Defined by default = 1 and 0). If there is more than […] |
Update many records to a date next week based on a Numeric Day Value - I need to run a stored procedure that will update all records date field (meetingDate) to the following week. For Example: DECLARE @myDate DATETIME DECLARE @dayValue int SET @dayValue = 7 /* If any records @dayValue = 7 (Monday) then update meetingDate value to next Mondays Date If any records @dayValue = 8 (Tuesday) then […] |
SQL Server 2008 - General |
getdate () brings me a different time than my operating system - Hello, I have SQL Server 2019 installed on a server with windows server 2019, in the operating system the time is 11:10 am but in SQL Server when I give it SELECT GETDATE () it brings 10:10, I don't know what else to check. many of the stored procedures use getdate () and obviously this […] |
Sum query 12 month in year - Hello guys, i have table like blue area, how to query get result like green area |
Sum query 12 month in year - Hello guys, i have table like blue area, how to query get result like green area |
create trigger on view - Hi, is it possible to create Trigger on View ? Version:Microsoft SQL Server 2008 R2 (SP3) - 10.50.6220.0 (Intel X86) Mar 19 2015 13:34:46 Copyright (c) Microsoft Corporation Express Edition with Advanced Services on Windows NT 6.1 (Build 7601: ) (WOW64) Thank. |
Powershell |
Remove-Item quirks - I am trying to write a script in Powerhsell to run in SQL Agent to maintain a backup archive. We want to keep all backups for a month, then delete them, except for those created on the 1st & 15th of the month to keep for a year. Due to a known issue in Remove-Item, […] |