Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dr223
Constraint Violating Yak Guru

444 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
2241 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
52326 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
211 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

EsmondNorton
Starting Member

5 Posts

Posted - 11/07/2014 :  05:14:02  Show Profile  Reply with Quote
For increase your server performance it is advisable but you need to distinguish between rebuilding the index & reorganising the indexes
refer the following discussion http://www.sql.recoverytoolbox.com/ & download demo Recovery Toolbox for SQL Server
Go to Top of Page
  Previous Topic Topic Next 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.04 seconds. Powered By: Snitz Forums 2000