336,783 questions
1
vote
2
answers
55
views
Error when accessing data, EF seems to create its own column
I have a project that has a database first approach. I have used db-scaffold to create the models and have also created 'custom' models to contain extra info and code.
I have a model VoteQuestion:
...
1
vote
1
answer
67
views
Can C++ ADODB Connections to a SQL Server AG Specify Application Intent Read Only?
We have an SQL AG with read only routing correctly configured and confirmed working via sqlcmd -K readonly --> select @@servername confirms we are directed to a readable replica.
When attempting ...
-3
votes
0
answers
45
views
SQL Server hang or become unresponsive [closed]
Do you have any idea why running this query might cause the SQL Server to hang or become unresponsive?
Is it related to how fn_dblog reads the transaction log, or could it be due to high I/O or log ...
4
votes
2
answers
144
views
How to perform a time-sequenced (temporal) LEFT OUTER JOIN
TL;DR In the book Developing Time-Oriented Database Applications in SQL by Richard T. Snodgrass, section 6.3.1 he demonstrates how to perform a sequenced inner join on a transaction-time state table, ...
0
votes
2
answers
71
views
How to update by the other GROUPed table values effectively?
I have the tables Invoices (with No_ key) and the related InvoiceLines (with [Document No_] key that bounds to their invoices). The subset of invoice numbers is inserted into the table variable (no ...
-5
votes
0
answers
67
views
Having different InMemory table bucket count size for different environments
Different environments have different amount of data and usually different data distribution. You can't use SQLCMD variables in table declarations in SSDT, so you can't use them to control different ...
0
votes
0
answers
43
views
What's the supported non-SSMS way of setting default file data path for new databases for SQL Server 2022 (on windows) [duplicate]
When you run CREATE DATABASE SomeDb the PRIMARY and LOG file goes to some default directory.
Is there a supported/official way of changing this default directory outside of SSMS GUI? Either using SMO ...
-1
votes
1
answer
155
views
How to read a Microsoft SQL Data with Polars
I would like to read a database with Polars and benefit from his speed vs Pandas.
Now I use this function to read db with pandas. So my question is simple how to convert it with polars and get ...
0
votes
0
answers
13
views
SQL Server Log File (ldf) size difference between servers [migrated]
I've recently been involved with a project to migrate a customer's SQL Server environment to a new server. Since the migration, the .ldf file for a particular database on the new server is growing ...
0
votes
1
answer
84
views
How to set up a SQL Server Agent job to run even if it overruns its next start time?
Let's say you have a SQL Server Agent job which has a schedule to run every day at 12 o'clock, and usually takes a few hours to run.
The problem is that sometimes it runs over 24 hours, it misses the ...
-3
votes
0
answers
69
views
SQL Server connection string 2012 vs 2019
I had created a program in VB.NET to connect to SQL Server 2012 using this connection string:
Data Source=myserver;Initial Catalog=mydata;Persist Security Info=True;User ID=sa;Password=mypassword"...
0
votes
1
answer
128
views
SQL query produced by Entity Framework very slow
I have the following query being generated by EF:
DECLARE @__term_0 VARCHAR(7) = 'woodrow'
DECLARE @__p_1 INT = 0
DECLARE @__p_2 INT = 15
SELECT [t].[Id], [t].[City], [t].[Contact], [t].[CreatedBy], [...
-1
votes
0
answers
44
views
Can I use SSM to run command for SQL query execution on SQL Server RDS?
I want to automate a database drop and database restore process and I don't want to save my admin credentials in secret manager. I read somewhere we can use SSM Run commant for this. But SSM Run ...
-1
votes
1
answer
123
views
Azure SQL S0 Tier – Slow Update Performance During Peak IoT Data Processing [closed]
I'm using Azure SQL (Standard S0: 10 DTUs) to store data from various IoT devices.
Each IoT device sends messages to my Azure IoT Hub, which then triggers an Azure Function App. The Function App ...
-5
votes
0
answers
36
views
spring boot web sqlserver interaction [closed]
I have a Spring Boot App which is intended to use SQLServer for data access
i have my jdbc datasource in application properties
the app successfully connects to the database when i run the app as a ...