SQL Server 2008 log size management problems

Posted by b0x0rz on Stack Overflow See other posts from Stack Overflow or by b0x0rz
Published on 2010-05-08T18:05:12Z Indexed on 2010/05/08 18:08 UTC
Read the original article Hit count: 280

I'm trying to shrink the log of a database AND set the recovery to simple, but always there is an error, whatever i try.

USE 4_o5;
GO
ALTER DATABASE 4_o5
SET RECOVERY SIMPLE;
GO
DBCC SHRINKFILE (4_o5_log, 10);
GO

the output of sp_helpfile says that log file is located under (hosted solution):

I:\dataroot\4_o5_log.LDF

please help me perform this operation as the log file got large when importing a lot of data and now this info is no longer needed, have multiple (lots of) backups since then.

the exact error message when performing the query above is:

incorrect syntax near '4'.
RECOVERY is not a recognized SET option.
incorrect syntax near _5_log'.

i am using visual studio 2010 (also have SQL Server Express installed locally, SQL Server 2008 proper installed at provider (shared))

thnx a lot

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-server-2008