I'm running SQL Server 2000, trying to rebuild a
transaction log since I only have an .MDF file. I've tried
creating a new database with the same name, stopping SQL
Server, then inserting the real data file, and setting the
database to emergency mode, then running the DBBC
Rebuild_Log('dbname', 'c:\somepath') and that command
appears to execute ok in Query Analyzer, but the log file
is not created. Is there any other method for attaching
the .mdf when you don't have the valid .ldf that goes with
it. (I've tried sp_attach_single_file) and that doesn't
work either. I get an error message that says it can't
find the log file (this db was pulled off of another
system that had the log file path stored pointed to
another drive). Any help is appreciated.
Thanks
Sounds like you have tried "sp_attach_single_file_db" (although this isn't
what you typed). This command to use to attach a database that only has a
the data file. I would review BOL and try this command again. Also is it
possible that you data file is corrupted?
----
-
Need SQL Server Examples check out my website
http://www.geocities.com/sqlserverexamples
"Steve" <anonymous@.discussions.microsoft.com> wrote in message
news:382a01c4a55e$ce066150$a301280a@.phx.gbl...
> I'm running SQL Server 2000, trying to rebuild a
> transaction log since I only have an .MDF file. I've tried
> creating a new database with the same name, stopping SQL
> Server, then inserting the real data file, and setting the
> database to emergency mode, then running the DBBC
> Rebuild_Log('dbname', 'c:\somepath') and that command
> appears to execute ok in Query Analyzer, but the log file
> is not created. Is there any other method for attaching
> the .mdf when you don't have the valid .ldf that goes with
> it. (I've tried sp_attach_single_file) and that doesn't
> work either. I get an error message that says it can't
> find the log file (this db was pulled off of another
> system that had the log file path stored pointed to
> another drive). Any help is appreciated.
> Thanks
|||If sp_attach_single_file doesn't work then see
http://www.nigelrivett.net/RecoverCorruptDatabase.html
"Steve" wrote:
> I'm running SQL Server 2000, trying to rebuild a
> transaction log since I only have an .MDF file. I've tried
> creating a new database with the same name, stopping SQL
> Server, then inserting the real data file, and setting the
> database to emergency mode, then running the DBBC
> Rebuild_Log('dbname', 'c:\somepath') and that command
> appears to execute ok in Query Analyzer, but the log file
> is not created. Is there any other method for attaching
> the .mdf when you don't have the valid .ldf that goes with
> it. (I've tried sp_attach_single_file) and that doesn't
> work either. I get an error message that says it can't
> find the log file (this db was pulled off of another
> system that had the log file path stored pointed to
> another drive). Any help is appreciated.
> Thanks
>
|||ok, that's what I meant, I didn't check the exact syntax,
but the "sp_attach_single_file_db" doesn't work... I don't
believe the .mdf data file is corrupted. All error
messages seem to point to the log file.
>--Original Message--
>Sounds like you have tried "sp_attach_single_file_db"
(although this isn't
>what you typed). This command to use to attach a
database that only has a
>the data file. I would review BOL and try this command
again. Also is it
>possible that you data file is corrupted?
>--
>----
--
>----
--
>-
>Need SQL Server Examples check out my website
>http://www.geocities.com/sqlserverexamples
>
>"Steve" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:382a01c4a55e$ce066150$a301280a@.phx.gbl...
tried[vbcol=seagreen]
the[vbcol=seagreen]
file[vbcol=seagreen]
with
>
>.
>
|||Ok, I just tried your instructions and it didn't work.
The database is in emergency mode, and I can't see any of
the tables, and when I try to setup a dts, I get an error
saying that it can't initialize the database.
[vbcol=seagreen]
>--Original Message--
>If sp_attach_single_file doesn't work then see
>http://www.nigelrivett.net/RecoverCorruptDatabase.html
>"Steve" wrote:
tried[vbcol=seagreen]
SQL[vbcol=seagreen]
the[vbcol=seagreen]
file[vbcol=seagreen]
with
>.
>
No comments:
Post a Comment