Larry Brister
asked on
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;
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;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Right click Database, Properties -> Option -> State
untitled.bmp
untitled.bmp
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Exactly what I wanted on both answers
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.