Linux server hosts are not enough, and testers need a new Oracle environment for testing, so they are ready to build a second instance on an existing Oracle Linux host. The Oracle server's resources are sufficient, so you can build multiple instances directly above to meet the needs of testers.
1, using the VNC remote tool in, DBCA error is as follows:
[[Email protected] ~] $ DBCA
NO protocol specified
[[Email protected] ~]$ exit
2, you need to set the display window:
[Email protected] ~]# export display=localhost:1
[Email protected] ~]#
[Email protected] ~]# Xhost +
Access control disabled, clients can connect from any host
[Email protected] ~]# su-oracle
[Email protected] ~]$ DBCA
as shown in the following:
< copyright, the article allows reprint, but must be linked to the source address, otherwise investigate legal liability!>
Original Blog Address: http://blog.csdn.net/mchdba/article/details/46053753
Hara Douglas Fir (MCHDBA)
3, create step 3.1 Database Configuration Assistant
The graphical interface starts. The title also indicates the number of steps and the name of the step. In the Welcome window of step name welcome, click Next directly.
Select Custom Database, and then next
Global Database Name box: Enter the names of the databases identified earlier
Sid Box: Automatically appears with the same database name as the database instance name, no changes in the single instance case
3.2 Continue default 3.3 atabase Credentials
Use Different administrative passwords
The password and Confirm password columns in the table enter the password and repeat the input for the User Name column sys, SYSTEM, DBSNMP, and Sysman users (for example, the password setting is too simple and a pop-up prompt confirms acceptance of the security risk before the next step).
SYS and system password settings can be modified after the database is established.
3.4 Database File Locations
Storage Locations: Select Use Common location for all Database Files
Database File Location Box: input/ORACLE/PDDEV1
3.5 Recovery Configuration
Specify Fast Recovery Area
If automatic backup is selected for the previous management options step, leave the check box selected and below:
Fast Recovery Area Box: Modify the directory name for the quick recovery zone
Fast Recovery area Size box: Adjust the size of the quick recovery zone
3.6 Enable Archiving
Decide whether or not to choose if the actual requirements of the archived logs (important production systems must be open for archiving, test systems typically shut down the archive saves server space)
Click Next to edit Archive Mode Parameters ..., in the pop-up window:
Automatic Archiving: Keep the default check box
Archive Log File Format box: Modify to%t_%s_%r.arc
Archive Log Destinations Table: Enter/oracle/pddev1/archivelog in the first row
Click OK to return to the main window
Database Content
Database Components page
3.7 Then proceed to the next step 3.8 initialization Parameters
Memory allocation 20% (test library so smaller, the production library can be allocated larger such as 40%60%, etc.), character set selection compatible with UTF8 options
3.9 then Next
Click File Location Variables, you can see some basic parameter information, return, and then direct the next step,
3.10 Then Next, select Generate Database Creation Scripts
The default is/oracle/app/oracle/admin/powerdes/scripts, and then choose Click Finish button, then pop up the interface click OK button, there is an error saying/etc/oratab read errors, can ignore.
after waiting for 55 minutes, the database is created and then clicked, as shown in 3.1png below :
4, verify 2 Oracle Instances
[Email protected] admin]$ Sqlplus/as sysdbasql*plus:Release 11.2. 0. 1. 0Production onFri May A -: Geneva: - -Copyright (c)1982, the, Oracle. AllRights reserved. Connected to: Oracle Database OneG Enterprise EditionRelease 11.2. 0. 1. 0- -bitProduction withThe partitioning, OLAP, Data Mining andReal Application Testing Optionssql>SelectName from V$database;name---------Powerdessql>ExitDisconnected from Oracle Database OneG Enterprise EditionRelease 11.2. 0. 1. 0- -bitProduction withThe partitioning, OLAP, Data Mining andReal application Testing Options[[email protected] admin]$ sqlplus Sys/[email protected] as SYSDBA; Sql*plus:Release 11.2. 0. 1. 0Production onFri May A -: Geneva: + -Copyright (c)1982, the, Oracle. AllRights reserved. Connected to: Oracle Database OneG Enterprise EditionRelease 11.2. 0. 1. 0- -bitProduction withThe partitioning, OLAP, Data Mining andReal Application Testing Optionssql>SelectName from V$database;name------------------Pddev1sql>
The default Sqlplus/as SYSDBA is the first instance to start, if you want to log in to the second instance, you need to specify Tnsping name, Sqlplus sys/[email protected] as SYSDBA;
5, about automatic random start of multi-instance
--Suppose one instance is ITSM and the other is Test
Export ORACLE_SID=ITSM
Sqlplus/as SYSDBA
Startup
Quit
Export Oracle_sid=test
Sqlplus/as SYSDBA
Startup
Quit
PS: Auto Start, can be set in/etc/rc.local, add the following content
– Start the default first DB instance
Su-oracle < Lsnrctl start
Sqlplus/as SYSDBA
Startup
Quit
Eof
– Start a second DB instance
Su-oracle < export oracle_sid=test
Sqlplus/as SYSDBA
Startup
Quit
Eof
ORACLE 11g establishes a second instance on Linux