Loading...
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Dates and Languages | |
The string, listopad, translates to a month name in different languages. If I were to run this code, what values are returned? DECLARE @yourInputDate NVARCHAR(32) = '28 listopad 2018'; SET LANGUAGE Polish; SELECT CONVERT(DATE, @yourInputDate) AS [SL_Polish]; SET LANGUAGE Croatian; SELECT CONVERT(DATE, @yourInputDate) AS [SL_Croatian]; SET LANGUAGE English; | |
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) |
The AG Synchronous Replicas In a SQL Server 2022 Enterprise Edition AG, how many replicas can be configured with synchronous commit mode? Answer: 5 Explanation: Up to 5 of your replicas can run under the synchronous commit mode. Ref: Restrictions for AGs - https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/prereqs-restrictions-recommendations-always-on-availability?view=sql-server-ver16#PrerequisitesForAGs |
Featured Script |
T-SQL Script for Monitoring Database Size in SQL Server hamletshahnazaryan from SQLServerCentral This T-SQL script helps you monitor the size and status of all databases on your SQL Server instance, providing insights into space usage and performance.
|
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 2016 - Administration |
SQL Clustered Resource in online pending for about 3-5 mins before coming online - Hello! SQL Clustered resource used to come online during manual or automatic failover in less than a minute but now it is taking about 3-5 mins. What could be causing it? Thanks in advance. |
SQL Server 2016 - Development and T-SQL |
trying to call powershell from TSQL statement - Hello, trying to call a powershell file I created, locally on the server, but also, made sure since this has an always on cluster, to first check if its PRIMARY, BUT, what i am having trouble with, is using the xp_cmdshell command... when i run the following: EXEC xp_cmdshell 'powershell.exe -File E:\folder\RunToExport.ps1' it gives the […] |
SQL Server 2019 - Administration |
File date from Extended Event .xel files - I know this, but I do not remember it. I have scoured by saved scripts as well a lot of google-fu. I have multiple extended event files. Activity_0_133820397244150000.xel Activity_0_133820364382140000.xel Activity_0_133820332071900000.xel This portion of the file name is a representation of the date and time, correct??? 133820397244150000 133820364382140000 133820332071900000 How can I calculate this???? |
restore db as db_copy. resolve hardcoded references within procedures to db. - So I backup & restore db as db_copy. within both there is a proc that does: update [db]..[column] I need it to say: update [db_copy]..[column] (Simplified, above x 1000) Is there a step in backup / restore to do this? Is there a quick resolution? Is this poor coding in the first place? Thank […] |
PK violation in replication but only one subscriber - We have a publication with three subscribers; it's basically a part list with around 1.2 million rows. The local table is on a SQL Server 2019 instance, and is updated nightly via a MERGE statement from a larger part list. This table and several smaller ones are replicated via Transactional Replication to three different Azure […] |
SQL Server 2019 - Development |
Final SELECT with WHERE based on passing in variable from Dropdown box - Is there a way to base the final select statement based on whether a user chooses, from a report dropdown box, a date range based on e.g.: PaidDate or DateOfService similar to the below (which doesn't work): SELECT CASE WHEN @dateChoice = 'DOS' THEN ( SELECT DISTINCT tp.client_id AS Member_ID ,tp.PaidDate AS Paid_Date ,tp.DOS FROM […] |
AD, powershell and ssis - Hi, i have a requirement that involves visiting multiple folders in AD for active, disabled etc computers. Other attributes might need to be extracted as well including associated users and locations. From what im seeing in AD, at least sometimes the description column here has the user name. And the folder can be the location. […] |
Generate number fields - Hi all, I hope someone can help with advice. What would be the best approach to create an output for the below scenario. If I have a table with an assessment code and description and I would then like to populate every occurence of assesementcode / description with a mark system of say 1 to […] |
do i need a driver for mysql? - hi we'll want to communicate with a mysql server at one of our locations from our sql dw server for warehouse extracts daily. i thought i saw everything from oracle sources to sql sources to oracle's netsuite as a source to native sql drivers etc etc but do not believe i've ever seen a sql […] |
SQL Server 2022 - Administration |
DbDefence - how does work this tool? - How it is implemented? I have installed, tried, it is free for dbs <=30 mb. I have asked their support: MS declared XP's are legacy and do not use them, they will be removed in the future versions. It was written some versions ago. What you will do? But DbDefence support answered: MS wrote but […] |
SSMS gets very messy - At work we have quite a few databases that I'm frequently browsing. This is quickly becoming a real mess when I need to switch between different SSMS'es (I need to start them with different credentials) and different databases. My questions is, do you guys have any hints to make working with lots of databases/tables within […] |
Recovery Takes 10-20 mins with ADR enabled - Hi Experts, I have database about 300GB in size with ADR enabled but after every failover\restart it takes about 10-20 minutes to come online. The database have multiple files and the tables are all partitioned. Can anyone shed some light on this ? CREATE DATABASE [LogsDB] CONTAINMENT = NONE ON PRIMARY ( NAME = […] |
SQL Server 2022 - Development |
Transpose sql table rows into columns - I want to transpose sql table rows to columns. I have written a query for that already but its taking a very long time (around 15 min) as the number of rows in the table is high like 8M+. Is there any other way to write the query to get the same output with improved […] |
Volunteering SQL Server Skills - Can anyone please recommend where one can volunteer SQL Server skills to gain experience in other technologies? For example, for charities or voluntary organisations, to gain experience in using PostgreSQL, MySQL, Azure or other database technologies around SQL Server? How can one find such voluntary organisations or charities that are looking for people to donate […] |
Problem with the dll (version 1.2) of an Extended Stored Procedure with SQL Serv - SQL Server 2022 16.0.4165.4 Windows Server 2022 Datacenter 21H2 20348.2849 Our Extended Stored Procedure works 95% but it occasionally generates overflow errors (BEX64) in the Windows event log. In the Event Viewer we have an Information Event 1001 from Windows Error Reporting (Event name BEX64 and SQLException64). What's strange is that this indicates that there […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Loading...
Loading...