Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Availability Group with Replication - I have configured availability group for automatic failover with synchronous mode. So that way we can run the business for 24hrs. However, I am planning to configure replication. So when the role changes I want replication to handle itself without any manual intervention. Would that be possible? Please advise? |
Why doesn't the Secondary failover? - Hi, I hope someone can help. I will try to summarise as best as I can. We have four servers in a cluster with an AG set with Database Health Detection. Three servers are on site1 with the fourth on a separate DR site2. We are testing DR by cutting the link between the two […] |
SQL Server 2016 - Administration |
Query store index rebuilds - Recently we experienced a sudden surge in disk I/O every twenty minutes or so. We backup logs every five minutes, and every third or fourth backup would increase dramatically (from 100 MB to 3 GB in size). It happened at 2 AM without any changes being done to the server. I dumped the contents of […] |
SQL Server 2016 - Development and T-SQL |
Query Recommendations - Hi, There is a select query which is running very slow. Select customerAcc_ID, Balance, Additiondate, FROM dbo.fnGet_NAME] (@processDate) -- This function is hitting a very big table and I do see some missing IDX hints, however, apart from IDX's I wanted to find out more on this. Here is my questions, is using […] |
SSIS Import only new values from a CSV without using a staging table - Hello, How can I import a CSV file in SSIS (2016) at the same comparing a value in the destination table if the record is new? The CSV file is a continuous record-appending file. I want to avoid a staging table if possible. Thank you, Vinay |
loading data from staging table to final with validations to data specific - Good Morning, Have a Question, we have a FACETS feed it has about 50 columns in it. it is daily feed it get loads with all fields (Dates, Money, Strings) as varchar(500) to the table called STAGING_FACETS in sql server. so here I need to cleanse the data and loads to final table (PR_FACETS) . in […] |
Administration - SQL Server 2014 |
How to find a user and a spid that holds database in single_user mode? - I am recreating a scenario when somebody or a process set database to single_user and I need in my script to set it to multi_user. So far I tried to: alter database test1 set multi_user with rollback immediate as well as with no_wait, but nothing helped, I get an error: "Changes to the state or […] |
SQL 2012 - General |
How to rewrite sql query after where condition with another query ? - I work on sql server I need to rewrite statement after where statement so how to rewrite I don't understand what is writing after where so can you help me how to write it alternative select top 1 * FROM dbo.GlobalPartNumberPortions Po WITH(NOLOCK) INNER JOIN dbo.GlobalPartNumber GOl WITH(NOLOCK) ON GOl.GlobalPnId = Po.GlobalPnId AND Po.GroupId = […] |
SQL Server 2012 - T-SQL |
How to rewrite sql query after where condition with another query more arranged - I work on sql server I need to rewrite statement after where statement so how to rewrite I don't understand what is writing after where so can you help me how to write it alternative SELECT top 1 * FROM extractreports.dbo.TblTemp T with(nolock) JOIN extractreports.dbo.Tbl_Temp TT with(nolock) ON T.GlobalPnID=TT.GlobalPnID join (Select Max(GPNP.GroupID) GroupID,GPNP.GlobalPnID from dbo.GlobalPartNumberPortions […] |
SQL Server 2019 - Administration |
Joining 3 tables - Hello All, I am new to the SQL world and with work I use SQL studio. I have a question, I want to inner join 3 tables. the table names are Integration.Encounter, Integration.Schedule and Integration.Person. I have selected the specific columns I want and I coded it like this. select top 5* ,e.[Person ID] ,e.[Facility] […] |
How can I tell where my Database encryption keys are kept - Hello, can someone please help me with the following question, thanks in advance I am not a DBA, but am learning Azure One of the exercises was the use Azure Key Vault to store the encryption key (key encryption key) to encrypt the column encryption key, and store this KEK in Azure Key Vault (rather […] |
SQL Server 2019 - Development |
Geocoding in SQL Server - do I need C# for it? - I've been digging around playing with spatial maps in SQL Server. I've read a few articles on geocoding etc, and it looks like it's done under the covers in Excel 2016+ using Bing under the covers. If I want to do it in SQL Server, do I have options besides creating an account on Bing/Google […] |
UDF could not be bound - Hi everyone, I have created a sum UDF and I cannot call it. The variable being called cannot be bound. CREATE FUNCTION UDF_datasummary --Define input variables ( @HS_code VARCHAR(20) ) --Define output table RETURNS @sums TABLE ( Month FLOAT, HS_code VARCHAR(20), HS_Desc VARCHAR(255), [Country] VARCHAR(255), Total_qantity INT, Total_amount DECIMAL(18,2) ) AS BEGIN INSERT INTO @sums […] |
Incorrect syntax near the keyword 'AS' - Hi Everyone. I'm hoping someone can take a look at my code here to see what I am missing. I'm trying to create a sub-query and name its alias, and then include that alias/column in the outer select query. But when I do that I get the error message Msg 156, Level 15, State 1, […] |
In The Enterprise |
Group Managed Service Accounts for SQL Server 2017/2019 - We use group managed service accounts for running the SQL Server 2017/2019 sqlserver.exe processes on Windows Server 2016 in an AD domain. As far as I know this is recommended by Microsoft. This worked well for at least 1 year, but since 4-5 months we have the problem that some of these group managed service […] |