SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Transaction Log File - FULL
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dr223
Constraint Violating Yak Guru

416 Posts

Posted - 12/12/2012 :  05:27:03  Show Profile  Reply with Quote
Hi,

Am working with SQL Server 2005..

I am trying to shrink the log file of the database.. Apparently, the name of the database, log and mdf is the same.

Used this code

USE gprddevelopment
GO
DBCC SHRINKFILE(<gprddevelopment>, 1)
BACKUP LOG <gprddevelopment> WITH TRUNCATE_ONLY
DBCC SHRINKFILE(<gprddevelopment>, 1)
GO


and I receive the error :

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '<'.
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '<'.



Please help..

Thanks

Edited by - dr223 on 12/12/2012 05:28:18

bandi
Flowing Fount of Yak Knowledge

India
2218 Posts

Posted - 12/12/2012 :  05:30:21  Show Profile  Reply with Quote
Try this..........
Remove that < and > symbols there

--
Chandu
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 12/14/2012 :  03:39:46  Show Profile  Reply with Quote
make sure you read this

http://sqlserverpedia.com/blog/sql-server-backup-and-restore/backup-log-with-truncate_only-like-a-bear-trap/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

prett
Posting Yak Master

USA
203 Posts

Posted - 12/17/2012 :  01:24:07  Show Profile  Visit prett's Homepage  Reply with Quote
Before shrinking the log file, please read this link: http://www.sqlservercentral.com/articles/Administration/64582/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000