An in-depth analysis of Oracle database management Create and delete database _oracle

Source: Internet
Author: User
Tags dba numeric create database oracle database

Data files for Oracle databases (files with the extension DBF) are files that are used to hold the data in the database, and system data, data dictionary data, temporary data, index data, application data, etc. are physically stored in the data file. The user's operation on the data in the database, such as inserting, deleting, modifying and querying the data, is essentially the operation of the data file. The amount of space that all data files occupy determines the size of the database capacity.

I. Overview of database Management

After the Oracle software installation is complete, the DBA should be responsible for organizing and managing the database, with the main tasks:
(1) Starting and closing the database;
(2) creating a database;
(3) Delete the database;
(4) adjusting initialization parameters;
(5) Management network.
For database management, you must have SYSDBA and sysoper roles to start, shut down, and run the database. The SYSDBA role owns all the permissions of the SYS datasheet, and the Sysoper role has all the permissions of the public data table.

Second, the database management method

(1) DOS command line mode

Command-line management is a traditional way for DBAs to manage database servers. On the database server, Oracle provides some executable files in DOS, which are stored in the bin directory. These executables can be used to perform basic functions such as startup, shutdown, logical backup, and password changes. However, this approach can only run on the database server, remote distributed management, and limited administrative functionality.

Simple steps to get to the command line management approach:

After entering DGMGRL after the command prompt, press ENTER to run the Dgmgrl.exe file;
Enter the Help command, which displays commands that can be used in the command line management mode;
Enter Help <command>, and you can view the syntax of each command, such as helps startup.

(2) Sql*plus command line mode

The Sql*plus command-line approach relies primarily on writing and using scripts to simplify work. Its commands and scripts provide more functionality than command-line methods, but command and scripting syntax requires memory and mastery.

(3) Graphical way of Database configuration assistant (dbca,database Configuration Assistant)

DBCA is a simple, flexible and powerful GUI environment. After you install Oracle database software, you can use DBCA to create and configure the database. DBCA can follow the steps to know that a user completes creating a new database, changing the configuration of an existing database, or deleting a database. After you select database options through DBCA, many database creation tasks that typically require manual execution are performed automatically. You can use DBCA to select from a list of predefined database templates, or you can use an existing database as a sample to create a template.

(4) Graphical mode of network configuration assistant (onca,oracle net Configuration Assistant) and network Manager (onm,oracle Net manager)
Used to configure information such as the Listener and Network service name for the database.

(5) Enterprise Manager (OEM) graphic mode

The OEM utilizes the Client applet program in the browser environment to complete the management task, which breaks through the client/server management mode and requires low hardware requirements. The database can be started and stopped in OEMs and can be monitored and adjusted for database performance and parameters.

III. guidelines for creating a database:

A complete database system consists of:

(1) Physical structure: That is, a series of operating system files;
(2) Logical Structure: table, index, etc.;
(3) Memory structure: SGA area, PGA area, etc.;
(4) Process structure: namely DBWR process, LGWR process and so on.
These structures are interconnected and are an organic whole. An intuitive understanding of the creation of a database is essentially a set of files, including control files, data files, redo log files, program files, execution files, and so on, on the operating system on which Oracle is based, in accordance with specific rules, and handing these files over to the Oracle database server for management. In order to start the corresponding process, service, storage and management data, that is, the establishment of a complete database system of the physical structure, logical structure, memory structure and process structure.

Iv. using DBCA to create a database

(1) Select "Start"-> "program"->oracle-oracle10g_home1-> Configuration and Migration Tool->database Configuration Assistant command, start DBCA, appear "Welcome to use" window, as shown in Figure 1:

(2) Click the Next button, the Actions window appears, and select Create DATABASE, as shown in Figure 2:

(3) Click the Next button and the Database Templates window appears, as shown in Figure 3:

(4) Click the Next button, the Database Identification window appears, and enter the global database name: Student,sid:student.cs.hubu, as shown in Figure 4:

Note: Global database name and SID

Global database name: is the full name of the database that uniquely identifies the database with any other database. The global database name is in the format <database_name>.<database_domain>. For example, Student.cs.hubu is a typical global database name. The database name part, such as student, is the simple name of the database, and the database domain section (such as Cs.hubu) specifies the domain in which the database is located, usually the same as the network domain within the enterprise. The database name portion of the global database name cannot exceed 8 characters and can contain only letters, numeric characters, and period (.) characters.

SID (System Identifier, systems Identifier): a specific routine used to identify an Oracle database. For any database, there is at least one routine that references the database. The SID can be any name that is not used by other routines on this computer. A SID is a unique identifier for an Oracle database routine, with a maximum of 8 letters and numeric characters. Each database routine corresponds to a SID and a series of database files. For example, when you create a database with Sid xxx, the database routines and their database files (initialization parameter files, control files, redo log files, and data files) are also created.

(5) Click the Next button and the Manage Options window appears, as shown in Figure 5:

(6) Click "Next" button, the "Database Identification" window appears, select "All accounts use the same password" and enter the password: password, as shown in Figure 6:

(7) Click the Next button and the Storage Options window appears, as shown in Figure 7:

(8) Click the Next button and the Database File Location window appears, as shown in Figure 8:

(9) Click the Next button and the Restore Configuration window appears, as shown in Figure 9:

(10) Click the Next button and the Database Contents window appears, as shown in Figure 10:

(11) Click the Next button and the initialization Parameters window appears, as shown in Figure 11:

(12) Click the Next button and the Database Storage window appears, as shown in Figure 12:

(13) Click the Next button and the Create Options window appears, as shown in Figure 13:

(14) Click the "Finish" button and the confirmation window appears, as shown in Figure 14:

(15) Click the Save As HTML file button to save these details as an HTML file for later viewing.
(16) Click OK, the button, the process interface that automatically creates the database appears, as shown in Figure 15:

Finally, the database Creation completion window automatically appears, as shown in Figure 16:

Note: Remember the information in Figure 16, such as the database control URL, and so on.

Click the Password Management button and the Password Management window appears, as shown in Figure 17:

In Figure 17, you can lock the account and set a new password. For security purposes, you should change the password for the default DBA account, such as SYS, SYSTEM, and lock any default accounts that are temporarily unwanted.

You can return to the database Creation Completion window by clicking the OK button.

Note: Be sure to remember the password set!

(17) in the Database Creation Completion window, click the "Exit" button to exit DBCA. This completes the operation of the DBCA database creation.

Once created, the new database's routines and OEM console services have been started in the service of Oracle-related servers, as shown in Figure 18:

V. Use DBCA to delete a database

(1) Select "Start"-> "program"->oracle-oracle10g_home1-> Configuration and Migration Tool->database Configuration Assistant command, start DBCA, appear "Welcome to use" window, as shown in Figure 1:
(2) Click the Next button, the Actions window appears, and select Delete database, as shown in Figure 19:

(3) Click Next button, the Database window appears, select a database to delete in the list of databases, this example selects student, as shown in Figure 20:

(4) Click the "Finish" button to confirm whether to continue the window, as shown in Figure 21:

(5) Click the Yes button and the procedure window for the automatic deletion of the database appears, as shown in Figure 22:

(6) The last Automatic Database deletion window, click "Yes" button, the database deleted.

The above content is the entire narration of this article, hope to be helpful to everybody.

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.