For future reference the following may be useful:

EXEC sp_detach_db YOURDBNAME

Delete or rename the physical .ldf file

EXEC sp_attach_single_file_db 'YOURDBNAME',
'D:\SQL\MSSQL\Data\YOURDBNAME.mdf'

SQL server will automatically recreate a blank transaction log.
Obviously this means that the db will be offline for a few seconds.

Steve



> -----Original Message-----
> From: Douglas Humphris [mailto:Douglas.Humphris@;unitech.net]
> Sent: 01 November 2002 11:02
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] SQL Transaction logs HELP!
> 
> 
> Thanks Neil,
> 
> beaten to it!! My colleague switched it to simple recovery 
> model and then it performed a shrink no probs. That's why the 
> log was growing so much - it wasn't removing the transaction 
> logs after they were complete...
> 
> Thanks all the same, Douglas
> 
> -----Original Message-----
> From: Robertson-Ravo, Neil (REC)
> [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com]
> Sent: 01 November 2002 10:54
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ cf-dev ] SQL Transaction logs HELP!
> 
> 
> obviously make sure you have your DB selected, and you may 
> also have to put
> the FQP in there.
> 
> -----Original Message-----
> From: Robertson-Ravo, Neil (REC)
> [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com]
> Sent: 01 November 2002 10:52
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ cf-dev ] SQL Transaction logs HELP!
> 
> 
> yep, just use Query Analyser.... the Enterprise Manager is 
> good for some
> things, but its not suited for all!
> 
> so if you want to shrink a log named FOO to 5 MB, then just use
> 
> dbcc shrinkfile (foo,5)
> 
> then press F5
> 
> 
> 
> -----Original Message-----
> From: Douglas Humphris [mailto:Douglas.Humphris@;unitech.net]
> Sent: 01 November 2002 10:48
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] SQL Transaction logs HELP!
> 
> 
> Thanks Neil,
> 
> what's the dbcc command? Do I run from command prompt?
> 
> D
> 
> -----Original Message-----
> From: Robertson-Ravo, Neil (REC)
> [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com]
> Sent: 01 November 2002 10:40
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ cf-dev ] SQL Transaction logs HELP!
> 
> 
> run either a shrinkdb or a shrinkfile dbcc command : 
> 
> dbcc shrinkdatabase ([database],[percentage of free space])
> 
> dbcc shrinkfile ([transactionlog], [sizeyouwant])
> 
> You may be to terminate all active pid's to run these 
> commands (start/stop
> server should do it)
> 
> Neil
> 
> 
> 
> -----Original Message-----
> From: Douglas Humphris [mailto:Douglas.Humphris@;unitech.net]
> Sent: 01 November 2002 10:35
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] SQL Transaction logs HELP!
> 
> 
> Is anyone here good with SQL Server admin?
> 
> We have a transaction log which has grown way too large and 
> won't shrink.
> We're tried backing up and restoring and still won't shrink. 
> Trying to stop
> it before it consumes the whole hard drive...it seems to have 
> an enormous
> amount of unused space which it won't release. Anyone any 
> ideas on how to
> shrink this - or point me to a SQL group.
> 
> TIA Doug
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> 

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to