Skip to content

Instantly share code, notes, and snippets.

@JayHollingum
Last active April 22, 2022 14:03
Show Gist options
  • Save JayHollingum/5579dfa7830136a1c785c1514b7c6e9f to your computer and use it in GitHub Desktop.
Save JayHollingum/5579dfa7830136a1c785c1514b7c6e9f to your computer and use it in GitHub Desktop.
SQL Server DB List - State and Recovery Mode
use [master]
select
db.name,
db.state_desc,
db.recovery_model_desc
from
sys.databases db
where
db.name not in ('master','tempdb','model','msdb')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment