Skip to main content

Questions tagged [sql-server]

Microsoft SQL Server is a relational database management system (RDBMS). Use this tag for all Microsoft SQL Server editions including Compact, Express, Azure, Fast-track, APS (formerly PDW) and Azure SQL DW. Do not use this tag for other types of DBMS (MySQL, PostgreSQL, Oracle, etc.). Do not use this tag for issues on software and mobile development, unless it is directly related to the database.

0 votes
1 answer
28 views

Is optimistic locking safe from race condition in case of concurrent transactions?

When reading about optimistic locks, I have come across examples which use versioning like below UPDATE table SET column1 = new_value1, version = version + 1 WHERE id = some_id AND version = ...
bornfree's user avatar
  • 2,438
0 votes
0 answers
14 views

Running Keycloak with SQL Server local database

I'm learning Docker and I have a question that is certainly simple, but I haven't found it anywhere yet: I want a Keycloak container to connect to the SQL Server database that is installed locally on ...
Leo's user avatar
  • 1
0 votes
2 answers
47 views

Combine table columns into one unique value (as input for HASHBYTES)

Objective I want to combine the four columns of a row into one value, named COMBINED_VALUE. These strict rules apply: Two rows with the same column values in the same order must produce the same ...
Der U's user avatar
  • 3,314
-3 votes
0 answers
59 views

Unable to join the cte Throwing runtime error [closed]

I was solving a question in LeetCODE and I wrote the following query: WITH TotalCount AS ( SELECT COUNT(*) AS TotalCountOf FROM Register ) SELECT R.contest_id, ROUND((CAST(COUNT(R....
Sarika Ramachandran Nair's user avatar
0 votes
1 answer
35 views

Connect SSMS to Azure SQL Database

I am trying to connect my Azure SQL database to Microsoft SQL Server Management Studio. Getting the error: Connection host has failed to respond Cannot connect to {my server}.database.windows.net. A ...
Aditya Patil's user avatar
-1 votes
0 answers
27 views

SQL Server view snapshot agent status duplicate key error in merge replication mode [closed]

When I run view snapshot agent status I get this error: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.nodes' and the index name '...
rahim's user avatar
  • 142
-3 votes
0 answers
32 views

Check if a table has any records [duplicate]

Considering a situation to check whether a table has any records or not, Is there any difference in the performance or execution speed among the two following queries? If yes, what is the logical ...
Amir Monfared's user avatar
0 votes
0 answers
24 views

Elapsed Time in QEP returned from sys.dm_exec_query_plan_stats is different from the one in Actual Execution Plan returned by SSMS

I am trying to use the LAST_QUERY_PLAN_STATS property to save the QEP Actual of each executed statement in my repository, using DMV sys.dm_exec_query_plan_stats I am able to intercept it and save it ...
AndreaD's user avatar
-2 votes
0 answers
22 views

How to prevent SQL Server from entering the setup stage on every start [closed]

I am running SQL Server inside Docker. Every time I start SQL Server, it runs the setup stage. I tested this manually inside the container: 2024-07-19 21:16:07.41 spid26s SQL Server shutdown due ...
dsl400's user avatar
  • 396
-2 votes
0 answers
53 views

Figure out time stamp format in SQL Server [closed]

I have inherited a project that has a SQL Server database. In one of the tables, an int column is defined and it should represent a date or maybe even a datetime. I have tried different methods of ...
CodeJunkie's user avatar
1 vote
0 answers
19 views

Combine CodeMeter license management with SQL Server Always Encrypted

I would like to activate Always Encrypted into my SQL Server database to protect a few sensible columns and access it from an external application. As per my understanding, I have to: Configure ...
Gabriele Buffolino's user avatar
0 votes
0 answers
26 views

Three types of errors occuring when deploying a SSIS package through Azure DevOps

I have a typical SSIS package which contains many loads from source CSV to destination in on-prem SQL Server, the data flows look like this - Data Flow Outside of data flow its mainly just Logging ...
Mark OD's user avatar
-3 votes
0 answers
22 views

Live/Continuous Database mirroring from an on premises SQL Server to Azure Cloud [closed]

Can the data from the on premises database be mirrored or synced continuously to Azure cloud, for a web app in the cloud to access the data? Tried accessing the on premise database from Azure web app ...
user26436214's user avatar
0 votes
0 answers
32 views

Importing xlsx data from Pandas to SQL Server, receiving string data, right truncation and text column data incomplete

I have an xlsx file that I'm trying to run through Python to edit and then upload to our database. For vendor A, their data comes in through a CSV and I've been able to edit and upload that no issue. ...
Jacob Lindsey's user avatar
-2 votes
1 answer
35 views

Connect PHP and SQL Server using Visual Studio Code. using localhost and xampp as well

Where should I place my PHP file? It's currently in a project folder. I have downloaded the Microsoft SQL Server extension in VSCode but still the undefined problem of couldn't connect the database ...
Ton's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
22368