Solved

'alter database <dbname> set recovery full

Posted on 2007-03-27
2
2,333 Views
Last Modified: 2008-02-01
'alter database <dbname>set recovery full

get a syntax error near keyword SET. There are several users in the database. Can I execute this statement while other users are in the database? Any other way to set this option?
0
Comment
Question by:chas1994
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 18798998
what version of SQL Server are you using?
the syntax you show looks fine, however do you have a space between  the database name and the keyword SET?
how do you run the statement?

>Can I execute this statement while other users are in the database?
yes

>Any other way to set this option?
yes:
exec sp_dboption 'dbname', 'trunc. log on chkpt.', 'false'

0
 
LVL 11

Expert Comment

by:Ved Prakash Agrawal
ID: 18799183
YES you can execute above command while other user are working in the database.

there is no issue with the syntax.

ALTER DATABASE NORTHWIND SET RECOVERY FULL

check you have rights to change recovery model or not.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now