[dba-SQLServer] Moving the log file

Francisco Tapia fhtapia at gmail.com
Sun Oct 1 20:54:45 CDT 2006


If you are attaching the DB it's like this
>From Query Analyzer

RESTORE DATABASE devREDe FROM DISK = 'D:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\DB.bak'
WITH MOVE 'myDB_log' TO 'D:\Program Files\Microsoft SQL
Server\MSSQL\DATA\DB_log.ldf'

>From EM:
When creating a new database, the 3rd tab is for the transaction log
simply choose an availalbe path on your sql server.  Click the
ellipses (three dots) and viola... click and choose the drive/folder
that you want your transaction log to be at.

On 10/1/06, JWColby <jwcolby at colbyconsulting.com> wrote:
> Yes, but HOW?  I tried copying and then editing the location in that screen
> and it refused to accept the edit.  I have managed it in the past but never
> really discovered the magic incantation to cause it to happen whenever I
> want, rather than whenever it decided to cooperate.
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
>
> -----Original Message-----
> From: dba-sqlserver-bounces at databaseadvisors.com
> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike &
> Doris Manning
> Sent: Sunday, October 01, 2006 2:10 PM
> To: dba-sqlserver at databaseadvisors.com
> Subject: Re: [dba-SQLServer] Moving the log file
>
> Yes, you need to click on the database name and choose Properties.  You can
> change where the Database and Transaction Log files get stored from tabs on
> this screen.
>
> Doris Manning
> mikedorism at verizon.net
>
> -----Original Message-----
> From: dba-sqlserver-bounces at databaseadvisors.com
> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of JWColby
> Sent: Thursday, September 28, 2006 10:43 AM
> To: dba-sqlserver at databaseadvisors.com
> Subject: [dba-SQLServer] Moving the log file
>
> Is there a way to have SQL Server itself move it's log file to another
> drive?  I created a database and it creates the log file in the same
> directory as the data file.  If I detach the database and physically move
> the log file, SQL Server refuses to allow me to attach the database again
> using (changing the location of) the log file on the other drive.  If I just
> click OK with the little red X in the log file location, it creates a new
> log file back in the same location as the data file.
>
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>
>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>


-- 
-Francisco
http://sqlthis.blogspot.com | Tsql and More...



More information about the dba-SQLServer mailing list