Re: Lost Log File !



Hi,

DBCC Rebuild_Log is not a documented method and it is not at all
recommended. So even if it succeeds there will be data consistency issue.

So the best approach is :-

1. Create a new database
2. Use DTS to move data and objects to new database

If the above steps fail then contact Microsoft product support.

Thanks
Hari
SQL Server MVP

"Joh" <joh@xxxxxxxxxxxx> wrote in message
news:%23u86So9VFHA.3760@xxxxxxxxxxxxxxxxxxxxxxx
> Here is the following stuff which I do for recovery log file ... basically
> I
> have lost log file and I only have a .mdf file.
>
> Before going to the DOS mode I update the status of Health Database to
> 32768
> and I only have a .mdf file.
>
> From the DOS mode I used the following command
>
> sqlservr -c -T3608 -T4022
>
> after that run the following command in Query Analyzer
>
> select name, status from sysdatabases where name = 'Health'
>
> Output:-
> name status
> Health 32768
> Go
> dbcc traceon(3604)
> Go
> DBCC Rebuild_Log('Health','C:\Health_Log.ldf')
> GO
>
> Error:-
> Server: Msg 17, Level 16, State 1, Line 0
> [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not
> exist
> or access denied.
> Server: Msg 10061, Level 16, State 1, Line 0
> [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen
> (Connect()).
>
> Connection Broken
>
> When I check from the dos mode it gave the following error:-
> 2005-05-13 11:26:16.01 spid51 Could not open FCB for invalid file ID 0
> in
> database 'Health'..
>
>
>
>
>


.



Relevant Pages

  • Re: LOG Device Corrupted
    ... Check the documentation for the correct DBCC ... It seems your old database have mutiple LDF files. ... Stop sql server and rename the existing MDF to a new one and copy the ... Now execute the undocumented DBCC to create a log file ...
    (microsoft.public.sqlserver.server)
  • Re: Changing database size
    ... But these steps do not alter the database log file size. ... >DBCC SHRINKDATABASE ...
    (microsoft.public.sqlserver.server)
  • Re: Detach - Attach in SQL Server 7
    ... >> It is not rquired to detach and attach the database to shrink the file. ... If the log file really huge make the databse single user after ... >> DBCC SHRINKFILE('Logical_ldf_name','truncateonly' ...
    (microsoft.public.sqlserver.server)
  • Re: Shrink Transaction Log
    ... What recovery model is your database in? ... transaction log got this big once, ... Based on the name column for the transaction log file execute the dbcc ...
    (microsoft.public.sqlserver.server)
  • Re: database errors on dbcc
    ... First and best option is restore from the latest backup into a new database ... because the data consistency would have ... DBCC CHECKDB ...
    (microsoft.public.sqlserver.server)

Loading