Re: Truncate log file

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 08/05/04


Date: Thu, 5 Aug 2004 16:15:54 +0530

Hi,

It seems that the source database was not detached properly. Could you
please ask the client side to use SP_DETACH_DB to detach the database and
ask them to resend the MDF and LDF file back again.

Thanks
Hari
MCDBA

"lurc" <lurchot@hotmail.com> wrote in message
news:uasKOLteEHA.3148@TK2MSFTNGP10.phx.gbl...
> Hi Hari,
>
> Thanks.
>
> Under SQL Query Analyzer, I run following statement,
> sp_attach_single_file_db 'backoff_0801', 'E:\data\backoff_data.mdf'
>
> But get error messages like,
> Server: Msg 1813, Level 16, State 2, Line 1
> Could not open new database 'backoff_0801'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'd:\tmxdb\backoff_log.ldf'
> may be incorrect.
>
> --
> Best regards,
> Lurc
> "Hari Prasad" <hari_prasad_k@hotmail.com> wrote in message
> news:OvS3j5seEHA.2396@TK2MSFTNGP11.phx.gbl...
> > Hi,
> >
> > If it is a development environment you could just attach only the MDF
> file.
> > It seems client has not shrink the LDF file.
> > How to attach the MDF file only.
> >
> > sp_attach_single_file_db 'dbname' , 'physical_mdf_name_with_path'
> >
> > This command will build a new LDF file.
> >
> > Thanks
> > Hari
> > MCDBA
> >
> > "lurc" <lurchot@hotmail.com> wrote in message
> > news:ul$RprseEHA.2352@TK2MSFTNGP09.phx.gbl...
> > > Hi all,
> > >
> > > Get one sql server 2000 database from one of our clients for analysis,
> the
> > > size of mdf is 850MB, but ldf is 3.5GB, is there any way to truncate
the
> > log
> > > file?
> > >
> > > --
> > > Best regards,
> > > Lurc
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Error 1813 or "WHY didnt they call me earlier?"
    ... 3- copy the data file (mdf and ndf's) over the ones from ... 4- start sql server ... >The SQL Server 7.0 database on this server appear after ... >but I get an error telling me that ldf file and mdf file ...
    (microsoft.public.sqlserver.server)
  • Re: .LDF files and SharePoint Portal
    ... So when you take a backup of the database, ... I have some questions about .LDF files and Sharepoint. ... Is it safe to delete the data in the .LDF file or will it cause ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Regarding Suspect Database
    ... The MDF or LDF file for the database is not available during startup ... LDF file missing or Corrupted ... MDF file page allocation problems. ... >> Can any body let me know about the suspect database what is the remedies ...
    (microsoft.public.sqlserver.clients)
  • Re: Crash Recovery
    ... You can't apply an LDF file to a restored database backup. ... >> How to restore the BAK file. ...
    (microsoft.public.sqlserver.server)
  • Re: Humongous transaction LOG!!!
    ... Just to be clear on this, truncating the Log doesn't shrink the size of the ... it will soon need to use the same amount of space in the .ldf file & it's ... To shrink the .ldf file you can use dbcc shrinkfile. ... This is strange since the size of the backup database is about ...
    (microsoft.public.sqlserver.server)