Wednesday, March 28, 2012

moving transaction log

I tried to move the transaction log file of all our db's to a different drive
to increase performance.
I tried to do this by detaching the database, copy the *.ldf file to the new
drive an attach the database with the following command:
EXEC sp_attach_db 'Formula1Bingo',
'D:\SQL_DATA\MSSQL\Data\Formula1Bingo.mdf', 'E:\SQL_LOG\Formula1Bingo_log.LDF'
i got the following error:
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name
'E:\SQL_LOG\Formula1Bingo_log.LDF' may be incorrect.
Device activation error. The physical file name
'E:\SQL_LOG\Formula1Bingo_log.LDF' may be incorrect.
New log file 'D:\SQL_DATA\MSSQL\Data\Formula1Bingo_log.LDF' was created.
The database was detached but with a new log file on the D: drive.
Thx for your help
Paul
Check if the directory for 'E:\SQL_LOG\Formula1Bingo_log.LDF' exists ont he
server (be careful if that is a mapped drive), the appropiate permissions are
set to access the directory.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Paul Wessiack" wrote:

> I tried to move the transaction log file of all our db's to a different drive
> to increase performance.
> I tried to do this by detaching the database, copy the *.ldf file to the new
> drive an attach the database with the following command:
> EXEC sp_attach_db 'Formula1Bingo',
> 'D:\SQL_DATA\MSSQL\Data\Formula1Bingo.mdf', 'E:\SQL_LOG\Formula1Bingo_log.LDF'
> i got the following error:
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'E:\SQL_LOG\Formula1Bingo_log.LDF' may be incorrect.
> Device activation error. The physical file name
> 'E:\SQL_LOG\Formula1Bingo_log.LDF' may be incorrect.
> New log file 'D:\SQL_DATA\MSSQL\Data\Formula1Bingo_log.LDF' was created.
>
> The database was detached but with a new log file on the D: drive.
> Thx for your help
> Paul
>
|||Yes the File 'E:\SQL_LOG\Formula1Bingo_log.LDF' exists and the E: drive is a
native drive not amapped drive.
I configured SQL-Server to use the D: drive as data drive an the E: drive as
transactionlog drive as default. If i create a new database with enterprise
manager, the *.mdb file is on the D: drive and the *.ldf file is on the E:
drive.
The account, the SQL-Server is running with, is also local admin on that
server. This fact and the fact the a new database is working correct let me
conclude that it's not a permission problem.
"Jens Sü?meyer" wrote:
[vbcol=seagreen]
> Check if the directory for 'E:\SQL_LOG\Formula1Bingo_log.LDF' exists ont he
> server (be careful if that is a mapped drive), the appropiate permissions are
> set to access the directory.
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
> "Paul Wessiack" wrote:

No comments:

Post a Comment