I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
performed the following:
1> detach database
2> moved the .ldf file to the 'l' drive(deleted from the w drive)
3> attched the database
4> received a RED 'x'on the ldf file >> retyped the new location of the file
and hit OK . The attach failed with the following error.
error 5105:devide activation error: The physical file name '....' may be
incorrect
cannot create '....' because it already exists.Hi
Rather use T-SQL. Open up query analyser and use the following code. Change
the Db names, files and paths as appropriate:
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
"Joe" wrote:
> I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
> performed the following:
> 1> detach database
> 2> moved the .ldf file to the 'l' drive(deleted from the w drive)
> 3> attched the database
> 4> received a RED 'x'on the ldf file >> retyped the new location of the file
> and hit OK . The attach failed with the following error.
> error 5105:devide activation error: The physical file name '....' may be
> incorrect
> cannot create '....' because it already exists.
>
>
>
>|||I got the same results.--see below:
EXEC sp_attach_db @.dbname = N'MessageEngine',
@.filename1 = N'w:\Program Files\Microsoft SQL
Server\MSSQL\Data\MessageEngine.mdf',
@.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
>>>
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
Server: Msg 5170, Level 16, State 1, Line 1
Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
exists.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Rather use T-SQL. Open up query analyser and use the following code. Change
> the Db names, files and paths as appropriate:
> EXEC sp_attach_db @.dbname = N'pubs',
> @.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
> @.filename2 = N'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data\pubs_log.ldf'
>
> "Joe" wrote:
> > I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
> > performed the following:
> > 1> detach database
> > 2> moved the .ldf file to the 'l' drive(deleted from the w drive)
> > 3> attched the database
> > 4> received a RED 'x'on the ldf file >> retyped the new location of the file
> > and hit OK . The attach failed with the following error.
> >
> > error 5105:devide activation error: The physical file name '....' may be
> > incorrect
> > cannot create '....' because it already exists.
> >
> >
> >
> >
> >
> >
> >|||Hi
From the command prompt, do a DIR l:\SQLLOGS\MessageEngine_log.LDF
Alos, check the the SQL Server Service account has permissions in the
directory and file.
Regards
Mike
"Joe" wrote:
> I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> >>>
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
> > Hi
> >
> > Rather use T-SQL. Open up query analyser and use the following code. Change
> > the Db names, files and paths as appropriate:
> >
> > EXEC sp_attach_db @.dbname = N'pubs',
> > @.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
> > @.filename2 = N'c:\Program Files\Microsoft SQL
> > Server\MSSQL\Data\pubs_log.ldf'
> >
> >
> >
> > "Joe" wrote:
> >
> > > I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
> > > performed the following:
> > > 1> detach database
> > > 2> moved the .ldf file to the 'l' drive(deleted from the w drive)
> > > 3> attched the database
> > > 4> received a RED 'x'on the ldf file >> retyped the new location of the file
> > > and hit OK . The attach failed with the following error.
> > >
> > > error 5105:devide activation error: The physical file name '....' may be
> > > incorrect
> > > cannot create '....' because it already exists.
> > >
> > >
> > >
> > >
> > >
> > >
> > >|||Make sure you move the old MessageEngine_log.LDF file to L:\SQLLOGS\
directory before you run sp_attach_db.
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:94AF06C2-E3A1-4089-9620-7315F6EE9CD0@.microsoft.com...
>I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
>>>>
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
>> Hi
>> Rather use T-SQL. Open up query analyser and use the following code.
>> Change
>> the Db names, files and paths as appropriate:
>> EXEC sp_attach_db @.dbname = N'pubs',
>> @.filename1 = N'c:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\pubs.mdf',
>> @.filename2 = N'c:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\pubs_log.ldf'
>>
>> "Joe" wrote:
>> > I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
>> > performed the following:
>> > 1> detach database
>> > 2> moved the .ldf file to the 'l' drive(deleted from the w drive)
>> > 3> attched the database
>> > 4> received a RED 'x'on the ldf file >> retyped the new location of the
>> > file
>> > and hit OK . The attach failed with the following error.
>> >
>> > error 5105:devide activation error: The physical file name '....' may
>> > be
>> > incorrect
>> > cannot create '....' because it already exists.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment