Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata
DBCC DBREBOOT allows shutdown of an individual database in order to clear a problem that is impacting the database, and then restarted so that 
the database is made available once more.
  • This command is useful for phantom locks

Note:The DBCC DBREBOOT command should be used with caution, and it must not be considered as fail-safe. There are many different circumstances under which a database might need a reboot. Be aware it terminates running tasks and it is not always possible for ASE to completely cleanup these processes .
There is a known bug that can cause dbreboot to generate an infected with signal 11, see KBA 2588493 for details and to determine if the bug is fixed in your version.

Syntax

dbcc dbreboot (report | reboot | reboot_norecovery | shutdown | shutdown_load | restart | restart_norecovery, <dbname1> [, <dbname2> ...,<dbname16>])

Option
Description
"report"Provide a listing of active processes and transaction in the database(s) what will be affected by a shutdown
"reboot"Shutdown the database(s) forcibly and reboot the database(s). Recover on reboot.
"reboot_norecovery"Shutdown the database(s) forcibly and reboot the database(s). Do not recovery on reboot. This command is useful if the database to be extended with ALTER DATABASE in order to allocate more log space that is causing recovey failure.
"shutdown"Shutdown the databse(s) forcibly. The database is left in an unuseable state. Some sort of 'restart' must be done or a 'shutdown_load' in order to make the database useable.
"shutdown_load"Shutdown the database(s) forcibly and leave the database in a state that allows a LOAD DATABASE to be done.
"restart"Reboot the database(s).This command can only be used on database that has already been shutdow. Recovery is run when the database is restarted.
"restart_norecovery"Reboot the database(s). Do not recover on reboot. This command can only be used on a database that has already been shutdown. Recovery is not run when the database is restarted and the database is left in 'not recovered' state. In this state, the database cannot be accessed by anyone but the SA. However it is useful if there is some sort of problem during recovery
<dbname1>,...<dbname16>A list of databases to which the command should be applied. At least one database must be specified with all but the 'report' command

Example 1

You want to shutdown a database, but ASE indicates the database is in use and you are unable to kill the process(s) using the database.

1> drop database testreboot

2> go
Msg 3702, Level 16, State 4:
Server 'pds', Line 1:
Cannot drop the database 'testreboot' because it is currently in use.
1> dbcc traceon(3604)
2> go
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.
1> dbcc dbreboot(report, testreboot)
2> go
---------- Active Processes and Transactions in Database 'testreboot'----------

  Spid Program      Transaction      Status          CPU     I/O    Blk  Error
21 isql recv sleep 0 0 0 0

Operation on Database 'testreboot' Completed Successfully ----------
1> dbcc dbreboot(reboot,testreboot)
2> go
00:00000:00019:2009/02/06 09:31:04.47 server ---------- Shutting Down Database

'testreboot' ----------
00:00000:00019:2009/02/06 09:31:10.41 server Process id 21 killed by Hostname vicky, Host process id 8589.
00:00000:00019:2009/02/06 09:31:17.22 server ---------- Re-starting Database 'testreboot' With Recovery ----------
00:00000:00019:2009/02/06 09:31:19.73 server Log contains all committed transactions until 2009/02/06 09:22:09.03 for database testreboot.
00:00000:00019:2009/02/06 09:31:30.73 server ---------- Operation on Database 'testreboot' Completed Successfully ----------
---------- Shutting Down Database 'testreboot' ----------
---------- Re-starting Database 'testreboot' With Recovery ----------
Recovering database 'testreboot'.
Started estimating recovery log boundaries for database 'testreboot'.
Database 'testreboot', checkpoint=(926, 48), first=(926, 48), last=(926, 48).
Completed estimating recovery log boundaries for database 'testreboot'.
Started ANALYSIS pass for database 'testreboot'.
Completed ANALYSIS pass for database 'testreboot'.
Started REDO pass for database 'testreboot'. The total number of log records to process is 1.
Completed REDO pass for database 'testreboot'.
Recovery of database 'testreboot' will undo incomplete nested top actions.
Started filling free space info for database 'testreboot'.
Completed filling free space info for database 'testreboot'.
Started cleaning up the default data cache for database 'testreboot'.
Completed cleaning up the default data cache for database 'testreboot'.
Recovery complete.
Database 'testreboot' is now online.
---------- Operation on Database 'testreboot' Completed Successfully ----------
1> drop database testreboot
2> go 

  • No labels