Login or Sign Up to become a member!

EXPERTS, INFORMATION, IDEAS & KNOWLEDGE

Social bookmarker Add this

Your profile

Search

November 2008
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

XML Feeds

Tags: administration

All the LessThanDot Journals

Find Out The Recovery Model For Your Database

by SQLDenis


Permalink 30 Aug 2008 08:18 , Categories: Data Modelling & Design Tags: administration, database, sql, sql server

You want to quickly find out what the recovery model is for your database but you don’t want to start clicking and right-clicking in SSMS/Enterprise Manager to get that information. This is what you can do, you can use databasepropertyex to get that info. Replace ‘msdb’ with your database name

  1. SELECT DATABASEPROPERTYEX(‘msdb’,‘Recovery’)

What if you want it for all databases in one shot? No problem here is how, this will work on SQL Server version 2000

  1. SELECT name,DATABASEPROPERTYEX(name,‘Recovery’)
  2.  FROM sysdatabases

For SQL Server 2005 and up, you should use the following command

  1. SELECT name,recovery_model_desc
  2. FROM sys.databases

I have also added this to our SQL Server admin Wiki here: Find Out The Recovery Model For Your Database
Make sure to check out the other wiki entries

If you have a SQL related question try our Microsoft SQL Server Programming forum or our Microsoft SQL Server Admin forum

Leave a comment »Send a trackback » 737 views

How to Rebuild System Databases in SQL Server 2008

by SQLDenis


Permalink 29 Aug 2008 12:45 , Categories: Data Modelling & Design Tags: administration, sql server 2008, system databases

The PSS SQL Server Engineers made a nice blogpost explaining How to Rebuild System Databases in SQL Server 2008

In SQL Server 2005, we introduced a different method than in previous versions to rebuild system databases (affectionately known as “rebuild master"). You were required to use the setup.exe program with command line switches.

This is no different in SQL Server 2008 but the command line switches have changed some and the process behind the scenes to rebuild the system databases (master, model, and msdb) is also a bit different.

The cool part about the way they are doing this is that you don’t need your DVD anymore!

You should bookmark that page immediately so that you can find it when you need and before you suffer that enormous panic attack :-)

2 comments »Send a trackback » 287 views