?
Solved

'alter database <dbname> set recovery full

Posted on 2007-03-27
2
Medium Priority
?
2,386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

801 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