Skip to main content

Questions tagged [sql-server]

All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag, like sql-server-2016, since it is often relevant to the question.

0 votes
0 answers
14 views

SessionState DB missing appid in table 'ASPStateTempApplications'

We are using session state DB 'ASPState' in order to store the sessions from our application. But after creating the ASPState DB and configuring with the application with the following string, appid ...
Meera K's user avatar
  • 71
0 votes
0 answers
15 views

Tuning advisor ignores old query store queries

I'm using the SQL Server database tuning advisor (DTA) to tune a database using a workload stored in the query store. The query_store_query view records more than 38 thousand events. SELECT * FROM ...
Radim Bača's user avatar
0 votes
3 answers
48 views

How to manage existing transactional replication database table using SQL Server Management Studio

Today, I created a transactional replication database using SQL Server Management Studio and now the data is synchronizing correctly between the publisher and subscriber databases. Now, my situation ...
Mr doubt's user avatar
  • 101
0 votes
2 answers
61 views

Cannot shrink log file

I cannot shrink a log file, for a database that is in Simple recovery model (used to be in Full , and was changed to Simple). I have tried every solution I can find on the internet, even the mighty ...
Greg Bala's user avatar
  • 1,025
2 votes
3 answers
561 views

Why is my Nested Loops join showing inaccurate row estimates in SQL Server?

I have the following execution plan: As you can see, the row estimates for the Clustered Index Scan and Index Seek operators are accurate. However, the Nested Loops join has a significant discrepancy:...
Tuyen Nguyen's user avatar
0 votes
1 answer
26 views

Replicating an Encrypted Database to a Non-Encrypted Target

Using transactional replication, can an encrypted database (TDE encryption) be replicated to a non-encrypted target without issue?
Ross Bush's user avatar
  • 629
0 votes
2 answers
56 views

SQL Server, user's database is not available after boot

We have a kind of strange usage of SQL Server. We develop a client app but due to network issues, each developer is working with his own instance of SQL Server, which by itself is in the container. So ...
White Owl's user avatar
  • 939
0 votes
2 answers
59 views

why sql server is not reusing plan in my adhoc query?

Seems my understanding of query plan is not correct. If I run this query first time and check the query plan cache. I see one plan cached. declare @codes varchar(max)='BHVD7,BHVDE,BHVDF' SELECT ...
jerry xu's user avatar
0 votes
1 answer
22 views

how can I list all views and functions that are replicated?

I have a script to show me the replication articles of a publication: declare @publication_name sysname = 'my_pub' declare @database_name sysname = 'my_db' use [my_db] select ServerName = @@...
Marcello Miorelli's user avatar
0 votes
0 answers
26 views

Snapshot replication taking too long for large database using SQL Server Management Studio

I have a 70 GB loaded SQL database and need to perform snapshot replication. I created the publisher and started the snapshot agent, but it takes very long Even after 5 hours, the process did not ...
Mr doubt's user avatar
  • 101
0 votes
1 answer
59 views

how to get the location of the backup too? you can use multiple columns pivoting or any other way!

I got this great query that shows the latest backup for each existing database. SELECT M.name, [Recovery Model] = M.recovery_model_desc, [State] = M.state_desc, [Last ...
Marcello Miorelli's user avatar
0 votes
0 answers
50 views

Insert data if not exists from default trace SQL server

I am trying to capture DDL changes from default trace. I wanted to schedule it to agent job but the data getting inserted as duplicate. I want to insert only new data changes. Here is sample which I ...
Saran's user avatar
  • 73
0 votes
0 answers
42 views

File *.trc is not a recognizable trace file

I am getting the following alert only for one trace file: File 'xxx.trc' is not a recognizable trace file. I can select from all other trace files using fn_trace_gettable. Is it safe to delete this 0 ...
PTL_SQL's user avatar
  • 375
1 vote
2 answers
57 views

Behavior of New Inserts with SQL Server Partitioning After Default Partition Usage

I have a table with the column PartitionMonth as a partition key. TABLE { TrackingId UNIQUEIDENTIFIER, PartitionMonth INT -- YYYYMM } We initially created partitions manually up until 2021. However,...
Naghaveer R's user avatar
0 votes
1 answer
72 views

Update string after second white space from left in SQl Server

I have this type of value in table column (cron expressions): 0 0 14? * MON * 0 0 12? * FRI * 0 0 121 * ? * 0 0 01 OCT ? 2099 0 10 13? * * * I want to add +1 to third number (in this example: 14, 12, ...
Ivan Jancic's user avatar

15 30 50 per page
1
2 3 4 5
2312