|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Default Error Logs | |
When I install SQL Server 2017, how many error logs are kept by default? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Printing Dates I have a US English, default SQL Server 2017 instance. I have this code: DECLARE @DATE DATETIME SET @DATE ='2019-01-18 20:23:10' PRINT @DATE What would I expect the output to be? Answer: Sep 1 2019 5:01PM Explanation: This works fine, as the date can be implicitly converted to a string. The formatting changes when this is a string, and becomes the US default, which is the month name, day, year, and 12 hour time. Ref:
|
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
SSMS Login Properties can't change default language - Hello, I have a strange problem with my SSMS 18.2. As you can see in the screenshot the default language is set to arabic, despite the default language is set to english. We checked it from another computer. I can't change it to english either. Regards Marcus |
SQL Server 2017 - Development |
Automate script for SQL Server Database backup - I am writing a script for automating database backup, which is not working properly. Please help me fix this. DECLARE @dateString CHAR(12), @dayStr CHAR(2), @monthStr CHAR(2), @hourStr CHAR(2), @minStr CHAR(2) --month variable IF (SELECT LEN(CAST(MONTH(GETDATE()) AS CHAR(2))))=2 SET @monthSTR=CAST(MONTH(GETDATE()) AS CHAR(2)) ELSE SET @monthSTR= '0' + CAST(MONTH(GETDATE()) AS CHAR(2)) --day variable IF (SELECT LEN(CAST(DAY(GETDATE()) AS CHAR(2))))=2 SET @daySTR=CAST(DAY(GETDATE()) AS CHAR(2)) ELSE SET @daySTR='0' + CAST(DAY(GETDATE()) […] |
SQL Server 2016 - Administration |
How do we determine if Index fill factor is causing query to run slow? - Hi, I'm troubleshooting a slow running stored procedure and want to know how do we determine if Index fill factor is causing query to run slow? |
Log_Reuse_wait_Desc 'AVAILABILITY_REPLICA' - I have a very small DBs (3 GB) but I noticed that the size of the log file grew to be 60 GB. I was going to shrink the log file to be 1 Gb or 2 GB (I know its a bad practice but the log file for this DB doesn't grow this much) […] |
adding a computed column and partition scheme - Never mind, I figured it out, I need to persist the computed column in order for things to partition. Actually, the way I did this was to first add the persisted computed column, then dropped the primary key clustered index and made it into a nonclustered, then create the clustered index on the computed column […] |
memory not getting released to OS - Hi All, Need help here. Why is sql server is not releasing memory to OS even after lowering the max server memory setting from 61GB to 55GB ? Total RAM 64gb on server. This was onboarded 2 days back. max server memory was not set initially and so it utilized all memory and so we […] |
SQL Server 2012 - T-SQL |
Duplicate data - Hi Experts . I have table Temp_decimal_mismatch which has duplicate data . The duplicate data is not start forward to remove . Here the row highlighted in yellow is a duplicate . If you see the same data is present in row 1 but in reverse order. I have to get rid rid of the […] |
Deduplicate records based on more than one field with different field values - I am currently trying to dedupe a customer table based on both the email and phoneno fields. I can identify where they both have duplicates or where each one has duplicates using code similar to the below. SELECT *, DENSE_RANK() OVER (ORDER BY Email) EmailRank FROM Customer WHERE EMail IN ( SELECT Email FROM Customer […] |
SQL Server Newbies |
The log file of my user db is full. Please confirm if below resolves issue - Good morning experts, The log file of my user db is full. Could you please confirm if the below resolves the issue: Take log backup->Change the recovery model from full to simple->shrink the log file->Change the recovery model back to full and take an immediate full backup Please let me know otherwise. |
SQL Server 2008 High Availability |
Will the principal wait for acknowledgement from mirror? - Good Morning Experts, A transaction was sent to mirror database and immediately failover occured. The mode is synchronous .Failover is still in progress. Will the principal wait for acknowledgement from mirror? |
I dont want the snapshot to be created for commands that have already been sent - Good Morning experts, I have a publisher db containing thousands of articles to be sent to subscriber. The publisher db is 2TB. There is lot of latency , thousands of undelivered commands in Replication monitor. Some commands (hundreds of them ) have been successfully sent to subscriber. I want to reinitialize the subscriber to resolve […] |
SSRS 2016 |
Date parameter - Hii everyone I am trying to build a report but the date format in the datasource is dd/mm/YY ,the parameter is the Date ,if i fix the date on the dataset it shows an empty report need help please§ |
Problèmes avec le paramètre Date - Bonjour j'essaie depuis quelque temps d'etablir un rapport sur ssrs mais lorsque je fixe le paramètre Date sur le dataset le rapport obtenu est vide ,je pense avoir un problème au niveau du format j'ai besoin d'aide svp |
SQLServerCentral.com Website Issues |
Publishing article revision updated intro comment date in article forum - I recently revised an article, https://www.sqlservercentral.com/steps/stairway-to-sqlclr-level-2-sample-stored-procedure-and-function , and just noticed that, in the article-specific forum that was created when the article was first published, the intro post (for all articles, "Comments posted to this topic are about the item...") is no longer the first post. It is currently the last post as it's timestamp is when […] |
Drafts of Article Updates showing in original article's "Related content" area - I have an in-progress draft saved for one of my Stairway to SQLCLR articles. I just noticed that at the bottom of the live version of that article, https://www.sqlservercentral.com/steps/stairway-to-sqlclr-level-2-sample-stored-procedure-and-function , in the "Related content" area, it lists the draft version with a link to: https://www.sqlservercentral.com/stairway-to-sqlclr-level-2-sample-stored-procedure-and-function-2 Clicking on that link takes you to an "Ooops, not found" […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |