With use of SQL Server the size of database TempDB grows and logical drive C may be short of space. Default location is as shown in snapshot.
To change the location take following steps.
Determine the file names of the tempdb database and their current location on the disk. Files used by the tempDB database is TempDB.mdf and Templog.ldf.
Use below SQL query to check the same.
SELECT name, physical_name AS Current Location
FROM sys.master_files
WHERE database_id = DB_ID(N'tempdb');
GO
Now use below SQL query in SQL server management studio to change the location of file by using ALTER DATABASE as shown.
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = 'G:\SQLData\tempdb.mdf');
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = 'G:\SQLLog\templog.ldf');
GO
Make sure to create folders for the new locations first else the SQL query will give an error. Cross verify as below that locations get changed.
Delete Tempdb.mdf and Templog.ldf files from the old location.
Đã phát hành cho: Schneider Electric Việt Nam


Bạn cần trợ giúp?
Bắt đầu ở đây!
Tìm câu trả lời ngay. Tự tìm kiếm giải pháp, hoặc kết nối với một trong các chuyên gia của chúng tôi.
Liên hệ hỗ trợ
Liên hệ với nhóm chăm sóc khách hàng của Schneider để nhận thêm thông tin, được hỗ trợ kỹ thuật, trợ giúp khiếu nại và các thông tin khác.
Nơi mua hàng?
Dễ dàng tìm nhà phân phối Schneider Electric gần bạn nhất.
Tìm kiếm câu hỏi thường gặp
Nhận câu trả lời bạn cần bằng cách duyệt tìm những Câu hỏi thường gặp (FAQ) liên quan đến chủ đề.
Liên hệ bộ phận bán hàng
Đăng ký bán hàng trực tuyến và chuyên gia của chúng tôi sẽ liên hệ với bạn.