Hi,
Because the .ldf file of my database 'FlexKIDS' had grown
beyong his limits (2,5 G) and I had no space left to do a
backup/shrink of the transaction log, I detached the
database and physically removed the transaction log.
When I re-attach the database (.mdf) with
the EnterpriseManger (sp_attach_db)I received the
following error:
error 1813:Could not open new database 'FlexKIDS'
createdatabase aborted.
Device activation error.The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\data\FlexKIDS_log.ldf' maybe incorrect.
Who can HELP me recover my database only from
the corrupted .mdf file (FlexKIDS.mdf)?
Cheers Jack. (jbonapart@.dicon.nl)Jack
What is the full sp_attach_single_file_db command you are
using?
Regards
John|||John,
EXEC sp_attach_single_file_db @.dbname = 'FlexKIDS',
@.physname = 'D:\Microsoft SQL\MSSQL\Data\FlexKIDS.mdf'
OUTPUT:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'FlexKIDS'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.
>--Original Message--
>Jack
>What is the full sp_attach_single_file_db command you are
>using?
>Regards
>John
>.
>|||John,
I am also including the sp_attach_db command results:
EXEC sp_attach_db @.dbname = 'FlexKIDS',
@.filename1 = 'D:\Microsoft SQL
MSSSQL\Data\FlexKIDS.mdf'
OUTPUT:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'FlexKIDS'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.|||Jack
I just tried it on my system. And it was fine. I created a
database FlexKids, detached it and deleted the log. Used
the same sp_attach_single_db comand you used .
I got one error, by default the data file was created as
FlexKids_data.mdf. When I amended the attach it worked
just fine.
Unless that is your problem, I do not know what else to
suggest, check you have no typos in your command.
Can you copy the .mdf to another server and try to attach
it, just to see if it will work.
Regards
John
>--Original Message--
>John,
>EXEC sp_attach_single_file_db @.dbname = 'FlexKIDS',
> @.physname = 'D:\Microsoft SQL\MSSQL\Data\FlexKIDS.mdf'
>
>OUTPUT:
>Server: Msg 1813, Level 16, State 2, Line 1
>Could not open new database 'FlexKIDS'. CREATE DATABASE
is
>aborted.
>Device activation error. The physical file
>name 'D:\Microsoft SQL
>Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.
>
>>--Original Message--
>>Jack
>>What is the full sp_attach_single_file_db command you
are
>>using?
>>Regards
>>John
>>.
>.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment