Solved

'alter database <dbname> set recovery full

Posted on 2007-03-27
2
2,372 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 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

717 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