Because the work requires a new database instance in the Oracle11gR2 database. We recommend that you use oracle to perform the following operations. The sequence is as follows: 1. Create an instance to start
Because the work requires a new database instance in the Oracle 11gR2 database. We recommend that you use oracle to perform the following operations. The sequence is as follows: 1. Create an instance to start
Startup nomount pfile = "/u01/oracle/product/11.2.0.1/db1/dbs/initcrm. ora ";
Create database "crm"
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE '/u01/oracle/oradata/system01.dbf' SIZE 1024 M REUSE
EXTENT MANAGEMENT LOCAL
Sysaux datafile '/u01/oracle/oradata/sysaux01.dbf' SIZE 500 M REUSE
Smallfile default temporary tablespace temp tempfile '/u01/oracle/oradata/temp01.dbf' SIZE 20 M REUSE
Smallfile undo tablespace "UNDOTBS1" DATAFILE '/u01/oracle/oradata/undo01.dbf' SIZE 300 M REUSE
Character set ZHS16GBK
National character set AL16UTF16
Logfile group 1 ('/u01/oracle/oradata/log01.dbf') SIZE 50 M,
GROUP 2 ('/u01/oracle/oradata/log02.dbf') SIZE 50 M,
GROUP 3 ('/u01/oracle/oradata/log03.dbf') SIZE 50 M;
Create USERS tablespace
Create smallfile tablespace "USERS" logging datafile '/u01/app/oradata/user01.dbf' SIZE 1000 M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACEManagement auto;
Alter database default tablespace "USERS ";
------------------------------------------
SQL> create spfile from pfile;
File created.
-----------------------------------------
Sqlplus/as sysdba
SQL> show user;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catalog. SQL;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catblock. SQL;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catproc. SQL;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catoctk. SQL;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/owminst. plb;
Compile with the system user
@/U01/oracle/product/11.2.0.1/db1/sqlplus/admin/pupbld. SQL;
@/U01/oracle/product/11.2.0.1/db1/sqlplus/admin/help/hlpbld. SQL helpus. SQL;
Compile with sys user
@/U01/oracle/product/11.2.0.1/db1/javavm/install/initjvm. SQL;
@/U01/oracle/product/11.2.0.1/db1/xdk/admin/initxml. SQL;
@/U01/oracle/product/11.2.0.1/db1/xdk/admin/xmlja. SQL;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catjava. SQL;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catexf. SQL;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catqm. SQL change_on_install SYSAUX TEMP YES;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catxdbj. SQL;
@/U01/oracle/product/11.2.0.1/db1/rdbms/admin/catrul. SQL;
Spool/oracle/admin/edidb/scripts/ordinst. log append
@/U01/oracle/product/11.2.0.1/db1/ord/admin/ordinst. SQL SYSAUX;
Spool off
Spool/u01/oracle/admin/ora11g/scripts/interMedia. log append
@/U01/oracle/product/11.2.0.1/db1/ord/im/admin/iminst. SQL;
Spool off
Set echo on
Spool/oracle/admin/edidb/scripts/lockAccount. log append
BEGIN
FOR item IN (select username from DBA_USERS WHERE ACCOUNT_STATUS IN ('open', 'locked', 'expired') and username not in (
'Sys ', 'system '))
LOOP
Dbms_output.put_line ('locking and Expiring: '| item. USERNAME );
Execute immediate 'alter user' |
Sys. dbms_assert.enquote_name (
Sys. dbms_assert.schema_name (
Item. USERNAME), false) | 'password expire account lock ';
End loop;
END;
/
Spool off
At this point, the database instance has been created.
6. Configure tns and listenser/U01/oracle/product/11.2.0.1/db1/network/admin/
Tnsnames. ora
CRM = (DESCRIPTION =
(ADDRESS_LIST = (ADDRESS =
(PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521)
)
)
(CONNECT_DATA = (SERVICE_NAME = crm)
)
)
Listener. oraThere are many listener methods. If the requirement is not high, we recommend that you use the original listener. The advantage is that the listener changes slightly. The disadvantage is that the public listener of different instances may be inconvenient.
Listener. ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME =/u01/oracle/product/11.2.0.1/db1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = crm)
(ORACLE_HOME =/u01/oracle/product/11.2.0.1/db1)
(SID_NAME = crm)
)
)
Single configuration listening: