View Recovery State

I know in SQL 2008 I can do a right click on the database and navigate to where I can view the recovery state

Is there a script that I can run that lets me see that?  I can set with the script below...I want to see it with a script

alter database AdventureWorks
set recovery simple;
Larry Bristersr. DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AnujSQL Server DBACommented:
Select state_desc, State FROM sys.databases

Select status
FROM sysdatabases

1 = autoclose; set with ALTER DATABASE.
4 = select into/bulkcopy; set with ALTER DATABASE RECOVERY.
8 = trunc. log on chkpt; set with ALTER DATABASE RECOVERY.
16 = torn page detection, set with ALTER DATABASE.
32 = loading.
64 = pre recovery.
128 = recovering.
256 = not recovered.
512 = offline; set with ALTER DATABASE.
1024 = read only; set with ALTER DATABASE.
2048 = dbo use only; set with ALTER DATABASE RESTRICTED_USER.
4096 = single user; set with ALTER DATABASE.
32768 = emergency mode.
4194304 = autoshrink , set with ALTER DATABASE.
1073741824 = cleanly shutdown.

Anthony PerkinsCommented:
SELECT DATABASEPROPERTYEX('YourDatabaseNameGoesHere', 'Recovery')

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AnujSQL Server DBACommented:
Right click Database, Properties -> Option -> State
Anthony PerkinsCommented:
You can also do (just correct the obvious typo in xSELECT):
xSELECT recovery_model, recovery_model_desc
FROM sys.databases
WHERE name = 'YourDatabaseNameGoesHere'
Larry Bristersr. DeveloperAuthor Commented:
Exactly what I wanted on both answers
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.