Oracle 11g creates the second instance on Linux
The Linux server host is not enough, and the tester needs a new Oracle environment for testing. Therefore, the tester is prepared to create a second instance on the existing Oracle Linux host. This Oracle Server has enough resources, so we can directly build multiple instances to meet the needs of testers.
1. Use the vnc remote tool. dbca reports the following error:
[Oracle @ ptest4 ~] $ Dbca
No protocol specified
[Oracle @ ptest4 ~] $ Exit
2. You need to set the display window:
[Root @ ptest4 ~] # Export DISPLAY = localhost: 1
[Root @ ptest4 ~] #
[Root @ ptest4 ~] # Xhost +
Access control disabled, clients can connect from any host
[Root @ ptest4 ~] # Su-oracle
[Oracle @ ptest4 ~] $ Dbca
As shown in:
3. Creation Step 3.1 Database Configuration Assistant
Start the GUI. The title also specifies the number and name of the step. In the Welcome window named "Welcome", click "next.
Select Custom Database, and then click Next.
Global Database Name box: Enter the Database Name
SID box: the same content as the database name is automatically displayed as the database instance name, which is not changed for a single instance.
3.2 continue default 3.3 atabase Credentials
Use Different Administrative Passwords
In the Password and Confirm Password columns of the table, the User Name columns SYS, SYSTEM, DBSNMP, and SYSMAN are used to enter the Password and repeat the Password (for example, the Password setting is too simple, A pop-up window will pop up before the next step to confirm acceptance of security risks ).
The sys and system password settings can be modified after the database is created.
3.4 Database File Locations
Storage Locations: Select Use Common Location for All Database Files
Database File Location: Enter/oracle/pddev1
3.5 Recovery Configuration
Specify Fast Recovery Area
If Automatic Backup is selected in the previous Management Options step, the check box is retained and is shown below:
Fast Recovery Area box: change to the directory name of the quick Recovery Area
Fast Recovery Area Size box: adjust the Size of the quick Recovery Area
3.6 Enable Archiving
Determine whether to select based on the actual requirement of archiving logs (archive must be enabled for important production systems, and archive is usually disabled for testing systems to save server space)
Click Edit Archive Mode Parameters… next to it ..., In the pop-up window:
Automatic Archiving: Keep selected by default
Archive Log File Format box: change 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 of 20% (the test database is smaller, and the production database can be allocated larger, such as 40% 60%). Select the utf8 compatible character set.
3.9 and then proceed
Click File Location Variables. Some basic parameter information is displayed, and the result is returned. Then, go to the next step,
3.10 next, select Generate Database Creation Scripts
The default value is/oracle/app/oracle/admin/powerdes/scripts. Click Finish, and then click OK on the displayed page, the/etc/oratab reading error is reported.
Wait for 55 minutes. After the database is created, click, as shown in 3.1png:
4. Verify two oracle instances
[oracle@ptest4 admin]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Fri May 22 17:02:07 2015Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select name from v$database;NAME---------POWERDESSQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[oracle@ptest4 admin]$ sqlplus sys/syspddev@pddev1 as sysdba;SQL*Plus: Release 11.2.0.1.0 Production on Fri May 22 17:02:21 2015Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select name from v$database;NAME------------------PDDEV1SQL>
By default, sqlplus/as sysdba is the first instance to be started. to log on to the second instance, you must specify the tnsping name, sqlplus sys/pwd @ PDDEV1 as sysdba;
5. Automatic random start of multiple instances
-- Assume that 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: automatic start. You can set it in/etc/rc. local to add the following content:
-Start the default first database instance.
Su-oracle <lsnrctl start
Sqlplus/as sysdba
Startup
Quit
EOF
-Start the second database instance.
Su-oracle <export ORACLE_SID = test
Sqlplus/as sysdba
Startup
Quit
EOF