Questions tagged [tempdb]

138 questions
0
votes
0 answers

SQL Server 2019 - Memory-Optimized TempDB Metadata --->>> Out Of Memory (Error 701)

We have successfully upgraded our server version to SQL Server 2019. One of the expected features that we dreamed about was memory-optimized TempDB metadata and we turned it on, first we decided to check how it would behave on our test environment…
Orlandis
  • 1
  • 1
0
votes
0 answers

Utilizing the temp db (#-tables) in dbt instead of CTEs

We are using dbt in combination with SQL Server 2019 and the usage of CTEs are a huge performance drag for us. The main issue with the CTEs is, that they are deeply nested over several levels. E.g. CTE_L1 is refering to CTE_L2, CTE_L2 is referring…
Chris
  • 124
  • 9
0
votes
1 answer

SQL Server - Shrink DB still large file tempdb_mssql_2

I have a server that is getting full, due to some temp table processing. We found that our tempdb file was at 33.8 GB and there was a another file at 33.8 GB called tempdb_mssql_2 Now then, we ran the following: USE [tempdb] GO DBCC SHRINKFILE…
Mark Johnson
  • 575
  • 4
  • 20
0
votes
1 answer

Warning in execution plan about using tempdb in a Sort node

Checking my execution plan it shows a warning in a Top N Sort step Operator used tempdb to spill data during execution with spill level 1 and 4 spilled thread(s), Sort wrote 4609 pages to and read 4609 pages from tempdb with granted memory 107360KB…
user1589188
  • 5,316
  • 17
  • 67
  • 130
0
votes
1 answer

Problems with TempDb on the SQL Server

I got some problems with my SQL Server. Some external queries write into the Temp db and every 2-3 days it is full and we have to restart the SQL database. I got who is active on it. And also we can check monitor it over grafana. So I get a exact…
0
votes
1 answer

Is there a reason why the Growth value for tempdb must be divided by 128?

I am selecting the name, size, growth, maxsize, and physical_name from sys.master_files and sys.database_files. I've noticed that when I do this the growth value will be reported as 8192MB on both queries. When looking at tempdb in file properties…
Tanner
  • 3
  • 2
0
votes
0 answers

SQL query filling up tempdb

I am running the below query which is failing when it fills up the tempdb (170GB). It fails after around 1 hour. the script below : --Select Query BOM collection retail report Declare @Company Nvarchar(50) ='HMFI' Declare @Product Nvarchar(50)…
0
votes
0 answers

Temp db on Aurora reader

I have dozens of legacy stored procedures that create temporary tables for collecting results(performance improvement). I've created a read replica of my Aurora PostgreSQL and tried to execute this procedure, but it failed, as it doesn't allow…
0
votes
1 answer

SQL Server 2017 Always Encrypted issue when joining on temp table

We are currently implementing Always Encrypted for some columns in our database, but we are hitting a limitation we cannot explain when joining with temporary tables. We looked at Microsoft documentation and looked at many articles, but we cannot…
0
votes
0 answers

MSSQL - templog growing & Property Size is not available for Database (tempdb)

It takes about 3 days for the transaction log (tempdb) to get to the size of a production database (~130 GB). It has come up recently (~2 weeks ago) and there had been no problems up to that point. I'm not the owner of the database nor the author or…
pr0t
  • 21
  • 3
0
votes
0 answers

Tempdb transaction log full

Unable to connect to SQL Server because: 'tempdb transaction log was full due to active transaction'. There was no way to login to SQL Server to troubleshoot. only option was to restart SQL Server. I want to know ow to avoid this issue in…
anu
  • 11
  • 3
0
votes
2 answers

Microsoft SQL Server : check constraint with generated name

In T-SQL, it's normally best to name all constraints you create, including check constraints. alter table mytable with check add constraint myconstraint check (mycol > 0) If you don't provide an explicit name (myconstraint), then the server…
Ed Avis
  • 1,350
  • 17
  • 36
0
votes
1 answer

Azure SQL TempDB Temporary Table owner

In Azure SQL I can query what temp tables currently exist by using the query - select * from tempdb.sys.tables; However, I am not able to find who created these. Surely there must be a simple way to find out who created these temp tables! There are…
TS74
  • 61
  • 3
0
votes
0 answers

Direct access to tempdb

An application vendor representative asked me to grant dbowner access to tempdb for their application login; to be able to create objects in tempdb without "#" or "##" prefixes. I tried to convince him to forget asking for direct tempdb access by…
0
votes
1 answer

why Temporary tables not remove after completed their scope?

Possible Duplicate: Why are temporary tables not removed from tempdb in SQL Server? We have created Temporary tables in a stored procedure and while running the stored procedure the Temparory table is created in the TempDB. In my SP I have…
Brijesh Patel
  • 2,901
  • 15
  • 50
  • 73