Re: Placing Log on another drive

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

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 06/11/04


Date: Fri, 11 Jun 2004 22:01:39 +0530

Hi,

Steps to move LDF file to new drive

1. Execute detach database (SP_DETACH_DB <dbname>
2. Copy the LDF file to new drive
3. Attach the database (SP_DETACH_DB <dbname>,'MDF file with path','LDF file
with path'

Before doing the above steps , make the database single user

alter database <dbname> set single_user with rollback immediate

After the activity turn the databse to multi user by executing

alter database <dbname> set multi_user

Thanks
Hari
MCDBA

"Jack A" <anonymous@discussions.microsoft.com> wrote in message
news:1b06e01c44fce$eadf5a60$a601280a@phx.gbl...
>
> We have a database that uses the same drive for logs and
> data. After a new disk has been installed what is the
> easiest way (and reliable) way to move the logs to the new
> disk.
>
> I'm thinking of dumping and restoring the database using
> the log on clause of restore. Any other ideas ?
>
> TIA,
> Jack



Relevant Pages

  • Re: SQL 2005 Log Shipping
    ... The logs are being backed up shipped and restored onto the ... single article on how to promote or activate, etc the secondary backup ... database and move it into a normal database instead of "Restoring". ...
    (microsoft.public.sqlserver)
  • 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: Is this normal
    ... it is constantly restoring the shipped logs. ... I have restored the database to the primary server and this has worked fine. ... The secondary server starts the restore and the log files are placed on the ...
    (microsoft.public.sqlserver.replication)
  • 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)