Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
SQLServer Agent not sending dbmail on job completion - Hi Everyone! I have a problem with a SQL Server 2017 with dbmail. I have the attached script and when I run it manually it works ok and sends the mail, and it also registers the activity on sysmail_event_log. But when I run it with a job, the step works fine but no mail is […] |
SQL Server 2017 - Development |
How to check if NextDay is Holiday (exclude Saturday and Sunday)? - Hi: We maintain a calendar table with these columns. We have a process which runs daily and one of step in that is to take different action if the next day (Monday/Tuesday/Wednesday/Thursday/Friday) is holiday. If it is not a holiday then no action is required. create table #Calendar (CalendarDate date, DayOfWeek int, BusinessDayFlag bit, NextBusinessDay […] |
Query tuning help. - Hi, I've attached plan for this query. This query returns around 70M rows. I see the most expensive operator is at clustered index scan Dim_Invoice. There is a filter on inovoice date column from factinvoice line table. Will declaring non clustered index on invoice date on factinvoiceline speed up the query? Currently this query takes […] |
SQL Server 2016 - Administration |
Report Server Load balanced issue with one server while accessing https: - We have 2 servers which are load balanced, when reporting service is stopped on server1, https URL is still accessible. But, when service on server 2 is stopped and try to access the URL ,we are getting the error message" cannot connect securely on this page, this might be because the sites uses outdated TLS […] |
Function Code - Hi, I have a fn with below code I want to understand the highlighted line. Not sure what is FN doing apart from return the value in DATETIME format. CREATE FUNCTION DBO.TFNGETDATEONLY ( @InDate DATETIME) RETURNS DATETIME BEGIN RETURN CAST(CONVERT(VARCHAR(10), @InDate, 101) AS DATETIME) -- can you please explain what this line is doing and […] |
Development - SQL Server 2014 |
Stored Procedure Performance Woes... How to get around CURSORS for html gen. - Hi everyone, Working with a stored procedure that is used in an application of ours. This procedure takes an integer as a parameter and in the end, returns what is a long line of HTML that has many many columns and many rows. This HTML is very dynamic and the data that is dealt with […] |
Where do I start from ? - Following with a user complain about SQL timeout I bumped into one issue with a view. I ran the Object Execution Statistics report and saw that one particular SP, which querying a view containing about 3 tables and 12 views, is coming up with high numbers. I am not a dba specialist and would like […] |
SQL 2012 - General |
Always On - tips for running large transactions - Hi all, I wanted to get a second opinion on something, this weekend I need to do a deployment to 2 databases which are part of an always on availability group. The deployments are going to cause a table rebuild of some tables, the largest of which is 61GB So I know that the work […] |
SQL Server 2012 - T-SQL |
multipoint to line geometry - Hi, Attached, I exported a CSV file from a multipoint record from sql server database. select Shape, Shape.ToString(),id from Table_x id is the unique id of the multipoint record GEOMETRYCOLLECTION (MULTIPOINT ((45.7500915527344 10.0216674804688 0 128), (45.750244140625 10.0218505859375 0 128), (45.7503967285156 10.0220336914063 0 129), (45.7505493164063 10.0221862792969 0 129), (45.7507019042969 10.0223388671875 0 130), (45.7508544921875 10.0225219726563 0 130), […] |
SQL Server 2019 - Administration |
Polybase and HA - I am planning for HA environment and we are using Polybase and would like to use the PolyBase scale-out groups and would like to get some thoughts how that would work with DR. Any advise? Thanks in Advance! |
SQL Server 2019 - Development |
Ignore the entire record if a matching record is found - Hello, Kindly guide me with the following code in T-SQL. I need to only extract those KeyId where the applicationname = 'Flower' does not exist. So Flower is present in keyId = 100, 101, so in the output I should not have 100 and 101. Just need to display 102. |
SQL query error help - Hi Guys, I have a table, around 320 fields. I am trying to use a simple Insert statement. Insert into a table (List all fields) Select all fields One of the fields from 320 is giving me "Truncation error" What is the best way to pinpoint which field has an issue. Any advice would be […] |
SQL Server 2008 - General |
Encrypted column copy - I am using SQL Server 2008 R2. I have encrypted some of the columns in the table using "EncryptByPassPhrase" method. How to copy the encrypted table to other database or server. I tried to copy table using Export and import wizard. But encrypted columns in the copied table is blank. How to export/import encrypted tables […] |
SQL Azure - Administration |
Any guides for sizing Azure managed instances. - Hi All, Has anyone got any tips for sizing a move from VM running sql instances from our current IaaS to Azure managed instance? Primary areas that we are concerned about are disk performance on the Azure side. Guess the primary question we have is do we need to go with Business Critical or General […] |
Integration Services |
Using SSIS packages build in VS2010 when migrating SQL server from 2008 to 2016 - With eof of Windows2008R2, lots of our customers are planning new server setups, usually employing SQL server 2016 instances on new local servers. We have complex SSIS solutions combined with SSAS/SSRS originally developed with VS2010 + SQL server 2008. A couple of customers we migrated upgrading the solution to VS2015. This caused massive problems mainly […] |