dbreindex and change recovery model  
Author Message
RobHunt





PostPosted: Thu Jun 02 10:07:25 CDT 2005 Top

SQL Server >> dbreindex and change recovery model

Borrowing from Example 'E' in BOL for DBCC SHOWCONTIG (and modified to use
DBREINDEX), is there a way to programmtically change the db recovery model
to bulk-logged before this process runs, and then change it back to full at
the conclusion?

Example...?

Thanks.

--
Message posted via http://www.hide-link.com/

SQL Server45  
 
 
Tom





PostPosted: Thu Jun 02 10:07:25 CDT 2005 Top

SQL Server >> dbreindex and change recovery model Check out ALTER DATABASE in the BOL.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.


Borrowing from Example 'E' in BOL for DBCC SHOWCONTIG (and modified to use
DBREINDEX), is there a way to programmtically change the db recovery model
to bulk-logged before this process runs, and then change it back to full at
the conclusion?

Example...?

Thanks.

--
Message posted via http://www.sqlmonster.com

 
 
PeterNolan





PostPosted: Thu Jun 02 10:12:03 CDT 2005 Top

SQL Server >> dbreindex and change recovery model Yes

before...
alter database YourDatabase set Recovery BULK_LOGGED

after
alter database YourDatabase set Recovery Simple
or
alter database YourDatabase set Recovery Full

Depending on your cup of tea...

Enjoy
Peter



> Borrowing from Example 'E' in BOL for DBCC SHOWCONTIG (and modified to use
> DBREINDEX), is there a way to programmtically change the db recovery model
> to bulk-logged before this process runs, and then change it back to full at
> the conclusion?
>
> Example...?
>
> Thanks.
>
> --
> Message posted via http://www.sqlmonster.com
>
 
 
The





PostPosted: Thu Jun 02 10:14:21 CDT 2005 Top

SQL Server >> dbreindex and change recovery model Wow, that's easy. Thanks guys...

--
Message posted via http://www.sqlmonster.com
 
 
AlejandroMesa





PostPosted: Thu Jun 02 10:17:35 CDT 2005 Top

SQL Server >> dbreindex and change recovery model See "alter database" in BOL.

Example:

use master
go

alter database northwind
set recovery bulk_logged
go


AMB



> Borrowing from Example 'E' in BOL for DBCC SHOWCONTIG (and modified to use
> DBREINDEX), is there a way to programmtically change the db recovery model
> to bulk-logged before this process runs, and then change it back to full at
> the conclusion?
>
> Example...?
>
> Thanks.
>
> --
> Message posted via http://www.sqlmonster.com
>