Creating and deleting databases from Oracle database management

Source: Internet
Author: User

I. Overview of database Management

After completing the Oracle Software installation, the DBA should be responsible for organizing and managing the database, with the main tasks of:
(1) Start and close the database;
(2) Create a database;
(3) Delete the database;
(4) Adjustment of initialization parameters;
(5) Management network.
For database management, you must have SYSDBA and sysoper roles to be able to start, shut down, and run the database. The SYSDBA role has all the permissions of the SYS data table, and the role of Sysoper has all the permissions of the public data table.
Second, the management method of the database
(1) DOS command line mode
Command-line management is the traditional way for DBAs to manage database servers. On the database server, Oracle provides some executable files in DOS mode, which are stored in the bin directory. These executables can be used to complete basic functions such as startup, shutdown, logical backup, and password changes. However, this method can only be run on the database server, remote distributed management is not possible, and the management function is limited.
A simple step into the command line management method:
After entering DGMGRL at the command line 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&gt, and you can view the syntax for each command, such as the.
(2) Sql*plus command line mode
The Sql*plus command-line approach relies primarily on writing and using scripts to simplify the work. The commands and scripts provide more functions than the command line, but the syntax of commands and scripts need to be memorized and mastered.
(3) Database Configuration Assistant (dbca,database configuration Assistant) Graphical way
DBCA is an easy-to-operate, flexible and powerful GUI environment. After you install the Oracle database software, you can use DBCA to create and configure the database. DBCA can follow the steps to know that a user finishes creating a new database, changes the configuration of an existing database, or deletes a database. After selecting the database option 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) Network Configuration Assistant (onca,oracle net config Assistant) and network Manager (onm,oracle Net manager) graphic mode
Information such as the Listener and Network service name used to configure the database.
(5) Enterprise Manager (OEM) graphic mode
The OEM uses the Client applet program in the browser environment to complete the management task, breaking through the client/server management mode and low hardware requirements. You can start and stop the database in an OEM, and you can monitor and adjust the performance and parameters of the database.
III. guidelines for creating databases:
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: DBWR process, LGWR process and so on.
These structures are interconnected and are an organic whole. Intuitive understanding of the database creation process, essentially on the operating system on which Oracle is based, according to specific rules, the establishment of a series of files, including control files, data files, redo log files, program files, execute files and so on, and these files to the Oracle database server for Management, In order to start the corresponding process, service, storage and management data, that is, the formation of a complete database system of the physical structure, logical structure, memory structure and process structure.
Iv. creating a database using DBCA
(1) Select "Start", "program"->oracle-oracle10g_home1-> Configuration and porting Tool->database Config Assistant command, start DBCA, "Welcome" Windows, 1:


Figure 1


(2) Click the "Next" button, the "Actions" window appears, and select "Create Database", 2:

Figure 2


(3) Click the "Next" button, the "Database Templates" window appears, 3:

Figure 3


(4) Click the "Next" button, the "Database Identification" window appears, and enter the global database name: student,sid:student.cs.hubu,4:

Figure 4


Note: The 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 a simple name for the database, and the database domain part (such as Cs.hubu) specifies the domain in which the database resides, 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): 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 and can have up to 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 a SID of XXX, both the database routines and their database files (initialization parameter files, control files, redo log files, and data files) are created at the same time.

(5) Click the "Next" button, the "Management options" window appears, 5:

Figure 5


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

Figure 6


(7) Click the "Next" button, the "Storage Options" window appears, 7:

Figure 7


(8) Click the "Next" button, the "Database File location" window appears, 8:

Figure 8


(9) Click the "Next" button, the "Recovery Configuration" window appears, 9:

Figure 9


(10) Click the "Next" button, the "Database Contents" window appears, 10:

Figure 10


(11) Click the "Next" button, the "Initialization Parameters" window appears, 11:

Figure 11


(12) Click the "Next" button, the "Database Storage" window appears, 12:

Figure 12


(13) Click the "Next" button, the "Create Options" window appears, 13:

Figure 13


(14) Click the "Finish" button, the "Confirmation" window appears, 14:

Figure 14


(15) Click the "Save as HTML file" button to save the details as an HTML file for later viewing.
(16) Click "OK" button, the process interface of automatically creating the database appears, 15:

Figure 15


Finally, the Database Creation completion window appears automatically, 16:

Figure 16


Note: Remember the information in Figure 16, such as the database Control URL.

Click the Password Management button, the Password Management window appears, 17:

Figure 17


In Figure 17, you can lock the account contact and set a new password. For security reasons, you should change the password for the default DBA account (such as SYS, SYSTEM) here, and lock all default accounts that are temporarily not required.
Click the OK button to return to the database Creation completion window.
Note: Be sure to remember the password set!

(17) in the Database Creation Complete window, click the "Exit" button to exit DBCA. In this DBCA, the operation to create the database ends.

After creation, the services of the Oracle-related server, the routine of the new database and the service of the OEM console have been started, 18:

Figure 18


V. Using DBCA to delete a database
(1) Select "Start", "program"->oracle-oracle10g_home1-> Configuration and porting Tool->database Config Assistant command, start DBCA, "Welcome" Windows, 1:
(2) Click the "Next" button, the "Actions" window appears, and select "Delete Database", 19:

Figure 19


(3) Click the Next button, the Database window appears, select a database in the database list to delete, this example select student,20:

Figure 20


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

Figure 21


(5) Click "Yes" button, the process window for automatically deleting the database appears, 22:

Figure 22


(6) Finally, the Database Delete Complete window appears, click the "Yes" button, the database is deleted.

Creating and deleting databases from Oracle database management

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.