Re: Database recovery with data file only

From: Paul S Randal [MS] (prandal_at_online.microsoft.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 11:25:18 -0700

Basically using that command breaks your business logic as there's no
guarantee of any constraints (implied or explicit) being true any more.
Also, the use of the command is unsupported and its use is tracked by the
server.

-- 
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan Guzman" <danguzman@nospam-earthlink.net> wrote in message
news:O5DUi6dXEHA.2844@TK2MSFTNGP11.phx.gbl...
> Although DBCC CHECKDB can detect physical corruption, there could be
logical
> errors as well, such as orphaned data and uncommitted data.  I wanted Ken
to
> fully understand the implications of rebuilding the log.
>
> -- 
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP
>
> "Hari" <hari_prasad_k@hotmail.com> wrote in message
> news:u$KcfydXEHA.556@tk2msftngp13.phx.gbl...
> > Hi Dan,
> >
> > I accept what you say regarding data integrity.
> > I suggested /recommended this method only because ken do not have the
> > database Backup as well as
> > no LDF files. In this case DBCC REBUILD_LOG will be a easy and faster
> > approach. After bringing
> >  up the database ken can execute a DBCC CHECKDB and confirm that
database
> is
> > fine or not.
> >
> > --
> > Thanks
> > Hari
> > MCDBA
> > "Dan Guzman" <danguzman@nospam-earthlink.net> wrote in message
> > news:ev$$EMZXEHA.1652@TK2MSFTNGP09.phx.gbl...
> > > A word of warning regarding the technique proposed by Hari.  Forcibly
> > > rebuilding the transaction log results in a database with questionable
> > > integrity.  Data may be physically corrupt or logically inconsistent
> > because
> > > normal database recovery did not take place.
> > >
> > > A preferable method is to restore from backup.  If the log must be
> rebuilt
> > > because no backup is available, I suggest data be exported and then
> > imported
> > > into a clean database.
> > >
> > > --
> > > Hope this helps.
> > >
> > > Dan Guzman
> > > SQL Server MVP
> > >
> > > --
> > > Hope this helps.
> > >
> > > Dan Guzman
> > > SQL Server MVP
> > >
> > > "Ken.net" <Ken.net@discussions.microsoft.com> wrote in message
> > > news:577A1B53-8E9E-4AF8-9F44-F4DF18D8D78D@microsoft.com...
> > > > I had database whose log file and backup files are unavailable due
to
> a
> > > media failure. I had the data file which is up to date.
> > > >
> > > > Is it possible to recover the database?
> > > >
> > > > I had tried using attach database utility but failed with an error
> > message
> > > "Device Activation error. Physical file name "C:\....\xxx.ldf" may be
> > > incorrect.
> > > >
> > > > Please advice me if anything can be done.
> > > >
> > > > Thanking You
> > > >
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: sa not starting in master-db
    ... in the nt-authentication for my default connection setting. ... "Dan Guzman" wrote in message ... > Is the sa database context set incorrectly when connecting from any ... > SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: User Mappings to TempDB
    ... "Dan Guzman" wrote: ... > databases, including tempdb, contain the user. ... > in a new database, you'll need to drop the user after database creation. ... > SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Who should be owner if bd?
    ... > Hari, perhaps you meant sp_changedbowner? ... > Dan Guzman ... > SQL Server MVP ... >> database. ...
    (microsoft.public.sqlserver.security)
  • Re: Status Column in sysobjects table...SQL2000
    ... Please post a sample proc that demonstrates the ... >> Dan Guzman ... >> SQL Server MVP ... even though there are no compilation errors. ...
    (microsoft.public.sqlserver.programming)
  • Re: How critical is the transaction log file?
    ... Tibor Karaszi, SQL Server MVP ... file when you have only one file (no log file). ... circumstances it is supported to attach only an mdf file. ... > This development database that we're building does not have any 'user' ...
    (microsoft.public.sqlserver.tools)