SQL Server tempdb permanent tables use cases
Are there any use cases for permanent tables in tempdb database ? By permanent I mean not using # or ## but creating a real table in tempdb. I know that restarting the sql service will wipe the tempdb, but would this practice be bad for any other reason?
I'm asking because I have one use case for this, I need a temp table but that will be open for more that a sql connection span.
EDIT: the actual data in the long-living temp table are serialized files, not data based on collation or anything else
I'm troubleshooting a nasty stored procedure and noticed that after running it, and I have closed my session, lots of temp tables are still left in tempdb. They have names like the following: #000E262
I'm new to this DBA thing and I've been tasked with removing duplicates from a couple of tables. I'm working in SQL Server. They all have a field called LAST_UPD that tracks their last update. All the
I make a stress test of the SQL Server 2008 and I want to know what is the data flow to tempdb because of usage of temporary tables and variables. The statistics is also shown in Activity Monitor: Is
I have a situation here. I have two tables: I need a sql query which will print the Col names which are different in two tables. For example, in this case the query should print the result as: The r
I'm getting very poor performance on a stored procedure that does well over a hundred (!) updates to a couple of very small tables and it appears that all the concurrent users are constantly blocking
Is there an expected size of tempDB for a Data Warehouse application. Is 10 gigs excessive? It's hit by frequent large queries. The Data Warehouse itself is 50 gigs. I'm using SQL Server 2000
In a stored procedure, when is #Temptable created in SQL Server 2005? When creating the query execution plan or when executing the stored procedure? if (@x = 1) begin select 1 as Text into #Temptable
I am getting low disk space on production database server with SQL Server 2008 R2. The tempdb size has increased to 51G. It contains static tables, I mean when I look at tables in tempdb it has multip
We're currently using the tempdb to manage our SQL session state, but its size keeps growing out of control. Is there any way to manage or prevent this from happening? We are thinking of setting up a
I am trying to make a textual printout of a hierarchy represented in multiple tables. The tables look like this: create table #par1 ( par1_id int primary key identity, par1_data varchar(8) ) create ta
I am in the process of migrating a SQL Server database to Oracle, where I have to convert SQL Server procedure which uses special tables called INSERTED and DELETED in SQL Server. As per my understan
I am creating a stored procedure in SQL Server 2008 to find student data from first table, health details from second table and attendance details from the third one. I want to join these tables using
I read that JCA is for legacy EIS integration. Is this spec geared towards vendors and not the application developer? I am curious to know of use cases where developers wrote JCA adapters to solve the
I am using SQL Server 2000. I have multiple criterias which i have to use to extract different sets of records from mumtiple table in another table. I am using INSERT INTO T1(A,B) (SELECT E,R FROM T2
In SQL Server 2012, let's have three tables: Foos, Lookup1 and Lookup2 created with the following SQL: CREATE TABLE Foos ( Id int NOT NULL, L1 int NOT NULL, L2 int NOT NULL, Value int NOT NULL, CONSTR
Is it possible to use raw SQL rather than the TABLE construct for creating tables in SQL Alchemy? I would still like to use the rest of SQLAlchemy though, such as the object mapper and session module.
I have 2 SQL Server Tables Invoice and Production. Invoice contains these columns (ID, ItemID, Date, AccountNo, Quantity, Type, Price, Total) and the Production Table contains these columns (ItemID, D
Can I auto- generate tables in sql server just writing the model in VS like in case of first time registration in Mvc 4.0 internet application ?
I have been working now on a project for a period of time. The project has been released and is in production mode. We have now noticed that one of the tables that stores events for products is growi
I am trying to build a select query that will essentially left join two tables and display one column from each table as a single column. the table structure is similar to: table a: id, email table b
I have 2 tables, each one has 'Date','Time' and 'ID' Columns and about 100 extra columns that's represents counters, Also I have a master table that contains 'Date','Time' and 'ID' columns plus it has
I have a full text catalog with two tables in it. tableA has 4 columns (a1, a2, a3, a4) of wich 3 are indexed in the catalog, a2,a3,a4. a1 is the primary key. tableB has 3 columns (b1, b2, b3, b4), tw
I have defined a trigger on a table that is triggered AFTER INSERT, DELETE, UPDATE There are cases where the trigger fires, with both INSERTED AND DELETED tables being empty. How can this be possible?
I got 3 tables: projects, employee and project_employee employee ID (int, PK) Name projects project_id (int, PK) project_name project_employee project_id (int, PK) employee_id (int, PK) What I
This blog http://blogs.msdn.com/sqlserverstorageengine/archive/2009/01/04/managing-tempdb-in-sql-server-tempdb-configuration.aspx states that it is a good idea to Spread TempDB across at least as man
Some of SQL tables have 0 rows and yet have a large about of TotalSpace reserved. These SQL tables are used to temporary hold data (which I am not sure why the vendor did not use temp tables). The onl
SQL Server 2008: I have 3 tables Users, Scores, Lessons Users & Scores are linked by StudentID Scores & Lessons are linked by LessonID I want to display the scores for a StudentID. Here are t
the magic tables of a trigger are emptied themselves or have to emptied explicitly? when we insert data into a table having a trigger on it, then first the data goes to the inserted magic table and th
I have 2 tables with same schema on 2 different databases on the same server with SQL Server 2008 R2. One table gets updated with data more often. Now there is a need to keep these 2 table in sync. Th
On a SQL Server 2000 system, I have a templog.ldf file that seems to grow without bound! But when I check, there are never any open transaction in the tempdb (using DBCC OPENTRAN), nor do I ever use e
Ok so it's possible to create a unique index across tables, basically using a view and a unique index. I have a problem though. Given two (or three) tables. Company - Id - Name Brand - Id - CompanyI
How can I find all columns of a certain type (for example NTEXT) in all tables in a SQL Server database? I am looking for a SQL query.
I have a Sql Server 2008 database I inherited. A number of apps and SSIS packages work off that database. Not too long ago the scope of the database changed and a lot of new tables were added. As a re
what are the main purposes for which temporary tables are used? I want to know the practical and commercial uses of temporary tables in actual softwares working in small and large scale companies.
I need to localize data in tables in a SQL Server 2008 database. Each language will need its own sort order when selecting records. I was told in another thread that creating separate tables for each
I need to take several tables with their data from a SQL Server Express and send them to another computer and create or replace them there in a SQL Server Standard Edition with C#. I have been looking
I've tried googling, but maybe it's the keywords I used, I have not been able to find a straightforward answer. So the question is simple and straight forward. Do CTEs use any space in tempdb or does
How do I group a set of tables or label them together? In our project,each user has two separate tables allocated for them. I need to group all users tables separately. How do I accomplish this? Thank
ColdFusion uses #'s to delineate variables. In SQL Server a table name with # or ## is temp table and a global temp table respectively. How does one use SQL Temp tables in ColdFusion?
Hy , sometimes I had problems with SQL Server because of unknown transactions left opened or a lock table, and I read many suggestion to avoid restarting the server until I found this , and it seems t
I have 2 tables in SQL Server 2005 as follows Table A ActionID (PK,int, not null) ProgressID (uniqueidentifier,not null) ReferID (uniqueidentifier, not null) Field XYZ (varchar(50), not null) Field M
How to create a Linked Server from Sql Server to .dbf tables using Advantage ODBC or OLEDB?
I've got MS Access database with linked tables, whever each table is linked to a table in the same SQL Server database. I have a query inside Access that joins 2 tables (in particular i'm updating a t
I manage an SQL Server 2005 Database and I would like to give read-only access to the necessary tables to a group of 20-30 networked users who are able to use the GUI in MS Access 2007 to write or mod
Let's say I have two databases with identical tables, but one database's tables contains data while the other doesn't. Is there a way in SQL Server to generate a script to fill the empty tables with d
I have 2 tables: table1 id someval ----------- 1 23 2 56 3 76 4 456 5 53 6 67 7 12 8 43 9 99 10 567 11 55 12 6 13 55 14 56 15 1 16 444 17 66 18 89 19 6 table2 id someval ----------- 1 23.3 2 5.6 3 8.7
I have a SQL Server 2000 database and some tables in a database. I want to export them (the structure, definition and indexes) to another database. I don't want to copy the entire database, only some
I am trying to figure out how to replace characters in one table using characters from columns in another table in SQL Server. I think the best way to do this is using a cursor and run the REPLACE sta
How can I retrieve data from several tables in sql server database & show them in hierarchical at treeveiw in windows application, example for what I want to do is that: I have 4 tables in my data
I am looking at new features available in Guava and I have found a page on hashing utilities. The documentation says that For the many uses of hash functions beyond simple hash tables, however, Objec