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 […] |
SQL Server 2017 - Development |
Table in sql server 2017 takes alot of time to update/insert few rows - Hello I have a table in sql server 2017 that has around half million records and it is constantly used via website. Select statement are very fast over it or over its views,but update/insert of 1 or 2 rows takes a lot of time sometimes 1 row needs 15 minutes as if table is busy. […] |
Same code but one is faster and another one is slower - Do you know why the query 1 runs for hours as opposed to the query 2 with runs in seconds.? and how do I make query 1 faster? Query 1:SELECT distinct a,b ,c FROM [dbo].[d] WHERE Date > DATEADD(d,-3,GETDATE()) Query 2: SELECT distinct a,b ,c FROM [dbo].[d] WHERE Date > DATEADD(d,-3,GETDATE()) and Date <= DATEADD(d,-2,GETDATE()) […] |
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, […] |
SQL Server 2016 - Administration |
sql server crash - I had sql server 2016 in one of our servers, then I decided to install SSIS AND SSAS for Bi purpose, And I tried to install these two services (SSAS AND SSRS) in another instance. After installing the second Instance, I notices that: I can’t connect to the first instance sql databases (It has been […] |
SQL Server 2016 - Development and T-SQL |
need script that returns all the columns in a table that have data in them - I need a query that will basically generate a select statement that will select all records for only the columns that have data in them . |
Matching backslash in a table's column using R language - Given the following code: CREATE TABLE [dbo].[products] ( [nvarchar](25)) INSERT INTO [dbo].[products] VALUES ('A\BCDEFG') GO EXEC [sys].[sp_execute_external_script] @language=N'R', @script=N' pattern1 = "^[\x20-\x7e]{1,20}$" pattern2 = "[\x22\x27\x2c\x3f\x5c\x60]" outData <- subset(inData, grepl(pattern1, code, perl=TRUE) & !grepl(pattern2, code, perl=TRUE))', @input_data_1 = N'SELECT FROM [dbo].[products]', @input_data_1_name = N'inData', @output_data_1_name = N'outData' WITH RESULT SETS (AS OBJECT [dbo].[products]); GO why is […] |
Administration - SQL Server 2014 |
Linked server gives error - Hi team, I had to update the TNSnames file under: D:\....\11.2.0\client_2(clinet_1) \network\admin, to reflect a new server name of Oracle. After doing this change, the test Linked server connection fails. TNS ping works fine. Telnet to the server name works as well. Do I need to reboot the SQL server ? Error is : TITLE: […] |
SQL exception error - We have a job running multiple times a day from a app server which points towards the database server. The job runs fine most of the time but fails once or twice a day and gives the following error: Exception : System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an […] |
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 |
Efficient way of data comparison between tables - Hi All, I understood there is a table to table SQL Server Table & Data Comparision Tools, but this is for the table in same format & structure. I finding, but unable find a Data Comparison Tools which is for different tables to compare the data. If such a yes, any experience with this? […] |
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 […] |
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 […] |