Home>

oracle database data files (files with the extension dbf) are files used to save data in the database,System data, data dictionary data, temporary data, index data, application data, etc. are all physically stored in data files.User operations on data in the database,Such as data insertion, deletion, modification, and query.Its essence is to operate on data files.The size of the space occupied by all data files determines the size of the database capacity.

I. Overview of Database Management

After completing the oracle software installation,dba should be responsible for organizing and managing the database,Its main tasks are:

(1) Start and close the database;

(2) Create a database;

(3) Delete the database;

(4) Adjust the initialization parameters;

(5) Management network.

For database management,You must have the roles of sysdba and sysoper in order to start, shut down, and run the database.The sysdba role has all permissions on the sys data table.The sysoper role has all permissions on the public data table.

Second, the database management method

(1) dos command line

Command line management is the traditional way for DBA to manage database servers.On the database server,oracle provides some executable files in dos mode,Stored in the bin directory. These executables can be used for basic functions such as startup, shutdown, logical backup, and password change.But this method can only run on the database server,No remote distributed management,And management functions are limited.

Simple steps to enter the command line management mode:

Enter dgmgrl at the command prompt and press Enter to run the dgmgrl.exe file;

Entering the help command will display the commands that can be used in the command line management mode;

Enter help<command>to view the syntax of each command,Such as help startup.

(2) sql * plus command line mode

The sql * plus command line method mainly relies on writing and using scripts to simplify work.Its commands and scripts provide more functions than the command line.But the syntax of commands and scripts needs to be remembered and mastered.

(3) Graphical mode of database configuration assistant (DBCA)

dbca is a simple, flexible and powerful GUI environment. After installing the oracle database software,You can use dbca to create and configure databases.dbca can follow the steps to know that the user has finished creating a new database, changing the configuration of an existing database, or deleting a database.After selecting the database option through dbca,Many database creation tasks that usually need to be performed manually are performed automatically.Use dbca to choose from a list of predefined database templates,You can also use an existing database as a sample for creating a template.

(4) Graphical mode of network configuration assistant (onca, oracle net configuration assistant) and network manager (onm, oracle net manager)

Used to configure database listener and network service names.

(5) Graphical mode of Enterprise Manager (OEM)

oem uses the client applet program in the browser environment to complete management tasks,Broke through the client/server management model,Low hardware requirements.You can start and stop the database in oem,The performance and parameters of the database can be monitored and adjusted.

Third, the criteria for creating a database:

A complete database system includes:

(1) Physical structure:a series of operating system files;

(2) Logical structure:tables, indexes, etc.

(3) Memory structure:sga area, pga area, etc .;

(4) Process structure:dbwr process, lgwr process, etc.

These structures are interconnected,It is an organic whole.Intuitive understanding of the database creation process,In essence, on the operating system on which Oracle is based,According to specific rules,Create a series of documents,Including control files, data files, redo log files, program files, execution files, etc.And hand these files to the oracle database server for management,In order to initiate processes, services, storage and management data,That is, the physical structure, logical structure, memory structure, and process structure of a complete database system are established.

Fourth, use dbca to create a database

(1) Select "Start"->"Programs"->oracle-oracle10g_home1->Configuration and Migration Tool->database configuration assistant command, start dbca, the "Welcome" window appears, as shown in Figure 1:

(2) Click the "Next" button, the "Action" window appears, and select "Create Database", as shown in Figure 2:

(3) Click the "Next" button, the "Database Template" 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:The full database name that uniquely identifies the database and any other database.The format of the global database name is<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,The database domain section (such as cs.hubu) specifies the domain where the database is located,It is 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 only contain alphabetic, numeric characters, and period (.) Characters.

sid (system identifier):a specific routine used to identify the oracle database.For any database,Each has at least one routine that references the database.sid can be any name not used by other routines on this computer.sid is the unique identifier of the oracle database routine,There can be no more than 8 alphanumeric characters.Each database routine corresponds to a sid and a series of database files.For example, when creating a database with sid xxx,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, as shown in Figure 5:

(6) Click the "Next" button. The "Database Identification" window appears. Select "Use the same password for all accounts" and enter the password:password, as shown in Figure 6:

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

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

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

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

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

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

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

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

(15) Click the "Save as html file" button to save these details as html files for later viewing.

(16) Click the "OK" button, the process interface of automatic database creation appears,As shown in Figure 15:

Finally, the database creation completion window appears automatically.As shown in Figure 16:

Note:To remember the relevant information in Figure 16,Such as database control url.

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

In Figure 17, the account contact can be locked,Set a new password.For safety reasons,You should change the password of the default dba account (such as sys, system) here, and lock all the default accounts that are temporarily not needed.

Click the "OK" button to return to the database creation completion window.

Note:Be sure to remember the password you set!

(17) In the database creation completion window,Click the "Exit" button to exit dbca. At this point, the dbca database creation operation is over.

Once created,In the service of the oracle-related server,The new database routines and the oem console service have been started,As shown in Figure 18:

Five, use dbca to delete the database

(1) Select "Start"->"Programs"->oracle-oracle10g_home1->Configuration and Migration Tool->database configuration assistant command, start dbca, the "Welcome" window appears, as shown in Figure 1:

(2) Click the "Next" button, the "Operation" window appears, and select "Delete Database", as shown in Figure 19:

(3) Click the "Next" button, the "Database" window appears, select a database to delete in the database list,In this example, student is selected, as shown in Figure 20:

(4) Click the "Finish" button. A confirmation window appears.As shown in Figure 21:

(5) Click the "Yes" button, the process window of automatic database deletion appears,As shown in Figure 22:

(6) The database deletion complete window appears automatically at the end,Click the "Yes" button, the database is deleted.

  • Previous Java GUI programming list and combo box design use
  • Next SQL server 2008 database optimization commonly used scripts