1. Create a Directory
$ORACLE _base/admin/
$ORACLE _base/oradata
$ORACLE _base/flash_recovery_area
2, the initialization of the parameter file
CD $ORACLE _home/dbs
Db_name=orcl
memory_target=1g
processes = 150
Audit_file_dest= '/oracle/app/product/admin/orcl/adump '
Audit_trail = ' db '
db_block_size=8192
Db_domain= "
Db_recovery_file_dest= '/oracle/app/product/flash_recovery_area '
db_recovery_file_dest_size=2g
Diagnostic_dest= '/oracle/app/product '
Dispatchers= ' (protocol=tcp) (SERVICE=ORCLXDB) '
open_cursors=300
Remote_login_passwordfile= ' EXCLUSIVE '
Undo_tablespace= ' UNDOTBS1 '
Control_files = (/oracle/app/product/oradata/ora_control1,/oracle/app/product/oradata/ora_control2,/oracle/app/ PRODUCT/ORADATA/ORA_CONTROL3)
compatible = ' 11.2.0 '
Undo_management=auto
3. Create a password file
Orapwd file= $ORACLE _HOME/DBS/ORAPWORCL password=oracle force=y
4. Build the Library
A, create SPFile
$ Sqlplus '/as sysdba '
Sql> create SPFile from Pfile; (will automatically read pfile: $ORACLE _home/dbs/init$oracle_sid.ora)
B. Automatically create a control file during the start of the Nomount status creation database------
sql> startup Nomount;
Sql> @/home/oracle/createdb.sql-------------------Create a database
Create a Watch script
Create DATABASE ORCL Controlfile reuse
Maxinstances 8 Maxdatafiles 2000
Maxloghistory 2 Maxlogfiles maxlogmembers 5
Character Set ZHS16GBK national character set Al16utf16
LogFile Group 1 ('/oracle/app/product/oradata/orcl/redo1.log ') size 50M reuse,
Group 2 ('/oracle/app/product/oradata/orcl/redo2.log ') size 50M reuse,
Group 3 ('/oracle/app/product/oradata/orcl/redo3.log ') size 50M reuse
DataFile '/oracle/app/product/oradata/orcl/system.dbf ' size 1024M reuse autoextend on next 100M maxsize unlimited extent M Anagement Local
Sysaux datafile '/oracle/app/product/oradata/orcl/sysaux.dbf ' size 1024M autoextend on next 100M MaxSize Unlimited
Default temporary tablespace temp tempfile '/oracle/app/product/oradata/orcl/temp01.dbf ' size 100M reuse autoextend on NE XT 10M MaxSize Unlimited
Undo tablespace undotbs1 DataFile '/oracle/app/product/oradata/orcl/undotbs1.dbf ' size 100M reuse autoextend on next 10M m Axsize Unlimited
User SYS identified by "Oracle", user SYSTEM identified by "Oracle";
C, run the data dictionary script, where catalog and Catproc are required, other optional: (Long running time)
Sql> Spool/opt/oradata/cat_testdb.log
Sql> @?/rdbms/admin/catalog.sql----------------(build data dictionary view)-----------------------must be
Sql> @?/rdbms/admin/catproc.sql-----------(build stored procedure package)-----------------------------------must be
Sql> @?/rdbms/admin/catblock.sql-----------(several views related to building locks)
Sql> @?/rdbms/admin/catoctk.sql----------(Build Password toolkit dbms_crypto_toolkit)
Sql> @?/rdbms/admin/owminst.plb---------------(Building workspace Management related objects, such as DMBS_WM)
Sql> Spool Off
D, new Sqlplus properties and help, Users table space
Sql> Connect system/oracle
Sql> @?/sqlplus/admin/pupbld.sql
Sql> @?/sqlplus/admin/help/hlpbld.sql Helpus.sql
Sql> Connect/as SYSDBA
sql> CREATE tablespace USERS LOGGING datafile '/oracle/app/product/oradata/orcl/users01.dbf ' SIZE 1024M reuse Autoextend on NEXT 100m MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
sql> ALTER DATABASE DEFAULT tablespace USERS;
Sql> execute utl_recomp.recomp_serial ();
Configure Network Listener Sqlnet.ora Tnsname.ora
Set up and configure EM (omit this step):
sql> @?/sysman/admin/emdrep/sql/emreposcre/oracle/product/10.2 Sysman Oracle TEMP on;
sql> alter user Sysman identified by ' Sysman ' account unlock;
sql> alter user DBSNMP identified by ' dbsnmp ' account unlock;
Sql> host Emca-config Dbcontrol db-silent-db_unique_name ypyhtb-port 1521-em_home/oracle/product/10.2/bin-listen ER listener-service_name YPYTHB. Lk-sys_pwd "Oracle"-sid ypythb-oracle_home/oracle/product/10.2-dbsnmp_pwd "Dbsnmp"-host "172.19.201.184"-listener_ Oh/oracle/product/10.2-log_file/oradata/ypythb/emconfig.log-sysman_pwd "Sysman";
This article is from the "11300506" blog, please be sure to keep this source http://11310506.blog.51cto.com/11300506/1961543
Oracle Manual library process under Linux