Storage Management--deep Oracle 9i Core

Source: Internet
Author: User
Tags execution log rollback
Brain--Control file

The role of the control file
Control the contents of a file
(1) as shown in Figure 11.1.
(2) The General Information tab of the Edit control file appears as shown in Figure 11.2.
(3) Figure 11.3 shows the record document Segment tab of the edit control file.


A total of 8 categories of information are recorded in the record document segment, and the meaning of each parameter is shown in table 11.1.
Table 11.1 Control the contents of the document segment of a file
Parameter name Parameter meaning
DATABASE Information about the database
CKPT PROGRESS Information that can be tracked for each checkpoint of a database routine
REDO THREAD Displays the number of threads assigned to the database redo log
REDO LOG Displays the number of redo log groups and the maximum number of databases currently assigned
DataFile Displays the number of data files created in the database and the maximum number allowed
FILENAME Displays the number of file names stored in the control file, including data files, redo log files, and control files
Tablespace Displays the number of tablespaces that can be created in the database
LOG HISTORY Displays the maximum redo log entries and the number of redo logs currently assigned

Folder--Table space

Querying table space for information
(1) as shown in Figure 11.4.
(2) The name of the table space is displayed in the name cell.
(3) In the Type cell, the type of tablespace is displayed, and there are 3 types.
(4) The management method of tablespace local space is displayed in the "Zone management" cell. There are two types of.
(5) Displays the size of the table space setting in the size cell.
(6) Displays the amount of space already used in the table space in the Used cell.

Create a table space
(1) as shown in Figure 11.5.

(2) The General Information tab of the Create table space as shown in Figure 11.6 appears.
(3) switch to the Storage tab of the Create table space as shown in Figure 11.7.

(4) After the successful creation of the table space, appear as shown in Figure 11.8, click the OK button.

(5) The SQL code to create the table space above is as follows.
―――――――――――――――――――――――――――――――――――――
CREATE tablespace "Temptablespace"
LOGGING
DataFile ' C:\ORACLE\ORADATA\MYORACLE\TEMPTABLESPACE. ORA ' SIZE
5M Reuse EXTENT MANAGEMENT Local
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 11th Chapter \createtablespace.sql.
Table Space Offline
1. When do I need to take the table space offline
Make some databases unavailable and allow normal access to other parts of the database.
Perform an offline tablespace backup, although it can be backed up even when the table space is online or in use.
Make an application and its set of tables temporarily unavailable when updating or maintaining the application.
2.4 Methods of offline table space
Table 11.2 4 ways to go offline in a table space

Method name Perform an action
Normal offline Checkpoints are used for all data files in a tablespace (all of which must be available)
Temporarily offline Use checkpoints for all online data files in a table space
Offline now Oracle does not guarantee the availability of data files and does not use any checkpoint
Media recovery offline This action is used to perform checkpoint recovery operations, which can replicate the data files of the backed-up tablespace and be used to archive log files

3. Steps for offline operation
(1) as shown in Figure 11.9.
(2) appear as shown in Figure 11.10, "Offline Operation Confirmation" interface, click the button.


Table Space Online

(1) as shown in Figure 11.11.
(2) The "Online Operation Confirmation" interface appears as shown in Figure 11.12.

Data Warehouse--Data files

Querying data files for information
(1) as shown in Figure 11.13.

(2) The name cell displays the path and name of the data file.
(3) The table space cell displays the tablespace in which the data file resides.
(4) The size cell displays the space size of the data file.
(5) The "used" cell displays the amount of space that the data file has occupied.
(6) The occupancy rate cell shows the percentage of space that has been used for the total space.

Create a data file

(1) as shown in Figure 11.14.
(2) The General Information tab of the Create data file appears as shown in Figure 11.15.
(3) switch to the Store tab of the Create data file as shown in Figure 11.16.


(4) After the successful creation of the data file, the interface shown in Figure 11.17 appears.

(5) The SQL code for the above created data file is as follows.
―――――――――――――――――――――――――――――――――――――
ALTER tablespace "Temptablespace"
ADD
DataFile ' C:\ORACLE\ORADATA\MYORACLE\TEMPDATAFILE.ora ' SIZE
5M Autoextend
On NEXT 100K MAXSIZE Unlimited
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 11th Chapter \createdatafile.sql.

Data files are offline and offline

(1) as shown in Figure 11.18.
(2) The interface appears as shown in Figure 11.19.


Preparedness--back to the paragraph

Table 11.3 Type of paragraph

The name of the segment The role of the paragraph
Data segment A collection of areas that store data for a table or cluster
Index segment A collection of extents that store index data
Rollback segment Stores information to undo, and some books are also called rollback segments
Temporary paragraph A temporary segment is established when the SQL statement requires temporary space. Once the execution is completed, the space occupied by the temporary segment will be returned to the system

What is a fallback segment
A fallback segment is a special type of data segment that records the original value of data after a transaction has been manipulated, so the data in the fallback section can be used to restore the database.
Create a fallback segment
(1) as shown in Figure 11.20.

(2) The General Information tab for the Create fallback segment as shown in Figure 11.21 appears.
(3) switch to the Save tab of the Create fallback segment as shown in Figure 11.22.

(4) The interface appears as shown in Figure 11.23.

(5) Open the initialization file Init.ora of the database, where the setting parameters for the fallback segment are as follows.
―――――――――――――――――――――――――――――――――――――
# System-managed undo and fallback segments
Undo_management=auto
Undo_tablespace=undotbs
―――――――――――――――――――――――――――――――――――――
Change the above code to the following code.
―――――――――――――――――――――――――――――――――――――
# System-managed undo and fallback segments
Undo_management=manual
Undo_tablespace=undotbs
―――――――――――――――――――――――――――――――――――――
(6) as shown in Figure 11.24.
(7) The interface after successful creation of the fallback segment is shown in Figure 11.25.

(8) The SQL code for the above creation fallback segment is as follows.
―――――――――――――――――――――――――――――――――――――
CREATE public ROLLBACK SEGMENT "Temprollbacksegment"
Tablespace "Undotbs"
STORAGE (INITIAL 10K
NEXT 10K
Maxextents 5);
ALTER ROLLBACK SEGMENT "Temprollbacksegment" ONLINE;
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 11th Chapter \createrollbacksegment.sql.

Black box-Redo log Group

How the Redo Log Group works

The Redo log file group records all changes to the database, and works as shown in Figure 11.26.

Query default redo log group information

(1) as shown in Figure 11.27.

(2) The status of the Redo log group is displayed under the status cell. There are 4 different states.
(3) The number of the group is displayed in the group cell.
(4) The number of log files that the group contains is displayed in the number of members cell.
(5) The archived cell shows whether the log group has been archived.
(6) In the size cell, the size of the log group is displayed.
(7) The serial number of the log group is displayed in the sequence cell.
(8) In the first change number cell, the system change number for the log group record is displayed, and the number is used for recovery.

Create Redo Log Group

(1) as shown in Figure 11.28.
(2) The General Information tab of the Create Redo log group, as shown in Figure 11.29, appears.

(3) The interface appears as shown in Figure 11.30.

(4) The SQL code for the above creation Redo log group is as follows.
―――――――――――――――――――――――――――――――――――――
ALTER DATABASE
ADD LOGFILE GROUP 4
(' C:\ORACLE\ORADATA\MYORACLE\logMYORACLE4.ora ') SIZE 1024K
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 11th Chapter \createredologgroup.sql.

Historical Archive-Archive log

Change the log working mode for a database

(1) The General Information tab of the edit database configuration as shown in Figure 11.31.
(2) The "Recovery" tab of the Edit database configuration as shown in Figure 11.32.

(3) The "Database Fibrillation" interface appears as shown in Figure 11.33.


Archive of log files

(1) The results of the execution are shown in Figure 11.34.
―――――――――――――――――――――――――――――――――――――
ALTER SYSTEM ARCHIVE LOG START;
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 11th chapter \ Archivelog.sql.

(2) If you execute the following SQL code, you will manually archive all of the log files that are not archived.
―――――――――――――――――――――――――――――――――――――
ALTER SYSTEM ARCHIVE LOG all;
―――――――――――――――――――――――――――――――――――――
"See CD-ROM File": 11th chapter \ Archivealllog.sql.

Information for archived log files

(1) as shown in Figure 11.35.
(2) The General Information tab of the Edit archive log appears as shown in Figure 11.36.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.