Official Documents and Bibliographic Databases
- Official Document System (ODS) UN documentation, daily journal and daily list of documents.
- UN Digital LibraryExplore documents, votes, speeches, public domain publications and more!
- UNBIS Thesaurus Terminology used in subject analysis of documents and other materials relevant to UN programmes and activities.
- UN ResourcesExtensive A-Z list of online resources from around the UN system
- UN Information System on the Question of Palestine (UNISPAL)
Materials on the question of Palestine and other issues related to the Middle East situation - Bibliographic Database of the Economic Commission for Latin America and the Caribbean (ECLAC) Bibliographic records of the ECLAC library.
Treaties, Declarations and Legislative Sources
- UN Treaty Collection Status and text of multilateral treaties deposited with the UN Secretary-General and those formerly deposited with the League of Nations. Bilateral and multilateral treaties.
- Maritime Space: Legislation and Treaties National legislation, treaties on the delimitation of maritime boundaries and other relevant information.
- 1540 Committee Legislative Database National implementation of the Security Council resolution 1540 (2004) to refrain from supporting non-State actors from developing, acquiring, manufacturing, possessing, transporting, transferring or using nuclear, chemical or biological weapons and their delivery systems.
UN Members
In 1977, a rag-tag crew of South Bronx teenagers are nothings and nobodies with no one to shelter them except each other. The series is a mythic saga of how New York at the brink of bankruptcy gave birth to hip-hop, punk and disco, told through the lives and music of the South Bronx kids who changed the city—and the world—forever. Official Documents and Bibliographic Databases Official Document System (ODS) UN documentation, daily journal and daily list of documents. UN Digital LibraryExplore documents, votes, speeches. Database, any collection of data, or information, that is specially organized for rapid search and retrieval by a computer. Databases are structured to facilitate the storage, retrieval, modification, and deletion of data in conjunction with various data-processing operations. The Grand Comics Database (GCD) is a nonprofit, internet-based organization of international volunteers dedicated to building an open database covering all printed comics throughout the world. Give our search a try, take a look at the menu to the left to see how you can help us improve the site, or use my.comics.org to track and manage your comic collection.
- UN Member States 193 Member States, dates of their admission, Permanent Missions in New York and statistical info.
- Membership of the Security Council Security Council membership since 1946, by year, country and regional groups.
Terminology
- UN Multilingual Terminology Database (UNTERM) Nomenclature, technical or specialized terms and common phrases in all six UN official languages.
Multimedia
- Webcast Live webcast and archived videos of UN meetings and events since 2001.
- UNifeed Broadcast-quality videos from throughout the UN system.
- UN in Action Television series, reports on the work of the UN and its agencies around the world.
- UN Photo Collection dating back to the mid-1940s chronicling the history of the Organization and its work.
- UN Audio Hub Daily news and weekly programmes, interviews as well as audio materials from meetings and events.
- UN Publications Catalogue of publications in many languages in print, electronic and multimedia formats.
- UN iLibrary Access to publications, journals, reports, and other series covering a wide range of topics
Civil Society
- Integrated Civil Society Organizations System List of civil society organizations and online registration.
Human Rights Issues
- Documents of Charter-Based Bodies Documents on human rights issues arranged by Charter-based bodies.
Humanitarian Issues
- Refworld Reports and documents relating to refugees.
- ReliefWeb Global hub on humanitarian emergencies and disasters.
Non-governmental Organizations (NGOs)
Statistical Data
- Statistical Database of the Economic Commission for Europe Comparable data for Europe, North America and Central Asia.
- Social Indicators Follow-up and monitoring implementation of major United Nations conferences.
- Millennium Development Goals Indicators Official data, definitions, methodologies and sources for indicators to measure progress towards the MDGs.
- UN Commodity Trade Statistics Database (Comtrade) International trade statistics by commodities and partner countries.
- UNdata Statistical resources of the UN System.
- UN Population International, regional and national population information from UN sources.
Conferences and Events
Archives
Databases
Applies to:SQL Server (all supported versions) Azure SQL Database
The
tempdb
system database is a global resource that's available to all users connected to the instance of SQL Server or connected to Azure SQL Database. tempdb
holds:- Temporary user objects that are explicitly created. They include global or local temporary tables and indexes, temporary stored procedures, table variables, tables returned in table-valued functions, and cursors.
- Internal objects that the database engine creates. They include:
- Work tables to store intermediate results for spools, cursors, sorts, and temporary large object (LOB) storage.
- Work files for hash join or hash aggregate operations.
- Intermediate sort results for operations such as creating or rebuilding indexes (if
SORT_IN_TEMPDB
is specified), or certainGROUP BY
,ORDER BY
, orUNION
queries.
Each internal object uses a minimum of nine pages: an IAM page and an eight-page extent. For more information about pages and extents, see Pages and extents.ImportantAzure SQL Database single databases and elastic pools support global temporary tables and global temporary stored procedures that are stored intempdb
and are scoped to the database level.Global temporary tables and global temporary stored procedures are shared for all users' sessions within the same SQL database. User sessions from other SQL databases can't access global temporary tables. For more information, see Database scoped global temporary tables (Azure SQL Database). Azure SQL Managed Instance supports the same temporary objects as does SQL Server.For Azure SQL Database single databases and elastic pools, only the master database andtempdb
database apply. For more information, see What is an Azure SQL Database server?. For a discussion oftempdb
in the context of Azure SQL Database single databases and elastic pools, see tempdb database in Azure SQL Database single databases and elastic pools.For Azure SQL Managed Instance, all system databases apply. - Version stores, which are collections of data pages that hold the data rows that support features for row versioning. There are two types: a common version store and an online-index-build version store. The version stores contain:
- Row versions that are generated by data modification transactions in a database that uses
READ COMMITTED
through row versioning isolation or snapshot isolation transactions. - Row versions that are generated by data modification transactions for features, such as online index operations, Multiple Active Result Sets (MARS), and
AFTER
triggers.
- Row versions that are generated by data modification transactions in a database that uses
Operations within
tempdb
are minimally logged so that transactions can be rolled back. tempdb
is re-created every time SQL Server is started so that the system always starts with a clean copy of the database. Temporary tables and stored procedures are dropped automatically on disconnect, and no connections are active when the system is shut down.tempdb
never has anything to be saved from one session of SQL Server to another. Backup and restore operations are not allowed on tempdb
.Physical properties of tempdb in SQL Server
The following table lists the initial configuration values of the
tempdb
data and log files in SQL Server. The values are based on the defaults for the model
database. The sizes of these files might vary slightly for different editions of SQL Server.File | Logical name | Physical name | Initial size | File growth |
---|---|---|---|---|
Primary data | tempdev | tempdb.mdf | 8 megabytes | Autogrow by 64 MB until the disk is full |
Secondary data files | temp# | tempdb_mssql_#.ndf | 8 megabytes | Autogrow by 64 MB until the disk is full |
Log | templog | templog.ldf | 8 megabytes | Autogrow by 64 megabytes to a maximum of 2 terabytes |
The number of secondary data files depends on the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to eight, use the same number of data files as logical processors. If the number of logical processors is greater than eight, use eight data files. Then if contention continues, increase the number of data files by multiples of four until the contention decreases to acceptable levels, or make changes to the workload/code.
Note
The default value for the number of data files is based on the general guidelines in KB 2154845.
Note
To check current size and growth parameters for
tempdb
, query view tempdb.sys.database_files
.Moving the tempdb data and log files in SQL Server
To move the
tempdb
data and log files, see Move system databases.Database options for tempdb in SQL Server
The following table lists the default value for each database option in the
tempdb
database and whether the option can be modified. To view the current settings for these options, use the sys.databases catalog view.Database option | Default value | Can be modified |
---|---|---|
ALLOW_SNAPSHOT_ISOLATION | OFF | Yes |
ANSI_NULL_DEFAULT | OFF | Yes |
ANSI_NULLS | OFF | Yes |
ANSI_PADDING | OFF | Yes |
ANSI_WARNINGS | OFF | Yes |
ARITHABORT | OFF | Yes |
AUTO_CLOSE | OFF | No |
AUTO_CREATE_STATISTICS | ON | Yes |
AUTO_SHRINK | OFF | No |
AUTO_UPDATE_STATISTICS | ON | Yes |
AUTO_UPDATE_STATISTICS_ASYNC | OFF | Yes |
CHANGE_TRACKING | OFF | No |
CONCAT_NULL_YIELDS_NULL | OFF | Yes |
CURSOR_CLOSE_ON_COMMIT | OFF | Yes |
CURSOR_DEFAULT | GLOBAL | Yes |
Database Availability Options | ONLINE MULTI_USER READ_WRITE | No No No |
DATE_CORRELATION_OPTIMIZATION | OFF | Yes |
DB_CHAINING | ON | No |
ENCRYPTION | OFF | No |
MIXED_PAGE_ALLOCATION | OFF | No |
NUMERIC_ROUNDABORT | OFF | Yes |
PAGE_VERIFY | CHECKSUM for new installations of SQL Server NONE for upgrades of SQL Server | Yes |
PARAMETERIZATION | SIMPLE | Yes |
QUOTED_IDENTIFIER | OFF | Yes |
READ_COMMITTED_SNAPSHOT | OFF | No |
RECOVERY | SIMPLE | No |
RECURSIVE_TRIGGERS | OFF | Yes |
Service Broker Options | ENABLE_BROKER | Yes |
TRUSTWORTHY | OFF | No |
For a description of these database options, see ALTER DATABASE SET Options (Transact-SQL).
tempdb database in SQL Database
tempdb sizes for DTU-based service tiers
Service-level objective | Maximum tempdb data file size (GB) | Number of tempdb data files | Maximum tempdb data size (GB) |
---|---|---|---|
Basic | 13.9 | 1 | 13.9 |
S0 | 13.9 | 1 | 13.9 |
S1 | 13.9 | 1 | 13.9 |
S2 | 13.9 | 1 | 13.9 |
S3 | 32 | 1 | 32 |
S4 | 32 | 2 | 64 |
S6 | 32 | 3 | 96 |
S7 | 32 | 6 | 192 |
S9 | 32 | 12 | 384 |
S12 | 32 | 12 | 384 |
P1 | 13.9 | 12 | 166.7 |
P2 | 13.9 | 12 | 166.7 |
P4 | 13.9 | 12 | 166.7 |
P6 | 13.9 | 12 | 166.7 |
P11 | 13.9 | 12 | 166.7 |
P15 | 13.9 | 12 | 166.7 |
Basic Elastic Pools (all DTU configurations) | 13.9 | 12 | 166.7 |
Standard Elastic Pools (50 eDTU) | 13.9 | 12 | 166.7 |
Standard Elastic Pools (100 eDTU) | 32 | 1 | 32 |
Standard Elastic Pools (200 eDTU) | 32 | 2 | 64 |
Standard Elastic Pools (300 eDTU) | 32 | 3 | 96 |
Standard Elastic Pools (400 eDTU) | 32 | 3 | 96 |
Standard Elastic Pools (800 eDTU) | 32 | 6 | 192 |
Standard Elastic Pools (1200 eDTU) | 32 | 10 | 320 |
Standard Elastic Pools (1600-3000 eDTU) | 32 | 12 | 384 |
Premium Elastic Pools (all DTU configurations) | 13.9 | 12 | 166.7 |
tempdb sizes for vCore-based service tiers
See vCore-based resource limits.
Restrictions
The following operations can't be performed on the
tempdb
database:- Adding filegroups.
- Backing up or restoring the database.
- Changing collation. The default collation is the server collation.
- Changing the database owner.
tempdb
is owned by sa. - Creating a database snapshot.
- Dropping the database.
- Dropping the guest user from the database.
- Enabling Change Data Capture.
- Participating in database mirroring.
- Removing the primary filegroup, primary data file, or log file.
- Renaming the database or primary filegroup.
- Running
DBCC CHECKALLOC
. - Running
DBCC CHECKCATALOG
. - Setting the database to
OFFLINE
. - Setting the database or primary filegroup to
READ_ONLY
.
Permissions
Any user can create temporary objects in
tempdb
. Users can access only their own objects, unless they receive additional permissions. It's possible to revoke the connect permission to tempdb
to prevent a user from using tempdb
. We don't recommend it because some routine operations require the use of tempdb
.Optimizing tempdb performance in SQL Server
The size and physical placement of the
tempdb
database can affect the performance of a system. For example, if the size that's defined for tempdb
is too small, part of the system-processing load might be taken up with autogrowing tempdb
to the size required to support the workload every time you restart the instance of SQL Server.If possible, use instant file initialization to improve the performance of growth operations for data files.
Preallocate space for all
tempdb
files by setting the file size to a value large enough to accommodate the typical workload in the environment. Preallocation prevents tempdb
from expanding too often, which affects performance. The tempdb
database should be set to autogrow to increase disk space for unplanned exceptions.Data files should be of equal size within each filegroup, because SQL Server uses a proportional-fill algorithm that favors allocations in files with more free space. Dividing
tempdb
into multiple data files of equal size provides a high degree of parallel efficiency in operations that use tempdb
.Set the file growth increment to a reasonable size to prevent the
tempdb
database files from growing by too small a value. If the file growth is too small compared to the amount of data that's being written to tempdb
, tempdb
might have to constantly expand. That will affect performance.To check current size and growth parameters for
tempdb
, use the following query:Put the
tempdb
database on a fast I/O subsystem. Use disk striping if there are many directly attached disks. Individual or groups of tempdb
data files don't necessarily need to be on different disks or spindles unless you're also encountering I/O bottlenecks.Put the
tempdb
database on disks that differ from the disks that user databases use.Performance improvements in tempdb for SQL Server
Starting with SQL Server 2016 (13.x),
tempdb
performance is further optimized in the following ways:- Temporary tables and table variables are cached. Caching allows operations that drop and create the temporary objects to run very quickly. Caching also reduces page allocation and metadata contention.
- The allocation page latching protocol is improved to reduce the number of
UP
(update) latches that are used. - Logging overhead for
tempdb
is reduced to reduce disk I/O bandwidth consumption on thetempdb
log file. - Setup adds multiple
tempdb
data files during a new instance installation. You can accomplish this task by using the new UI input control in the Database Engine Configuration section and the command-line parameter/SQLTEMPDBFILECOUNT
. By default, setup adds as manytempdb
data files as the logical processor count or eight, whichever is lower. - When there are multiple
tempdb
data files, all files autogrow at the same time and by the same amount, depending on growth settings. Trace flag 1117 is no longer required. - All allocations in
tempdb
use uniform extents. Trace flag 1118 is no longer required. - For the primary filegroup, the
AUTOGROW_ALL_FILES
property is turned on and the property can't be modified.
For more information on performance improvements in
tempdb
, see the blog article TEMPDB - Files and Trace Flags and Updates, Oh My!.Memory-optimized tempdb metadata
Metadata contention in
tempdb
has historically been a bottleneck to scalability for many workloads running on SQL Server. SQL Server 2019 (15.x) introduces a new feature that's part of the in-memory database feature family: memory-optimized tempdb metadata.This feature effectively removes this bottleneck and unlocks a new level of scalability for tempdb-heavy workloads. In SQL Server 2019 (15.x), the system tables involved in managing temporary table metadata can be moved into latch-free, non-durable, memory-optimized tables.
Watch this seven-minute video for an overview of how and when to use memory-optimized tempdb metadata:
Configuring and using memory-optimized tempdb metadata
To opt in to this new feature, use the following script:
This configuration change requires a restart of the service to take effect.
You can verify whether or not
tempdb
is memory-optimized by using the following T-SQL command:If the server fails to start for any reason after you enable memory-optimized
tempdb
metadata, you can bypass the feature by starting the SQL Server instance with minimal configuration through the -f startup option. You can then disable the feature and restart SQL Server in normal mode.To protect the server from potential out-of-memory conditions, you can bind
tempdb
to a resource pool. This is done through the ALTER SERVER
command rather than the steps you would normally follow to bind a resource pool to a database.This change also requires a restart to take effect, even if memory-optimized tempdb metadata is already enabled.
Memory-optimized tempdb limitations
- Toggling the feature on and off is not dynamic. Because of the intrinsic changes that need to be made to the structure of
tempdb
, a restart is required to either enable or disable the feature. - A single transaction is not allowed to access memory-optimized tables in more than one database. Any transactions that involve a memory-optimized table in a user database won't be able to access
tempdb
system views in the same transaction. If you try to accesstempdb
system views in the same transaction as a memory-optimized table in a user database, you'll receive the following error:Example: - Queries against memory-optimized tables don't support locking and isolation hints, so queries against memory-optimized
tempdb
catalog views won't honor locking and isolation hints. As with other system catalog views in SQL Server, all transactions against system views will be inREAD COMMITTED
(or in this case,READ COMMITTED SNAPSHOT
) isolation. - Columnstore indexes can't be created on temporary tables when memory-optimized
tempdb
metadata is enabled. - Due to the limitation on columnstore indexes, use of the
sp_estimate_data_compression_savings
system stored procedure with theCOLUMNSTORE
orCOLUMNSTORE_ARCHIVE
data compression parameter is not supported when memory-optimizedtempdb
metadata is enabled.
How to enable extensions in safari. Note
These limitations apply only when you're referencing
tempdb
system views. You can create a temporary table in the same transaction as you access a memory-optimized table in a user database, if desired.Capacity planning for tempdb in SQL Server
Determining the appropriate size for
tempdb
in a SQL Server production environment depends on many factors. As described earlier, these factors include the existing workload and the SQL Server features that are used. We recommend that you analyze the existing workload by performing the following tasks in a SQL Server test environment:- Set autogrow on for
tempdb
. - Run individual queries or workload trace files and monitor
tempdb
space use. - Execute index maintenance operations such as rebuilding indexes, and monitor
tempdb
space. - Use the space-use values from the previous steps to predict your total workload usage. Adjust this value for projected concurrent activity, and then set the size of
tempdb
accordingly.
Databases List Mysql
Monitoring tempdb use
Running out of disk space in
tempdb
can cause significant disruptions in the SQL Server production environment. It can also prevent applications that are running from completing operations. You can use the sys.dm_db_file_space_usage dynamic management view to monitor the disk space that's used in the tempdb
files:Database Listener Port
To monitor the page allocation or deallocation activity in
tempdb
at the session or task level, you can use the sys.dm_db_session_space_usage and sys.dm_db_task_space_usage dynamic management views. These views can help you identify large queries, temporary tables, or table variables that are using lots of tempdb
disk space. You can also use several counters to monitor the free space that's available in tempdb
and the resources that are using tempdb
.Related content
SORT_IN_TEMPDB option for indexes
System databases
sys.databases
sys.master_files
Move database files
System databases
sys.databases
sys.master_files
Move database files