cancel
Showing results for 
Search instead for 
Did you mean: 

moving logfiles from one location to other.

Former Member
0 Kudos

Dear SDN,

currently my logfiles ore in e drive. and i want to move it to other drive. please help me out how to do this.

we are using sqlserver 2000.

regards

deepak

Accepted Solutions (0)

Answers (1)

Answers (1)

JPReyes
Active Contributor
0 Kudos

what log files are you planning to move?... you mean your transaction log?

Regards

Juan

Former Member
0 Kudos

Dear Juan,

when we installed our SAP in BW dev server we put BW DATAFILE and LOGFILE in E drive. and our BW DEV and QAS is in one server. now our E drive running low disk space. so we need to transfer these files to other drive. we are using SQL Server 2000 . i follow the below procedure for transfering the files.

Detach the database as follows:

use master go sp_detach_db 'BWD' go

Next, copy the data files and the log files from the current location (D:\Mssql7\Data) to the new location (E:\Sqldata).

Re-attach the database. Point to the files in the new location as follows:

use master go sp_attach_db 'BWD','E:\BWDDATA1\BWDDATA1.mdf', 'E:\BWDDATA2\BWDDATA2.ndf', 'F:\BWDDATA3\BWDDATA3.ndf', 'E:\BWDLOG1\BWDLOG1.ldf', 'E:\BWDLOG2\BWDLOG2.ldf'

go

Verify the change in file locations by using the sp_helpfile stored procedure:

use BWD go sp_helpfile go

The filename column values should reflect the new locations.

But it's not working.

can you suggest me regarding this issue.

thanks in advance.

regards

deepak

JPReyes
Active Contributor
0 Kudos

This might help,

http://www.lazydba.com/sql/1__12017.html

Regards

Juan