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

ارجو شرح وظائف امر ALTER SYSTEM


الو11111في

Recommended Posts

اخواني اخواتي



السلام عليكم ورحمة الله وبركاتة
وبعد

ياليت يااخوان اللي يعرف عمل الاكواد التالية لايبخل علي مع التوضيح


شاكر ومقدر حسن تعااااااااااااااونكم

اخوكـــــــم
........
.......
......
.....
....
...
..
.
الو11111فــي

ALTER SYSTEM SWITCH LOGFILE;

ALTER SYSTEM ARCHIVE LOG START;
ALTER SYSTEM ARCHIVE LOG STOP;
ALTER SYSTEM ARCHIVE LOG ALL;
ALTER SYSTEM ARCHIVE LOG THREAD 1 ALL;
ALTER SYSTEM ARCHIVE LOG ALL TO 'C:\oracle\allarch';
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM DISABLE RESTRICTED SESSION;
ALTER SYSTEM SUSPEND;
ALTER SYSTEM QUIESCE RESTRICTED;
ALTER SYSTEM UNQUIESCE;
ALTER SYSTEM RESUME;
ALTER SYSTEM FLUSH SHARED_POOL;
ALTER SYSTEM FLUSH BUFFER_CACHE;

تم تعديل بواسطة الو11111في
رابط هذا التعليق
شارك

ALTER SYSTEM



Purpose
Use the ALTER SYSTEM statement to dynamically alter your Oracle Database
instance. The settings stay in effect as long as the database is mounted.

Syntax

1qw4.jpg



Symantic

archive_log_clause
The archive_log_clause manually archives redo log files or enables or disables
automatic archiving. To use this clause, your instance must have the database
mounted. The database can be either open or closed unless otherwise noted.

INSTANCE Clause
This clause is relevant only if you are using Oracle Database with the Real
Application Clusters option. Specify the name of the instance for which you want
the redo log file group to be archived. The instance name is a string of up to 80
characters. Oracle Database automatically determines the thread that is mapped to
the specified instance and archives the corresponding redo log file group. If no
thread is mapped to the specified instance, then Oracle Database returns an error.

THREAD Clause
This clause has been deprecated, because the INSTANCE clause achieves the same
purpose and is easier to use. The THREAD clause is supported for backward
compatibility. Specify the number of the thread containing the redo log file group to
be archived.

SEQUENCE Clause
Specify SEQUENCE to manually archive the online redo log file group identified by
the log sequence number integer in the specified thread. If you omit the THREAD
parameter, then Oracle Database archives the specified group from the thread
assigned to your instance.

CHANGE Clause
Specify CHANGE to manually archive the online redo log file group containing the
redo log entry with the system change number (SCN) specified by integer in the
specified thread. If the SCN is in the current redo log file group, then Oracle
Database performs a log switch. If you omit the THREAD parameter, then Oracle
Database archives the groups containing this SCN from all enabled threads.
You can use this clause only when your instance has the database open.

CURRENT Clause
Specify CURRENT to manually archive the current redo log file group of the
specified thread, forcing a log switch. If you omit the THREAD parameter, then
Oracle Database archives all redo log file groups from all enabled threads, including
logs previous to current logs. You can specify CURRENT only when the database is
open.
NOSWITCH
Specify NOSWITCH if you want to manually archive the current redo
log file group without forcing a log switch. This setting is used primarily with
standby databases to prevent data divergence when the primary database shuts
down. Divergence implies the possibility of data loss in case of primary database
failure.
You can use the NOSWITCH clause only when your instance has the database
mounted but not open. If the database is open, then this operation closes the
database automatically. You must then manually shut down the database before
you can reopen it.

GROUP Clause
Specify GROUP to manually archive the online redo log file group with the GROUP
value specified by integer. You can determine the GROUP value for a redo log file
group by querying the data dictionary view DBA_LOG_GROUPS. If you specify both
the THREAD and GROUP parameters, then the specified redo log file group must be
in the specified thread.

LOGFILE Clause
Specify LOGFILE to manually archive the online redo log file group containing the
redo log file member identified by 'filename'. If you specify both the THREAD and
LOGFILE parameters, then the specified redo log file group must be in the specified
thread.
If the database was mounted with a backup controlfile, then specify USING BACKUP
CONTROLFILE to permit archiving of all online logfiles, including the current
logfile.
Restriction on the LOGFILE clause You must archive redo log file groups in the
order in which they are filled. If you specify a redo log file group for archiving with
the LOGFILE parameter, and earlier redo log file groups are not yet archived, then
Oracle Database returns an error.

NEXT Clause
Specify NEXT to manually archive the next online redo log file group from the
specified thread that is full but has not yet been archived. If you omit the THREAD
parameter, then Oracle Database archives the earliest unarchived redo log file group
from any enabled thread.

ALL Clause
Specify ALL to manually archive all online redo log file groups from the specified
thread that are full but have not been archived. If you omit the THREAD parameter,
then Oracle Database archives all full unarchived redo log file groups from all
enabled threads.

START Clause
In earlier releases, this clause enabled automatic archiving of redo log file groups
for the thread assigned to your instance. This clause has been deprecated, because
Oracle Database automatically enables automatic archiving of redo log file groups.
This clause has no effect. If you specify it, Oracle Database writes a message to the
alert log.

TO location Clause
Specify TO 'location' to indicate the primary location to which the redo log file
groups are archived. The value of this parameter must be a fully specified file
location following the conventions of your operating system. If you omit this
parameter, then Oracle Database archives the redo log file group to the location
specified by the initialization parameters LOG_ARCHIVE_DEST or LOG_ARCHIVE_
DEST_n.

STOP Clause
In earlier releases, this clause disabled automatic archiving of redo log file groups
for the thread assigned to your instance. This clause has been deprecated. It has no
effect, and if you specify it, Oracle Database writes a message to the alert log.
checkpoint_clause
Specify CHECKPOINT to explicitly force Oracle Database to perform a checkpoint,
ensuring that all changes made by committed transactions are written to datafiles
on disk. You can specify this clause only when your instance has the database open.
Oracle Database does not return control to you until the checkpoint is complete.

GLOBAL
In a Real Application Clusters environment, this setting causes Oracle
Database to perform a checkpoint for all instances that have opened the database.
This is the default.

LOCAL
In a Real Application Clusters environment, this setting causes Oracle
Database to perform a checkpoint only for the thread of redo log file groups for the
instance from which you issue the statement.

تم تعديل بواسطة moody_4u
رابط هذا التعليق
شارك

وين الناس الفاهم في الاوركل


رجااااااااااااااااااااااااااااااااااااااء خاااااااااااااااااااااااااااااااااااااااااااص

رابط هذا التعليق
شارك

اخوي موضوع الشرح بالعربي يمكن يكون صعب في بعض المواضيع

بعدين كونك dba يعني ان لغتك المفروض تكون قوية او لازم تقوي لغتك الانجليزية لان كل المواضيع والمراجع القوية لن تجد لها نصا عربيا
بعض المصطلحات حين تحاول تفسيرها الى العربية تفقد معناها ويصبح الشرح فيها صعبا

على العموم سوف ابحث لك عن شرح مبسط لهذه الاوامر

تحياتي

رابط هذا التعليق
شارك

السلام عليكم ابحاول اشرح الاورامر قدر المستطاع بالعربي

ALTER SYSTEM SWITCH LOGFILE;
هذا الامر لتغير الريدو لوق (redo log) من الملف الحالي الي التالي
ALTER SYSTEM ARCHIVE LOG START;
هذا الا مر لبدء الارشفه الاتومتيكية لجميع ملفات التسجيل يعني بالعربي ما تحتاج انك تعمل ارشفه لكل ملف تسجيل بعد ما يذهب النظام للملف الاخر وهذا الافضل عند وضع قواعد البيانات في وضع الارشفه
ALTER SYSTEM ARCHIVE LOG STOP;
هذا الامر لتوقيف الارشفه الاتوماتيكيه يعني انك تحتاج انك تعمل ارشفه لكل ملف تسجيل يدوي
ALTER SYSTEM ARCHIVE LOG ALL;
هذا الامر تحتاجه عند الارشفه اليدويه

وهذا المثال لتوضيح الفرق بين الارشفه اليدويه والاتومتيكيه(لاكن يجب ان تكون قواعد البيانات في وضع الارشفه):
1-ادخل الsqlplus كا system او sys
2- نفذ alter system archive log start
3-نفذ alter system switch logfile اربع مرات
4-الان شيك علي مكان الارشفه تبي تحصل ملفات وتقدر تشيك علي موقع الملفات بالامر التالي archive log list
5-الان غير الارشفه لتجعلها يدوية بالامر التالي alter system archive log stop
6-اعد الخطوة 3 .
7- سوف تلاحظ ان مع الامر الثالث يهنق معاك
8-افتح sqlplus اخر ونفذ الامر التالي alter system archive log all
9-ارجع لاول وسوف تجده رجع لك.



ALTER SYSTEM ENABLE RESTRICTED SESSION;
هذا الامر لسماح فقط للمستخدمين الي معهم صلاحية restrictedللاتصال بقواعد البييانات وتستخدم في حالة الصيانة
ALTER SYSTEM DISABLE RESTRICTED SESSION;
وهذا لالغاء والسماح لجميع المستخدمين بالاتصال بقواعد البيانات;
ALTER SYSTEM FLUSH SHARED_POOL;
هذا لتفريغ الشيرد بول
ALTER SYSTEM FLUSH BUFFER_CACHE
وهذا لتفريغ البفر كاش

رابط هذا التعليق
شارك

  • بعد 1 شهر...

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية