SQL Server 2022 is a release name of the Microsoft SQL Server 16.0 released on November 16, 2022. Use this tag only for questions about SQL Server 2022 specific questions. For generic questions about SQL, T-SQL, or Microsoft SQL Server, please use tags [sql], [tsql], and [sql-server] instead.
Questions tagged [sql-server-2022]
60 questions
0
votes
0 answers
Restore a database takes too much time with MSSQL 2022 and MS Server 2022
I use a MSSQL 2022 Server with a MS Server 2022.
When I Restore the database it need much time.
I used the following query
RESTORE DATABASE [DBName]
FROM DISK = '[DBPath]'
WITH FILE = 1,
NOUNLOAD,
REPLACE,
MAXTRANSFERSIZE = 4194304,
STATS =…
0
votes
0 answers
How to properly add an alias in SQL Server Configuration Manager for Local Server
The application in the configuration has the given name (localdb)/MyProj. I do not want to change the application code to connect to the server, so for this purpose I wanted to use the aliasing functionality available in SQL Server Configuration…

A510
- 298
- 1
- 4
- 9
0
votes
1 answer
Polybase CETAS to Azure blob storage
I'm trying to write data to azure blob storage from a SQL 2022 VM, using polybase.
I'm using managed identity for authentication with blob storage, as the VM is in a different VNET to the storage, this is the only way to allow the traffic through…

Neil P
- 2,920
- 5
- 33
- 64
0
votes
2 answers
Last 12 months - With only year and monthID
Year
MonthID
Value
2023
3
50
2023
1
80
2022
12
100
2022
9
80
2022
7
60
2022
6
80
2022
5
80
2022
2
80
2021
12
80
2021
8
80
2021
4
80
2020
4
80
2020
2
80
Using SQL Server 2022,I need to fetch Dynamic last 12 months…

user2545157
- 111
- 1
- 8
0
votes
0 answers
Unable to Import data into SQL Server 2022
I just downloaded SQL Server 2022. I tried importing data into it, but cannot access the import/export data option as they both appear offline.
This error was displayed:
This feature is unavailable in this version or the database does not exist
I…

Amadi Jessica
- 9
- 1
0
votes
0 answers
Import and Export Wizard errors with SQL Server 2022
I just installed SQL Server 2022 and doing some testing and found that I cannot export any tables using the Import and Export Wizard. Went online and saw one of the CU updates fixed other known issues with the wizard and even through they were not…
0
votes
0 answers
How can I connect to SQLServer Container locally?
if I
docker run -d --name sql-server2 -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Password" -p 1434:1433 mcr.microsoft.com/mssql/server
I don't get any errors, but I can't connect to SQLServer
I have tried:
telnet [IP ADDRESS] [PORT and it times out
i have…

Robert Green MBA
- 1,834
- 1
- 22
- 45
0
votes
1 answer
Can not access my SQL Instance after contained AG dropped
Error message appears when I try to login to my instance. This happened after I have stopped contained AG in the middle of the configuration. Than went and stupidly deleted my AG with databases and backups.
Now when the always on high availibity is…

Mars
- 3
- 1
0
votes
1 answer
I keep getting Named Pipes Provider, error: 40 when I try to make connection between SQL Server and C# ASP.NET MVC project
In appsettings.json file, I have this connection string:
"ConnectionStrings": {
"erasmus": "Data Source=VIPER\\DBSERVER;Initial Catalog=erasmus;Integrated Security=True;"
}
VIPER is my computer's name and DBSERVER is my database server's name.…

ofaydn
- 23
- 1
- 3
0
votes
0 answers
Error when trying to install SQL Server 2022 Express Edition
I have been trying to install SQL Server 2022 Express Edition on my machine but I always get the same error which in summary mentions the following: "The account that is running SQL Server Setup does not have one or all the following rights: the…

Francisco Javier Espinosa L
- 167
- 1
- 1
- 7
0
votes
1 answer
Sql server 2022 transaction performance
Investigating significant decrease of my app performance after database migration from Microsoft Sql Server 2019 (15.0.2095.3) to Microsoft Sql Server 2022 (16.0.1000.6). Database is on new machine which is 5y newer, with all benchmarks much…

watbywbarif
- 6,487
- 8
- 50
- 64
0
votes
0 answers
Entity Framework 6 and SQL Server 2022 can't connect
I have a trivial console app and I can't connect my DBContext (Entity Framework 6.0.0) to the SQL Server 2022 database.
public class TestContext : DbContext
{
public TestContext(string connectionString) :base(connectionString)
{
}
…

Padzonk
- 161
- 2
- 7
0
votes
2 answers
Select random rows till the sum of column reaches the target in sql server
I need the random rows to be displayed till the target reaches
it should reach the target if there is any possible combination is there.
Id price
1 20
2 30
3 40
4 15
5 10
.......200+ rows
If the target is 30…

VIJI D
- 1
- 1
0
votes
1 answer
SQL OPENJSON Array in Objects
I have a table with the following structure/rows:
ID
OptionName
OptionValue
0
Gender
Male
1
Gender
Female
I want to query the database and return the following JSON:
[{
"OptionName":"Gender",
"Values":[
"Male",
…

Leonvb
- 77
- 6
0
votes
0 answers
Can Master also be configured as memory-optimized?
I am currently discovering the new SQL Server 2022 features and found this message in the error log
cleanup of stale db entries skipped because master db is not memory optimized
At first I thought this message was due to a non-memory-optimized…

Wilfred van Dijk
- 89
- 4