143 questions
0
votes
1
answer
106
views
"ADODB.Recordset: Item cannot be found in the collection corresponding to the requested name or ordinal" Error for Existing Column [duplicate]
I'm trying to execute the following SQL Query:
DECLARE @Start DATETIME
SET @Start = DateAdd(Hour, -1,GetDate())
IF OBJECT_ID('tempdb..#logTable') IS NOT NULL
DROP TABLE #logTable
CREATE TABLE #...
3
votes
1
answer
227
views
Why is Query Optimizer Underestimating and Causing Data Spill to tempdb?
I have a very simple query that I am testing by running ad-hoc.
The execution plan indicates that data is spilling into tempdb because of poor estimates.
I have been unable to resolve any of the three ...
0
votes
0
answers
163
views
Old tempdb files visible in sys.master_files block new ndf from creating at instance start
Some time ago I noticed that one of our servers has old tempdb ndf files still in sys.master_files.
Of course sys.databases or sys.database_files are actual.
Problem is that after an instance restart ...
0
votes
1
answer
388
views
Finding usage of Tempdb by user databases
In my SQL Server, I have 9 user databases and I would like to find out which user database is using how much resources in tempdb, which database is using more and which less, and furthermore, I would ...
0
votes
1
answer
413
views
Async SELECT statements causing deadlock on a SQL Server temp table
We have an application making an async database connection in C# that is attempting to run two SELECT statements at the same time. Both statements are referencing the same temp tables but are only ...
1
vote
0
answers
196
views
What hanging transaction in tempdb mean?
I'm trying to troubleshoot what is causing timeouts when querying specific table in production.
I suspected that there are some uncommitted transactions, so I ran following query:
SELECT trans....
1
vote
1
answer
197
views
Can a page be anything other than allocated or deallocated?
The documentation for sp_WhoIsActive states
The most confusing of these columns are those related to tempdb. Each of the columns reports a number of 8 KB pages. The [tempdb_allocations] column is ...
0
votes
0
answers
761
views
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 ...
2
votes
0
answers
762
views
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. ...
0
votes
1
answer
5k
views
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 ...
0
votes
1
answer
397
views
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 ...
0
votes
1
answer
371
views
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 ...
1
vote
0
answers
197
views
Is Exponential Growth for SQL Server TempDB Normal?
I am in the position of "acting" DBA since our previous DBA left. I haven't had any formal training or the like in SQL Server. I've searched on TempDB autogrowth terms and can find a lot of ...
0
votes
1
answer
184
views
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 ...
0
votes
1
answer
287
views
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 ...
0
votes
0
answers
1k
views
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'...
1
vote
0
answers
569
views
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.
...
0
votes
2
answers
2k
views
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 ...
0
votes
1
answer
1k
views
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 ...
0
votes
0
answers
333
views
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 ...
0
votes
1
answer
2k
views
How to add the tempdb data files automatically depending on the number of CPU core count available
If there are less number of data files in the tempdb then we would have noticed that there could be issue in performance and queries will go for pagelatch_up waitType.
And we need to manually add the ...
1
vote
0
answers
560
views
Unusual growth tempdb
My question is the following:
Scope:
I am currently using Microsoft Dynamics Ax 2012 R3 and my database has the following settings in the properties of the tempdb in Microsoft Sql Server 2012.
...
0
votes
1
answer
693
views
Fixed Size TempDB (800Gb), MERGE into very large table failing due to space, is this a limitation of merge?
Thanks for reading, am a bit confused by this, think it is down to the size of TempDB, but unsure why it is happening in this case:
I have a MERGE statement:
DECLARE @LastUpdate DATETIME
SELECT @...
0
votes
0
answers
140
views
Update Synonym Table with values stored in tempdb
I have a perfomance issue regarding the update of Synonym table.
I have two SQL Servers:
Server A (2017 DEV)
Server B (2008 R2 DEV)
and they communicate through linked Server (collation compatible = ...
0
votes
1
answer
442
views
tempdb usage at Azure SQLDW
Can I track or get a report every 30 minutes to sum the tempdb usage by user id for AZureSQlDW?
Any suggestions are highly appreciated
Thanks,
Cherishma.
0
votes
0
answers
471
views
SQL Server - Avoiding tempdb storage issues using cursors
I need to insert a very large number of rows into a table from a query, which puts me at risk of exceeding space on tempdb. I am in need of a solution that can avoid this issue, and am considering the ...
1
vote
0
answers
2k
views
Could not allocate space for object 'dbo.SORT temporary run storage: 142590947360768' in database 'tempdb' because the 'PRIMARY'
Could not allocate space for object 'dbo.SORT temporary run storage: 142590947360768'
in database 'tempdb' because the 'PRIMARY'.....
This error message happened 3 days ago. How can I track down ...
0
votes
2
answers
94
views
Alter ADD tempDB inside SELECT?
How can I alter tempdb inside a select?
I want a single query is that possible?
SELECT cust_ac_no, ord_no, ref_no, net_svc_id, job_type, ord_status, ord_status_date, ord_crt_date
INTO tempdb.....
0
votes
0
answers
206
views
Tempdb. There is no enough space on the disc encountered
Does anyone know what really happened here?
All of the sudden database was not accessible.
How to find transactions that cause tempdb filled up?
Seems like it happened right after SQL profiler ...
0
votes
0
answers
127
views
Jobs working correctly but tempdb not modified
I have some jobs (stored procedures ) running in SQL server.
The jobs are working good every day.
The point is that the database should increase the size every day until next month but since 30/09 ...
0
votes
1
answer
231
views
How to exclude tempdb from sp_MSforeachdb?
Below I have a code to get info about t-log backups for each database in the server. I want to exclude tempdb from this list.
exec sp_MSforeachdb 'SELECT server_name, sysdb.name AS DatabaseName, bkup....
0
votes
0
answers
1k
views
SQL Server TempDB - Will a Hash Match operator always cause tempdb allocations?
I've been investigating high write latency figures in tempdb on a data warehouse server (about 600ms!). As part of that investigation, I've identified a query that is causing significant internal ...
1
vote
2
answers
1k
views
How to find/see tempdb in SQL Server
Should I expect to be able to see tempdb tables in SSMS?
e.g. If I run this code, should I expect to be able to see the table in SSMS?
-- Drop the table if it already exists
IF (SELECT OBJECT_ID(...
2
votes
3
answers
2k
views
Physical tables in TempDB getting deleted automatically
In our solution we are creating some physical tables in "tempDB" for an activity. But recently we are facing an issue where these physical tables are getting deleted automatically. We would like to ...
0
votes
1
answer
7k
views
Sql Server Shrinking temp db mdf and ndf
So my question is that even after the job runs and I'm enforcing the mdf (main tempdb file) to be shrunk to about 10mb or so why is it NOT doing it?
I have tried to run this job after my most heavy ...
-1
votes
1
answer
524
views
SQL Server Masking not working - Does work on Temp DB
When I run the below code on a Temp database it does work, but not when I run it on a normal table. Very weird and not sure what I am missing.
CREATE TABLE #Test (Username VARCHAR(20))
insert into #...
0
votes
0
answers
2k
views
SSRS Report Error Invalid Object Name System.Data.SqlClient.SqlException: Invalid object name 'tempdb.dbo.TEMP_ID_XXXX'
I am facing a weird problem and I would be glad if anyone can help me.
In our company we use SSRS to send daily Reports to the Same Management.
We Have 3 Types of Reports, which of 3 is executed ...
4
votes
2
answers
33k
views
Facing Could not allocate a new page for database 'TEMPDB' because of insufficient disk space in filegroup 'DEFAULT'
Could not allocate a new page for database 'TEMPDB' because of insufficient disk space in filegroup 'DEFAULT'. Create the necessary space by dropping objects in the filegroup, adding additional files ...
0
votes
1
answer
64
views
Linking checkboxes in a form back to a string property of a class in MVC/Razor Pages
I am creating a form for an assignment where when the form is completed the data entered for each applicant is saved to a DB. Each property for the applicants is created in a Applicant class, some are ...
0
votes
0
answers
136
views
TempDB drive Full - Procedure needs much performance?
following situation: We have an azure server with db and the TempDB drive ran full. At this moment we could find a process with much resources need in activity monitor. The process was not killable ...
0
votes
0
answers
1k
views
TempDB running out of space for MERGE query
I am using a MERGE Query that is INSERTING over 800 Million records into a table from another table in the same database (conversion project). We run into this error below when it get's to this ...
0
votes
0
answers
81
views
Both tempdb and database transacton log full
We saw some substantial log growth on both tempdb and one of the user databases. Our database is in Snapshot isolation and we take transaction log backups every 15 minute.
First 'TL log full error ...
0
votes
0
answers
45
views
Access information about temp tables in SQL Server
In SQL Server Management Studio, I have a bunch of temporary tables, they look like they were created by the system:
Can I drop them? How can I get more information about them? For example, what ...
0
votes
0
answers
523
views
sql server tempDB files on RAMDisk AND physical disk
We find, for our application, locating TempDB files on RAMDisk improves performance significantly. But we don't want to allocate more RAM to RAMDisk than necessary. Nor do we want SQL Server to fail ...
0
votes
1
answer
980
views
TempDB with big files - Performance issue
I have a TEMPDB database with 8 files but, they have different sizes which is not recommended, as follow:
TempDB Files
I have a plan to resize to the same size as recommended with 20GB each, the ...
1
vote
1
answer
956
views
While pivoting lots of rows tempDB gets full in SQL server
I have a query which retrieves around 184K rows and stores into Temporary table. Now, In second query I am first retrieving all the data from Temporary table and pivoting it. While pivoting I am ...
0
votes
2
answers
567
views
How To Detect Active User Session by sqlcmd
I'd like to get active user session count before rebooting instance, exclude any background sessions.
Just thinking to use following query but I'm not sure how to exclude select session for tempdb by ...
1
vote
0
answers
36
views
View manual file growth events
My tempdb data file has grown significantly in size and I'd like to get an understanding of who made the change, this is a fairly recent event and there are no autogrowth events in the disk usage ...
0
votes
1
answer
338
views
Memory Spill in dmvs
In sql server 2014, can we find the queries which spilled into tempdb using dmvs ?
0
votes
1
answer
976
views
SQL Update with join involving NVARCHAR(MAX) column balloons TEMPDB
The following query causes the SQL Server 2014 TEMPDB.MDF to grow to 40Gb and takes about an hour to run.
Similar queries for columns that are not NVARCHAR(MAX) take a few minutes.
The table being ...