참고 링크
http://sqlserverpedia.com/wiki/TempDB

tempdb 데이타베이스는 SQL Server 서비스가 중지되었다가 다시 시작될 때마다  새로 만들어진다. SQL Server 서비스가 시작되면 기본적으로 SQL Server는 새롭게 8MB 크기의 tempdb 데이터베이스를 생성하기 위해서 model 데이타베이스의 복사본을 만들게 된다. 이때 로그 파일의 크기는 1MB이며, 만약 model 데이타베이스를 변경하였다면 변경된 내용까지도 상속을 받게 된다. MDF와 LDF 파일의 경우 파일의 자동 증가는 10% 단위로 설정되고, 최대 파일 크기는 무제한 증가되도록 설정된다.

그렇다면, 늘어난 tempdb는 SQL 재가동 될때마다 초기 크기로 될까?
대답은 NO 이다
tempdb 파일의 최적 크기로 설정하고 나면 SQL Server가 재시작될 때마다 tempdb는 최적의 크기로 생성된다.!! (전제, MDF와 LDF에 모두 적용되어야 한다)



4. Pre-size TempDB - By default TempDB is created with one data file of 8MB and one log file of 0.5 MB. When SQL Server is restarted TempDB is recreated and will return to the original size. Most production systems will need much more space in TempDB. By default both data and log files of TempDB are allowed to grow automatically. Keep in mind that allowing TempDB to Autogrow will take up some system resources. After a restart a heavily used TempDB which has not been pre-sized will have to grow very frequently causing significant overhead.

It is recommend that you monitor the typical size of TempDB on your system. Once you have a good feel of the usual size of TempDB, make the TempDB data file larger than its usual size and turn off automatic growth of this data file. Ideally TempDB would reside on a dedicated disk and be pre-sized to the maximum space available.

Script to check your TempDB size and growth parameters
http://msdn.microsoft.com/en-us/library/ms175527.aspx


Change TempDB data file size (1GB)

1.USE [master]
2.GO
3.ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'tempdev', SIZE = 1024000KB )
4.GO

Change TempDB log file size (0.5GB)

1.USE [master]
2.GO
3.ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'templog', SIZE = 512000KB )
4.GO

'Etc' 카테고리의 다른 글

Monggo PPT  (0) 2011.06.01
드뎌 한글판으로 NoSQL MongoDB 책 예판하다^^^  (0) 2011.05.23
NOSQL - MongGo DB  (1) 2011.04.26
NoSQL 에 대한 블로그 포스트 모음  (0) 2011.04.18
Mongo DB 설치 (윈7)  (0) 2011.03.15