Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Truncate Sql log file.

Status
Not open for further replies.

victorlopes

IS-IT--Management
Jan 6, 2004
9
ES
Any body knows how I can truncate the log of one sql database.
My database is a production database and is not possible to stop because have a 100% of up-time.
Thanks and best regards,
VLopes
 
vLopes, try this.

Right-click (in Enterprise manager) on the database name -->
All Tasks --> Shrink Database

click OK without changing any options. See if it then shrinks the log file. If you are using the Full recovery model (see options) this may not work.

Reply back if you need another tip. John
 
Hello john,
Tanks for your help.
Is not working well.
Is possible to do this for “query analyzer”??
;)VL
 
hey .. basically. . take a full backup and a transactional backup this will shrink the transaction log.

or
just take up a backup of the log with trucate from QA

BACKUP LOG { database_name | @database_name_var }
{
[ WITH
{ NO_LOG | TRUNCATE_ONLY } ]
}


or just take your recovery model to simple dont advise it if your Db is transaction dependent 24/7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top