إنتقال للمحتوى

  • تسجيل الدخول عبر الفيس بوك تسجيل الدخول عبر تويتر Log In with LinkedIn Log In with Google      تسجيل دخول    
  • إنشاء حساب

صورة
- - - - -

How To Make Shut Down And Restart For My Db


1 رد (ردود) على هذا الموضوع

#1 moon14sun14

moon14sun14

    عضو نشط

  • الأعضــاء
  • 334 مشاركة

تاريخ المشاركة 15 November 2007 - 09:07 AM

شكرا على ردودكم

بس ممكن اعرف اخ عمر كيف اقدر اعمل SHUT DOWN AND RESTART FOR MY DB
مع خالص تحياتي اختكم moon14sun14

#2 mrashaideh

mrashaideh

    مشترك

  • الأعضــاء
  • 50 مشاركة
  • البـلـد: Country Flag

تاريخ المشاركة 15 November 2007 - 10:31 AM

Dear
to shutdown and restart the databse
first u have to connect as sysdba

do the following

connect / as sysdba

sql> shutdown ;
sql> startup;

but notice that there is parameters for shutdown and start up.

Shutting Down with the NORMAL Clause

To shut down a database in normal situations, use the SHUTDOWN command with the
NORMAL clause:
SHUTDOWN NORMAL
The NORMAL clause is optional, because this is the default shutdown method if no
clause is provided.
Normal database shutdown proceeds with the following conditions:
■ No new connections are allowed after the statement is issued.
■ Before the database is shut down, the database waits for all currently connected
users to disconnect from the database.
The next startup of the database will not require any instance recovery procedures.

Shutting Down with the IMMEDIATE Clause
Use immediate database shutdown only in the following situations:
■ To initiate an automated and unattended backup
■ When a power shutdown is going to occur soon
■ When the database or one of its applications is functioning irregularly and you
cannot contact users to ask them to log off or they are unable to log off
To shut down a database immediately, use the SHUTDOWN command with the
IMMEDIATE clause:
Note: You cannot shut down a database if you are connected to
the database through a shared server process.
Shutting Down a Database
3-10 Oracle Database Administrator’s Guide
SHUTDOWN IMMEDIATE
Immediate database shutdown proceeds with the following conditions:
■ No new connections are allowed, nor are new transactions allowed to be started,
after the statement is issued.
■ Any uncommitted transactions are rolled back. (If long uncommitted transactions
exist, this method of shutdown might not complete quickly, despite its name.)
■ Oracle Database does not wait for users currently connected to the database to
disconnect. The database implicitly rolls back active transactions and disconnects
all connected users.
The next startup of the database will not require any instance recovery procedures.
Shutting Down with the TRANSACTIONAL Clause
When you want to perform a planned shutdown of an instance while allowing active
transactions to complete first, use the SHUTDOWN command with the TRANSACTIONAL
clause:

SHUTDOWN TRANSACTIONAL
Transactional database shutdown proceeds with the following conditions:
■ No new connections are allowed, nor are new transactions allowed to be started,
after the statement is issued.
■ After all transactions have completed, any client still connected to the instance is
disconnected.
■ At this point, the instance shuts down just as it would when a SHUTDOWN
IMMEDIATE statement is submitted.
The next startup of the database will not require any instance recovery procedures.
A transactional shutdown prevents clients from losing work, and at the same time,
does not require all users to log off.
Shutting Down with the ABORT Clause
You can shut down a database instantaneously by aborting the database instance. If
possible, perform this type of shutdown only in the following situations:
The database or one of its applications is functioning irregularly and none of the other
types of shutdown works.
■ You need to shut down the database instantaneously (for example, if you know a
power shutdown is going to occur in one minute).
■ You experience problems when starting a database instance.
When you must do a database shutdown by aborting transactions and user
connections, issue the SHUTDOWN command with the ABORT clause:
SHUTDOWN ABORT
An aborted database shutdown proceeds with the following conditions:
■ No new connections are allowed, nor are new transactions allowed to be started,
after the statement is issued.
Quiescing a Database
Starting Up and Shutting Down 3-11
■ Current client SQL statements being processed by Oracle Database are
immediately terminated.
■ Uncommitted transactions are not rolled back.
■ Oracle Database does not wait for users currently connected to the database to
disconnect. The database implicitly disconnects all connected users.
The next startup of the database will require instance recovery procedures.


Starting an Instance Without Mounting a Database
You can start an instance without mounting a database. Typically, you do so only
during database creation. Use the STARTUP command with the NOMOUNT clause:
STARTUP NOMOUNT

Starting an Instance and Mounting a Database
You can start an instance and mount a database without opening it, allowing you to
perform specific maintenance operations. For example, the database must be mounted
but not open during the following tasks:
■ Enabling and disabling redo log archiving options. For more information, please
refer to Chapter 7, "Managing Archived Redo Logs".
■ Performing full database recovery. For more information, please refer to Oracle
Database Backup and Recovery Basics
The following command starts an instance and mounts the database, but leaves the
database closed:
STARTUP MOUNT

Forcing an Instance to Start
In unusual circumstances, you might experience problems when attempting to start a
database instance. You should not force a database to start unless you are faced with
the following:
■ You cannot shut down the current instance with the SHUTDOWN NORMAL,
SHUTDOWN IMMEDIATE, or SHUTDOWN TRANSACTIONAL commands.
■ You experience problems when starting an instance.
If one of these situations arises, you can usually solve the problem by starting a new
instance (and optionally mounting and opening the database) using the STARTUP
command with the FORCE clause:
STARTUP FORCE
If an instance is running, STARTUP FORCE shuts it down with mode ABORT before
restarting it. In this case, beginning with Oracle Database 10g Release 2, the alert log
shows the message "Shutting down instance (abort)" followed by "Starting
ORACLE instance (normal)." (Earlier versions of the database showed only
"Starting ORACLE instance (force)" in the alert log.)


i hope this will answer you question.