Questions tagged [tempdb]

TempDB is part of MS SQL Server. It's a system database that functions as a storage area for temporary tables, internal objects and row versions.

Filter by
Sorted by
Tagged with
0
votes
2answers
34 views

reapply permissions post sql server restart

In our environment, users were granted read/write/ddladmin permissions on tempdb database (dev/qa/prod). These permissions will be lost when SQL Services restart, as tempdb rebuilds every time. One ...
0
votes
1answer
30 views

Killed SPID on xp_LogInfo not rolling back and growing tempdb [duplicate]

I received a notification that the space on the drive my tempdb sits on was running low, when checking the running process it pointed to a server agent task. I checked the scheduled tasks and we had ...
7
votes
0answers
137 views

2019 Enterprise - NOLOCK without NOLOCK, page latch time-out on tempdb and finally a dump

We have a very strange problem with a new SQL Server 2019 on a 2 new physical machines: Infrastructure: Starting a new installation of SQL Server 2019 Enterprise (15.0.2000.5 / X64 on Windows Server ...
0
votes
1answer
37 views

How can I tell if TempDb is too big?

Let's say that someone wants to follow sage advice and properly setup TempDb and TempDb's log. But let's also say that the chosen sizes are almost certainly too big/aggressive. E.g. pretend we've got ...
4
votes
1answer
326 views

Service broker internal spid hogging tempdb

We've recently decommissioned a rather badly implemented service broker setup after a number of near outages, however while doing my morning checks I've noticed that there are 2 Service Broker ...
1
vote
1answer
175 views

Filestream directory exists for a partition but the corresponding partition does not exist in the database

I am investigating a high memory usage issue of tempdb on a production SQL Server 2017 Enterprise (64-bit) deployment. This is similar to an issue discussed here. The server has two production DBs ...
0
votes
1answer
89 views

Increasing tempdb data files on 2 node Availability Group

I am planning to create additional tempdb files for 2 nodes in a SQL 2012 Availability Group. Unfortunately we do not have Instant File Initialisation turned on so the growth of the tempdb data files ...
0
votes
1answer
144 views

TempDB Log File Growth - questions

Problem: On one of the production boxes, TempDB transaction LOG file grew unexpectedly, filling the drive It was 32 GB but now it is 240 GB Questions: What is the mechanism of TempDB log file usage ? ...
0
votes
1answer
33 views

TempDB Version Store used by DB STARTUP background process

I have two availability group on the same SQL Server 2012 Instance (synchronous commit). Trace flags 1118 and 1117 are both enabled. TempDB has been growing for about two weeks: it starts from 36GB ...
0
votes
0answers
40 views

Use of tempdb for bulk upsert operation

We are using SSIS for ETL purpose. There is a shortcoming in SSIS as it doesn't provide any in built component which will bulk upsert the destination. The alternative to it to use Staging tables which ...
3
votes
3answers
16k views

The connection is broken and recovery is not possible - sql server error

I am having the following sql server error, while creating tempDB files. Any ideas? The connection is broken and recovery is not possible. The client driver attempted to recover the connection ...
1
vote
2answers
62 views

Provisioning SQL Server 2019

I'm provisioning a SQL Server 2019 build and have been allocated a virtual server running Windows Server 2016. It has 4 virtual processors and I have 410Gb of drive space to work with. My build has to ...
2
votes
2answers
111 views

MSSQL TempDb full

I have a problem with my MSSQL cluster. When switching to SQL Server 2016 (from 2014) an error occurs with the tempdb, which is full after a certain time for no apparent reason. Is there a proven way ...
0
votes
1answer
129 views

tempdb not releasing space

I have 1 tempdb mdf file, and 7 ndf files. They all grew to 63 GB, and filled up the 500 GBdrive (the .mdf and .ndf files say 99% free space.). I ran sp_who2 'Active' and there is no active ...
1
vote
1answer
48 views

Azure tempdb filling up while trying to convert a large table to columnstore… how to mitigate?

I have a large reporting table (approx 6B rows) taking up roughly 400GB of storage on an azure sql db. I've been trying to convert it to a columnstore table using the following commands: insert Logs(...
0
votes
0answers
30 views

How do I debug an “Operator used tempDB to spill” warning when statistics appear to be ok

I have a section of a complex query plan where a Sort operator appears directly after an Index Seek and SSMS shows a "Operator used tempDB to spill" warning. It is reported to be taking 70% ...
1
vote
2answers
49 views

Why does TempDB spill happen even though statistics are correct?

I read a great article published by Brent Ozar and came up with some questions related to memory grant. I am unable to address my questions in the comment section of his article, so I thought to get ...
14
votes
4answers
32k views

System disk run out of space when running heavy SQL queries on SQL Server 2012

I'm quite new to SQL Server 2012, I would be grateful if someone can help. I have restored a copy of a huge database to SQL Server 2012 and I tried to run some simple queries against it. I'm trying ...
29
votes
3answers
62k views

How to find the SQL statements that caused tempdb growth?

The tempdb of a server (SQL Server 2008) increases to 500GB+ several times every month. Is it possible to find out which SQL statements caused this problem? The problem is usually not caused by create ...
2
votes
1answer
68 views

Version Store usage and entries in dm_tran_active_snapshot_database_transactions

So I'm trying to understand why are having occasional problems with tempdb filling up with version store entries. I'm closing in on the problem, and am now seeing entries in ...
4
votes
2answers
98 views

is there any point of moving tempdb files into different disk drive if all LUNs are from the same RAID pool?

According to best practices, it is recommended to move all tempdb (not just tempdb) files into different physical disk. I have a virtual server which had originally 4 LUNs from the same RAID 10 pool....
0
votes
1answer
131 views

TempDB file overflow

This is my experience with TempDB. The Algorithm works better when the TempDB File sizes are the same size. We were seeing heavy TempDB contention on a TempDB file that was larger than the others. We ...
0
votes
1answer
46 views

Increase TempDB Files, Shrink VLF's with FCI

I am planning to resize and increase the number of tempDB files and shrink the VLF's on an FCI. In this case, the tempdb files are stored on the network drive, rather than the local disk. I couldn't ...
0
votes
0answers
20 views

Why do tempdb spills still occur even with good row and data size estimates (better than actuals)?

We're seeing tempdb DB spills for some hashing operations. If the estimates are indeed good as shown what would be the next thing(s) to look for? Looking for a generic answer without having to ...
0
votes
0answers
43 views

Why is for some sessions count of deallocated pages in tempdb bigger than allocated?

Why is for some sessions count of deallocated pages in tempdb bigger than allocated? I used query select session_id, user_objects_alloc_page_count, user_objects_dealloc_page_count, ...
1
vote
1answer
47 views

How do you minimize chance of collision between system-named constraints on temp tables?

We have occasionally hit the error “There is already an object named 'PK__#TempTab__0796211ACE71813B' in the database” when some of our procedures attempt to create temp tables with a system-named PK ...
34
votes
2answers
4k views

Is it generally faster to select into a temp table than selecting into an actual table?

I thought I once read somewhere that writing to tempdb is faster than an actual table not in tempdb. Is this true in any capacity? I thought I recall it saying something special about tempdb and ...
12
votes
1answer
6k views

SQL Server TempDB behaviour in large memory environment

Reading over this question reminded me of a question I had a while ago. We have a SQL Server that has 512GB of RAM, the main database is 450 GB. We see quite a lot of action in TempDB (ok, I think ...
5
votes
1answer
386 views

Should we really turn on trace flag 1118 for every SQL instance?

It has been recommended that every SQL instance have TF 1118 turned on What is Paul’s recommendation for using trace flag 1118? Everyone should turn it on, on all instances of SQL Server, from SQL ...
7
votes
2answers
7k views

Should I check for existence of temp tables in Stored Procedures?

Is there any edge case in which it would be recommended to explicitly check for ,drop and create temp tables at the start of a Stored Procedure instead of just creating them? Similarly, is there a ...
6
votes
2answers
14k views

Issues with TempDB mdf file ever increasing

I have a tempdb growth issue. Let me preface everything by giving my tempdb settings. Even with no queries running on the database/server tempdb keeps on increasing in size, at first rapidly and then ...
6
votes
1answer
10k views

Find transactions that are filling up the version store

we have enabled the "READ_COMMITTED_SNAPSHOT" for some of our SQL Server 2005 databases. Now from time to time we see that our TempDB is filling up the harddisk and we suspect the version store to be ...
2
votes
1answer
78 views

High write latency on tempdb datafiles only

I'm experiencing large write latency on our tempdb database, but on no other database. (from sys.dm_io_virtual_file_stats) Tempdb log file latency is also listed as being below 5ms. For comparison: ...
72
votes
4answers
176k views

How to identify which query is filling up the tempdb transaction log?

I would like to know how to identify the exact query or stored proc which is actually filling up the transactional log of TEMPDB database.
3
votes
2answers
83 views

Should tempdb be larger on a secondary replica?

I am working on SQL Server 2012 with Availability Groups. On the secondary replica, the size of the tempdb datafile is roughly double that of the primary. I am struggling to find information on ...
0
votes
1answer
30 views

TempDB Configuration using 8 TempDB Data File

On a production server with 512 GB RAM , 2 Sockets 24 Cores (Total Logical Processors 48), i have configured to have 8 TempDB Data Files ( on Primary) with each 4096 MB growth of 1024 MB and Log File ...
1
vote
0answers
60 views

SQL Server 2017, XEvent: sql_text IS NOT NULL

I'm attempting to use XEvents to find out which queries are causing my templog.ldf file to grow in size. I'm getting events, but I see the sizes of the files haven't changed, and that the sql_text ...
0
votes
2answers
55 views

SQL Server Standard Edition CPU + Tempdb Configuration

I have SQL 2014 sp3 (Standard) With below CPU Details according to 8 CPU we have configured 8 Tempdb datafiles. Based on my configuration could you please suggest what should be the CPU & Tempdb ...
0
votes
1answer
34 views

SQL Server 2016 TempDB physical file size is different than SQL System Catalog And Proportional Fill Algorithm is not working as expected

When I see size of file physically on drive, it is different for one of the tempdb secondary data file when compared to size mentioned in system catalog. What can the reason for it? In tempdb ...
3
votes
1answer
329 views

Suspect (Torn) Pages regarding tempdb?

I have a virtualised SQL Server 2005 (SP3) that reported the following message: Database_Name, Database_Id, File_Id, Event_Type, Event_Type_Desc, Error_Count, Last_Update_Date tempdb, 2, 1, 3, Torn ...
6
votes
5answers
1k views

tempdb growth and shrinking tempdb

I’m a DBA that is fairly new to SQL Server coming over from a UNIX/Informix. I have a question about tempdb growth: From what I can see on regular databases if I start with a database that is 10 GB ...
1
vote
1answer
56 views

65G SQL Server database has 5.5G of data in tempdb when not in use

I have a SQL Server instance with 1 production database (also ReportServer dbs) that is 65G. tempdb is 5.5G (well, actually much bigger but 5.5G is in use) when server is not in use. I believe this ...
0
votes
1answer
223 views

Failed attempt to fetch logical page - tempdb [duplicate]

At least 2 times a week I get an error as the tempdb should be corrupt. Failed attempt to fetch logical page xxxx in database 2. This on all my 8 SQL Servers 2008 R2. The strange thing is that ...
0
votes
1answer
188 views

SQL Server TempDB files 1-> n and write stalls growing

I have been kinda accidentally pushed to starting to manage our DB settings, performance analyzing etc. Also as it's commonly said that TempDB file should be spread into n files based on core numbers ...
2
votes
1answer
112 views

Not able to regulate/auto grow tempdb size

We have a SQL Server 2017 (RTM-CU15) AG group (3 servers, 2 HA synchronous) that has had performance issues for the past two months. During the resolution of an issue yesterday we found that the ...
2
votes
0answers
106 views

Test if I have too many TempDB Files

I know there are ways to test for tempdb contention to see if you need to add more tempdb files, but how can I test (and maybe prove) if I have too many tempdb files? I've inherited a relatively ...
4
votes
1answer
135 views

CONVERT_IMPLICIT when inserting a Geography datatype into a Geography datatype column on Temp Table

@@Version Microsoft SQL Server 2008 R2 (SP3) - 10.50.6220.0 (X64) If I try to insert data into a geography datatype in a temp table I get a CONVERT_IMPLICIT, converting a Geography datatype to a ...
0
votes
4answers
584 views

Can I change tempdb size to a specific value and can I shrink it during our daily working hours on our production database

Can I change tempdb size to a specific value and can I shrink it during our daily working hours on our production database ?. Please tell me if it has bad effect on a production database. My database ...
0
votes
0answers
25 views

How does DBCC CHECKDB use tempdb?

I would like to know the working principle of DBCC regarding the tempdb. I want to know why it uses tempdb for what purpose. I didn't find any advanced article about that so maybe someone can shortly ...
2
votes
2answers
404 views

Cannot connect to my SQL Management studio after moving a tempDB

In quite a bad position here. This afternoon on my tempDB I ran the query: sp_helpfile to locate where my MDF and LOG file were. My MDF was on my C: drive and my LOG file was on a D: drive so I've ...

1
2 3 4 5 6