Search This Blog

Showing posts with label shutdown. Show all posts
Showing posts with label shutdown. Show all posts

Friday, February 21, 2020

sybase shutdown commands and usage

This article shows us the various shutdown methods of ASE database from isql prompt

1. Normal Shutdown of ASE DB:  Adaptive Server will be shut down from which the shutdown command is issued
Usage
>shutdown
>go

2. Shutdown with no wait:  Adaptive Server will be shut down immediately
Usage
>shutdown with nowait
>go

3. shutdown SYB_BACKUP: Shutdown local backup server
usage
>shutdown SYB_BACKUP
>go

4. shutdown REM_BACKUP: Shutdown remote server backup
usage
>shutdown REM_BACKUP
>go

5. shutdown cluster: Shuts down the current cluster
usage
>shutdown cluster
>go

6. shutdown ase1: Instance “ase1” will be shut down leaving the cluster running
usage
>shutdown ase1
>go

Monday, February 13, 2012

Oracle shutdown types

During a normal shutdown, Oracle closes all sessions . closes the database, un-mounts the data files then shut down the instance in two steps, first issuing a "free" the SGA RAM heap and eventually , terminating the background processes.

Oracle has three shutdown modes:

Normal (default) - waits for in-flight work to finish . This could take houes.

Immediate - terminates all sessions and rollbacks all uncommitted transactions. 

Abort - it aborts all sessions, leaving current DMLs for rollback and de-allocates the SGA terminating all the background processes. Note that a shutdown abort isn't dangerous. The "abort"  means Oracle will terminate all active work, which is what most of the people want during a shutdown!

The "normal" and "immediate" modes can take an extended time in you've got in-flight transactions, and lots of Oracle DBA's ensure a swift clean shutdown this manner , aborting the sessions, re-starting to allow warmstart rollback of the aborted transactions, and a shutdown immediate to shut cleanly:

SQL> shutdown abort
SQL> startup
SQL> shutdown immediate


Normal Shutdown:
A normal shutdown of an Oracle database is really rarely used. This is because the normal shutdown waits for everybody to finish their work then logoff in an orderly fashion. When a normal shutdown occurs, the database is closed in a normal manner, and all changes made within the database are flushed to the database datafiles . This is known as a “clean shutdown.”

It will simply wait forever until we  kill those sessions manually. Because of this, we frequently recommend the shutdown immediate or shutdown abort commands, which we'll discuss within the next sections. Below is the syntax for the utilization of the normal shutdown command.

SQL> shutdown

When shutdown is executed , Oracle flushes all the changes in memory out to the database datafiles . This makes database startup quicker because the database is during a consistent state.

 A clean shutdown is one that's prepared to return copy at once . A dirty shutdown is one that lands on its back; it can't come up without first recovering itself.

Shutdown Immediate:
Perhaps the simplest way to initially shutdown the database is that the shutdown immediate command. This command will prevent any new logins, then rollback any uncommitted transactions, then bring down the database. In the process of bringing down the database, Oracle will flush all the changes in memory bent the database datafiles too, a bit like a daily shutdown does. This makes database startup quicker. Below is the syntax for shutting down a database with the shutdown immediate command:

SQL> shutdown immediate

usually shutdown immediate command will work mostly, but some times when it can hang and fail to shutdown the database. In these cases, the shutdown abort command is named for.

Shutdown Abort:
The shutdown abort command is just about a guaranteed way to get your database to shutdown. It’s a “hard crash” of the database, and this will end in a extended time to start out the database copy .  you aren't really hurting the database using the shutdown abort command, and through your DBA years you'll find quite a couple of occasions to use the shutdown abort command.

A shutdown abort are often your first shutdown method of choice, since there could also be times once you must force the database down. below is the syntax for using the shutdown abort command:

SQL> shutdown  abort