Friday, February 24, 2012

Add data files to tempdb.

Hi,
According KB article 328551 FIX: Concurrency enhancements for the tempdb
database. I like to add data files to my tempdb in Prod server. Please help
me check if the following statements are right if the server has 4 CPUs.
alter database tempdb
modify file (name = 'tempdev', size = 250MB, maxsize = 2000MB,
filegrowth = 50MB)
go
alter database tempdb
add filegroup temp_group1
go
alter database tempdb
add file (
name = tempdev1,
filename = 'E:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\tempdev1.ndf',
size = 250MB,
maxsize = 2000MB,
filegrowth = 50MB)
to filegroup temp_group1
go
alter database tempdb
add filegroup temp_group2
go
alter database tempdb
add file (
name = tempdev2,
filename = 'E:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\tempdev2.ndf',
size = 250MB,
maxsize = 2000MB,
filegrowth = 50MB)
to filegroup temp_group2
go
alter database tempdb
add filegroup temp_group3
go
alter database tempdb
add file (
name = tempdev3,
filename = 'E:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\DATA\tempdev3.ndf',
size = 250MB,
maxsize = 2000MB,
filegrowth = 50MB)
to filegroup temp_group3
go
Regards!
ChenYou cannot add new filegroups to tempdb, only files.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
"Chen" <Chen@.discussions.microsoft.com> wrote in message
news:2690FA6F-12B1-42FB-874D-AC3AEC0C8D0B@.microsoft.com...
> Hi,
> According KB article 328551 FIX: Concurrency enhancements for the tempdb
> database. I like to add data files to my tempdb in Prod server. Please
> help
> me check if the following statements are right if the server has 4 CPUs.
> alter database tempdb
> modify file (name = 'tempdev', size = 250MB, maxsize = 2000MB,
> filegrowth = 50MB)
> go
> alter database tempdb
> add filegroup temp_group1
> go
> alter database tempdb
> add file (
> name = tempdev1,
> filename = 'E:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\tempdev1.ndf',
> size = 250MB,
> maxsize = 2000MB,
> filegrowth = 50MB)
> to filegroup temp_group1
> go
> alter database tempdb
> add filegroup temp_group2
> go
> alter database tempdb
> add file (
> name = tempdev2,
> filename = 'E:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\tempdev2.ndf',
> size = 250MB,
> maxsize = 2000MB,
> filegrowth = 50MB)
> to filegroup temp_group2
> go
> alter database tempdb
> add filegroup temp_group3
> go
> alter database tempdb
> add file (
> name = tempdev3,
> filename = 'E:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\DATA\tempdev3.ndf',
> size = 250MB,
> maxsize = 2000MB,
> filegrowth = 50MB)
> to filegroup temp_group3
> go
> Regards!
> Chen
>

No comments:

Post a Comment