一:操作步骤
---1:手工建库 官方文档位置----Database Administration---》Administrator's Guide----》2 Creating and Configuring an Oracle Database----1、Specify an Instance Identifier (SID) prod----2、建立目录,在$ORACLE_BASE/admin/下建立$ORACLE_SID的目录,再创建子目录/adump(存储审计文件的目录),/dpdump/u01/app/oracle/admin/prod/{a,dp}/u01/app/oracle/fast_recovery_area/{prod,PROD}----建立目录,在$ORACLE_BASE/oradata/下建立$ORACLE_SID的目录/u01/app/oracle/oradata/prod----3、设置oracle用户环境变量实例名为prodexport ORACLE_SID=prod----4、创建参数文件cat $ORACLE_HOME/dbs/init.ora |grep -v ^# >initprod.oravi initprod.oradb_name='prod'memory_target=512Mprocesses = 150audit_file_dest='/u01/app/oracle/admin/prod/adump'audit_trail ='db'db_block_size=8192db_domain=''db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'db_recovery_file_dest_size=4182Mdiagnostic_dest='/u01/app/oracle'dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'open_cursors=300remote_login_passwordfile='EXCLUSIVE'undo_tablespace='UNDOTBS1'control_files = ('/u01/app/oracle/oradata/prod/control01.ctl','/u01/app/oracle/oradata/prod/control02.ctl','/u01/app/oracle/oradata/prod/control03.ctl')compatible ='11.2.0.4'----5、创建密码文件orapwd =orapwprod password=oracle----6、启动实例(NOMOUNTT状态)startup nomount----7、运行建库脚本 prod LOGFILE 1 ('/u01/app/oracle/oradata/prod/redo01.log') 100M, 2 ('/u01/app/oracle/oradata/prod/redo02.log') 100M, 3 ('/u01/app/oracle/oradata/prod/redo03.log') 100M MAXLOGFILES 50 MAXLOGMEMBERS 5 MAXLOGHISTORY 10 MAXDATAFILES 100 MAXINSTANCES 1 US7ASCII AL16UTF16 DATAFILE '/u01/app/oracle/oradata/prod/system01.dbf' 325M REUSE EXTENT MANAGEMENT SYSAUX DATAFILE '/u01/app/oracle/oradata/prod/sysaux01.dbf' 325M REUSE TABLESPACE users DATAFILE '/u01/app/oracle/oradata/prod/users01.dbf' 100M REUSE TABLESPACE tempts TEMPFILE '/u01/app/oracle/oradata/prod/temp01.dbf' 20M REUSE UNDO TABLESPACE undotbs1 DATAFILE '/u01/app/oracle/oradata/prod/undotbs01.dbf' 200M REUSE AUTOEXTEND MAXSIZE UNLIMITED;----8、运行创建数据字典脚本创建数据字典视图> @?/rdbms/admin/.创建PL/SQL的软件包和过程> @?/rdbms/admin/catproc.>@$ORACLE_HOME/sqlplus/admin/pupbld.
二:具体实验:
1:创建有些文件目录。
[root@localhost ~]# su - oracle---进入oracle base目录[oracle@localhost ~]$ cd /u01/app/oracle/[oracle@localhost oracle]$ pwd/u01/app/oracle[oracle@localhost oracle]$ lsadmin cfgtoollogs checkpoints diag fast_recovery_area oradata product--进入admin目录 [oracle@localhost oracle]$ cd admin[oracle@localhost admin]$ lsorcl---创建新的SID :neworcl[oracle@localhost admin]$ mkdir neworcl[oracle@localhost admin]$ lsneworcl orcl[oracle@localhost admin]$[oracle@localhost admin]$[oracle@localhost admin]$ pwd/u01/app/oracle/admin[oracle@localhost admin]$ lsneworcl orcl[oracle@localhost admin]$ cd neworcl/[oracle@localhost neworcl]$ mkdir dpdump[oracle@localhost neworcl]$ mkdir adump[oracle@localhost neworcl]$ lsadump dpdump---adump 存放的是审计信息--dpdump 存放的是:主要是数据泵的一个目录[oracle@localhost neworcl]$ ls ../orcladump dpdump pfile wallet[oracle@localhost neworcl]$
---切换$ORACLE_BASE 目录下[oracle@localhost neworcl]$ cd ..[oracle@localhost admin]$ lsneworcl orcl[oracle@localhost admin]$ cd ..[oracle@localhost oracle]$ lsadmin cfgtoollogs checkpoints diag fast_recovery_area oradata product[oracle@localhost oracle]$###在 闪回恢复区 fast_recovery_area 文件夹中创建2个文件夹 neworcl NEWORCL [oracle@localhost oracle]$ lsadmin cfgtoollogs checkpoints diag fast_recovery_area oradata product[oracle@localhost oracle]$ cd fast_recovery_area/[oracle@localhost fast_recovery_area]$ lsorcl ORCL[oracle@localhost fast_recovery_area]$ pwd/u01/app/oracle/fast_recovery_area[oracle@localhost fast_recovery_area]$ mkdir NEWORCL[oracle@localhost fast_recovery_area]$ lsNEWORCL orcl ORCL[oracle@localhost fast_recovery_area]$ mkdir neworcl[oracle@localhost fast_recovery_area]$ lsneworcl NEWORCL orcl ORCL[oracle@localhost fast_recovery_area]$ pwd/u01/app/oracle/fast_recovery_area[oracle@localhost fast_recovery_area]$
###在 oradate 目录下 创建 neworcl 目录 [oracle@localhost fast_recovery_area]$ pwd/u01/app/oracle/fast_recovery_area[oracle@localhost fast_recovery_area]$ cd ..[oracle@localhost oracle]$ pwd/u01/app/oracle[oracle@localhost oracle]$ lsadmin cfgtoollogs checkpoints diag fast_recovery_area oradata product[oracle@localhost oracle]$ cd oradata/[oracle@localhost oradata]$ lsorcl PROD1[oracle@localhost oradata]$ mkdir neworcl[oracle@localhost oradata]$ lsneworcl orcl PROD1[oracle@localhost oradata]$
##创建目的是用来存放:数据文件和日志文件和控制文件[oracle@localhost oradata]$ pwd/u01/app/oracle/oradata[oracle@localhost oradata]$ cd neworcl/[oracle@localhost neworcl]$ pwd/u01/app/oracle/oradata/neworcl[oracle@localhost neworcl]$
2:指定数据库的ORACLE_SIE=neworcl
[oracle@localhost neworcl]$ expexp expand expdp expdpO expO export expr[oracle@localhost neworcl]$ export ORACLE_SID=neworcl [oracle@localhost neworcl]$ echo $ORACLE_SID neworcl [oracle@localhost neworcl]$3: 创建一个参数文件 initneworcl.ora 并 创建口令文件 orapwneworcl 及其数据用户密码为 oracle
##切换到oracle的家目录[oracle@localhost neworcl]$ cd ../../product/11.2.0/db_1/dbs/[oracle@localhost dbs]$ pwd/u01/app/oracle/product/11.2.0/db_1/dbs[oracle@localhost dbs]$
# 利用init.oracl 文件来创建 initneworcl.ora 初始化参数文件[oracle@localhost dbs]$ lsdbsorapwPROD1 hc_orcl.dat hc_PROD1.dat init.ora initorcl.ora initPROD1.ora lkORCL lkPROD1 my.dbf orapworcl spfileorcl.ora spfilePROD1.ora tem.dbf[oracle@localhost dbs]$ cat init.ora | grep -v ^# > initneworcl.ora[oracle@localhost dbs]$ lsdbsorapwPROD1 hc_PROD1.dat init.ora initPROD1.ora lkPROD1 orapworcl spfilePROD1.orahc_orcl.dat initneworcl.ora initorcl.ora lkORCL my.dbf spfileorcl.ora tem.dbf[oracle@localhost dbs]$
#修改 neworcl 的静态参数文件信息: initneworcl.ora[oracle@localhost dbs]$ vi initneworcl.ora[oracle@localhost dbs]$ cat initneworcl.ora#指定数据库名称db_name='NEWORCL'#指定数据库内存大小memory_target=300m#指定数据库进程数processes = 150#指定数据库审计的位置audit_file_dest='/u01/app/oracle/admin/neworcl/adump'#指定审计的级别: db 为数据库级别 audit_trail ='db'#指定数据库块的大小db_block_size=8192#数据库域的名称db_domain=''#闪回恢复区的位置db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'#闪回恢复区的大小 db_recovery_file_dest_size=2G#adi 的目录 ;组件的资料库diagnostic_dest='/u01/app/oracle'# 协议dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'#游标的个数open_cursors=300#使用口令文件的方式remote_login_passwordfile='EXCLUSIVE'#undo 表空间的名称 undo_tablespace='UNDOTBS1'#控制文件:control_files = ('/u01/app/oracle/fast_recovery_area/neworcl/control01.ctl','/u01/app/oracle/oradata/neworcl/control02.ctl')#数据库版本 compatible ='11.2.0.3.0'[oracle@localhost dbs]$
#创建口令文件 orapwneworcl[oracle@localhost dbs]$ lsdbsorapwPROD1 hc_PROD1.dat init.ora initPROD1.ora lkPROD1 orapworcl spfilePROD1.orahc_orcl.dat initneworcl.ora initorcl.ora lkORCL my.dbf spfileorcl.ora tem.dbf[oracle@localhost dbs]$ orapwd file=orapwneworcl password=oracle[oracle@localhost dbs]$ lsdbsorapwPROD1 hc_PROD1.dat init.ora initPROD1.ora lkPROD1 orapwneworcl spfileorcl.ora tem.dbfhc_orcl.dat initneworcl.ora initorcl.ora lkORCL my.dbf orapworcl spfilePROD1.ora[oracle@localhost dbs]$4:处理数据库启动的时候:ORA-01078, LRM-00123错误 ;原因是:
原来在initneworcl.ora 的文件, 我自己在注释部分加入了中文.
不能有中文呀, 连注释都不行.
同时修改了 initneworcl.ora 文件的数据库名称为小写
[oracle@localhost dbs]$ rlwrap sqlplus / as sysdba;SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 7 22:53:23 2018Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.SYS@neworcl> startup nomount;ORA-01078: failure in processing system parametersLRM-00123: invalid character 135 found in the input fileSYS@neworcl> quitDisconnected[oracle@localhost dbs]$ echo $ORACLE_SIDneworcl[oracle@localhost dbs]$ cat initneworcl.ora#指定数据库名称db_name='neworcl'#指定数据库内存大小memory_target=300m#指定数据库进程数processes = 150#指定数据库审计的位置audit_file_dest='/u01/app/oracle/admin/neworcl/adump'#指定审计的级别: db 为数据库级别 audit_trail ='db'#指定数据库块的大小db_block_size=8192#数据库域的名称db_domain=''#闪回恢复区的位置db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'#闪回恢复区的大小 db_recovery_file_dest_size=2G#adi 的目录 ;组件的资料库diagnostic_dest='/u01/app/oracle'# 协议dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'#游标的个数open_cursors=300#使用口令文件的方式remote_login_passwordfile='EXCLUSIVE'#undo 表空间的名称 undo_tablespace='UNDOTBS1'#控制文件:control_files = ('/u01/app/oracle/fast_recovery_area/neworcl/control01.ctl','/u01/app/oracle/oradata/neworcl/control02.ctl')#数据库版本 compatible ='11.2.0.3.0'[oracle@localhost dbs]$ export $ORACLE_SID =neworcl-bash: export: `=neworcl': not a valid identifier[oracle@localhost dbs]$ export $ORACLE_SID=neworcl[oracle@localhost dbs]$ echo $ORACLE_SIDneworcl[oracle@localhost dbs]$ rlwrap sqlplus / as sysdba;SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 7 22:56:44 2018Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.SYS@neworcl> startup nomount;ORA-01078: failure in processing system parametersLRM-00123: invalid character 135 found in the input fileSYS@neworcl> quitDisconnected[oracle@localhost dbs]$ lsdbsorapwPROD1 hc_PROD1.dat init.ora initPROD1.ora lkPROD1 orapwneworcl spfileorcl.ora tem.dbfhc_orcl.dat initneworcl.ora initorcl.ora lkORCL my.dbf orapworcl spfilePROD1.ora[oracle@localhost dbs]$ vi initneworcl.ora#指定数据库名称#指定数据库内存大小#指定数据库进程数#指定数据库审计的位置#指定审计的级别: db 为数据库级别 #指定数据库块的大小#数据库域的名称#闪回恢复区的位置#闪回恢复区的大小 #adi 的目录 ;组件的资料库# 协议#游标的个数#使用口令文件的方式#undo 表空间的名称 db_name='neworcl'memory_target=300mprocesses = 150audit_file_dest='/u01/app/oracle/admin/neworcl/adump'audit_trail ='db'db_block_size=8192db_domain=''db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'db_recovery_file_dest_size=2Gdiagnostic_dest='/u01/app/oracle'dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'open_cursors=300remote_login_passwordfile='EXCLUSIVE'undo_tablespace='UNDOTBS1'control_files = ('/u01/app/oracle/fast_recovery_area/neworcl/control01.ctl','/u01/app/oracle/oradata/neworcl/control02.ctl')compatible ='11.2.0.3.0'~"initneworcl.ora" 17L, 561C written[oracle@localhost dbs]$ rlwrap sqlplus / as sysdba;SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 7 22:58:08 2018Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.SYS@neworcl> startup nomount;ORACLE instance started.Total System Global Area 313860096 bytesFixed Size 1344652 bytesVariable Size 209718132 bytesDatabase Buffers 96468992 bytesRedo Buffers 6328320 bytesSYS@neworcl> quitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - ProductionWith the Partitioning, OLAP, Mining and Real Application Testing options[oracle@localhost dbs]$ cat initneworcl.oradb_name='neworcl'memory_target=300mprocesses = 150audit_file_dest='/u01/app/oracle/admin/neworcl/adump'audit_trail ='db'db_block_size=8192db_domain=''db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'db_recovery_file_dest_size=2Gdiagnostic_dest='/u01/app/oracle'dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'open_cursors=300remote_login_passwordfile='EXCLUSIVE'undo_tablespace='UNDOTBS1'control_files = ('/u01/app/oracle/fast_recovery_area/neworcl/control01.ctl','/u01/app/oracle/oradata/neworcl/control02.ctl')compatible ='11.2.0.3.0'[oracle@localhost dbs]$5:创建数据库,并检测数据创建情况
---进入sqlplus --启动数据库进入nomount状态--创建数据库[oracle@localhost dbs]$ rlwrap sqlplus / sysdba;*Plus: Release 11.2.0.3.0 Production Thu Jun 7 23:03:38 2018Copyright (c) 1982, 2011, Oracle. rights reserved.Connected an idle instance.SYS@neworcl> startup nomount;ORACLE instance started.Total System Area 313860096 bytesFixed 1344652 bytesVariable 209718132 bytes Buffers 96468992 bytesRedo Buffers 6328320 bytesSYS@neworcl> instance_name ,status v$intance; instance_name ,status v$intance *ERROR line 1:ORA-01219: : queries allowed fixed tables/views SYS@neworcl> instance_name ,status v$instance;INSTANCE_NAME STATUS---------------- ------------neworcl STARTEDSYS@neworcl> neworcl 2 LOGFILE 1 ('/u01/app/oracle/oradata/neworcl/redo01a.log','/u01/app/oracle/oradata/neworcl/redo01b.log') 100M BLOCKSIZE 512, 3 2 ('/u01/app/oracle/oradata/neworcl/redo02a.log','/u01/app/oracle/oradata/neworcl/redo02b.log') 100M BLOCKSIZE 512, 4 3 ('/u01/app/oracle/oradata/neworcl/redo03a.log','/u01/app/oracle/oradata/neworcl/redo03b.log') 100M BLOCKSIZE 512 5 MAXLOGFILES 5 6 MAXLOGMEMBERS 5 7 MAXLOGHISTORY 1 8 MAXDATAFILES 100 9 US7ASCII 10 AL16UTF16 11 EXTENT MANAGEMENT 12 DATAFILE '/u01/app/oracle/oradata/neworcl/system01.dbf' 325M REUSE 13 SYSAUX DATAFILE '/u01/app/oracle/oradata/neworcl/sysaux01.dbf' 325M REUSE 14 TABLESPACE users 15 DATAFILE '/u01/app/oracle/oradata/neworcl/users01.dbf' 16 500M REUSE AUTOEXTEND MAXSIZE UNLIMITED 17 TABLESPACE tempts1 18 TEMPFILE '/u01/app/oracle/oradata/neworcl/temp01.dbf' 19 20M REUSE 20 UNDO TABLESPACE UNDOTBS1 21 DATAFILE '/u01/app/oracle/oradata/neworcl/undotbs01.dbf' 22 200M REUSE AUTOEXTEND MAXSIZE UNLIMITED; created.SYS@neworcl>
新开一个窗口,来查看数据库创建的这些情况:
[oracle@localhost neworcl]$ cd /u01/app/oracle/oradata/neworcl/[oracle@localhost neworcl]$ lscontrol02.ctl redo01a.log redo01b.log redo02a.log redo02b.log redo03a.log redo03b.log sysaux01.dbf system01.dbf[oracle@localhost neworcl]$ tail -f /u01/app/oracle/diag/rdbms/neworcl/neworcl/trace/alert_neworcl.logCompleted: ALTER DATABASE DEFAULT TABLESPACE USERSprocessing ?/rdbms/admin/dfmap.bsqprocessing ?/rdbms/admin/denv.bsqprocessing ?/rdbms/admin/drac.bsqprocessing ?/rdbms/admin/dsec.bsqprocessing ?/rdbms/admin/doptim.bsqprocessing ?/rdbms/admin/dobj.bsqprocessing ?/rdbms/admin/djava.bsqprocessing ?/rdbms/admin/dpart.bsqprocessing ?/rdbms/admin/drep.bsqprocessing ?/rdbms/admin/daw.bsqprocessing ?/rdbms/admin/dsummgt.bsqprocessing ?/rdbms/admin/dtools.bsqprocessing ?/rdbms/admin/dexttab.bsqprocessing ?/rdbms/admin/ddm.bsqprocessing ?/rdbms/admin/dlmnr.bsqprocessing ?/rdbms/admin/ddst.bsqThu Jun 07 23:19:56 2018SMON: enabling tx recoveryStarting background process SMCOThu Jun 07 23:19:56 2018SMCO started with pid=20, OS id=4736replication_dependency_tracking turned off (no async multimaster replication found)Starting background process QMNCThu Jun 07 23:19:58 2018QMNC started with pid=21, OS id=4738Completed: CREATE DATABASE neworcl LOGFILE GROUP 1 ('/u01/app/oracle/oradata/neworcl/redo01a.log','/u01/app/oracle/oradata/neworcl/redo01b.log') SIZE 100M BLOCKSIZE 512, GROUP 2 ('/u01/app/oracle/oradata/neworcl/redo02a.log','/u01/app/oracle/oradata/neworcl/redo02b.log') SIZE 100M BLOCKSIZE 512, GROUP 3 ('/u01/app/oracle/oradata/neworcl/redo03a.log','/u01/app/oracle/oradata/neworcl/redo03b.log') SIZE 100M BLOCKSIZE 512 MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 EXTENT MANAGEMENT LOCAL DATAFILE '/u01/app/oracle/oradata/neworcl/system01.dbf' SIZE 325M REUSE SYSAUX DATAFILE '/u01/app/oracle/oradata/neworcl/sysaux01.dbf' SIZE 325M REUSE DEFAULT TABLESPACE users DATAFILE '/u01/app/oracle/oradata/neworcl/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/u01/app/oracle/oradata/neworcl/temp01.dbf' SIZE 20M REUSE UNDO TABLESPACE UNDOTBS1 DATAFILE '/u01/app/oracle/oradata/neworcl/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED6:运行新的数据库脚本:
@?/rdbms/admin/catalog.sql @?/rdbms/admin/catproc.sql@?/sqlplus/admin/pupbld.sqlEXIT
SYS@neworcl>SYS@neworcl> -- End of pupbld.sql----当手工建库的脚本执行完毕后,查看数据库的状态:此时数据库的状态已经为 open SYS@neworcl> status v$instance;STATUS------------1 row selected.SYS@neworcl>
7:当打开一个新的shh窗口的时候;进入 新建的数据库 neworcl 时的操作方法
login: Thu Jun 7 22:35:12 2018 192.168.242.1[root@localhost ~]# su - oracle[oracle@localhost ~]$ cat .bash_profile# .bash_profile# the aliases functions [ -f ~/.bashrc ]; . ~/.bashrcfi# specific environment startup programsPATH=$PATH:$HOME/binexport ORACLE_SID=orclexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export PATH=$PATH:$ORACLE_HOME/binexport ORACLE_TERM=xtermexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/libexport CLASSPATH=$ORACLE_HOME/JRE:ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib[oracle@localhost ~]$ echo $ORACLE_SIDorcl[oracle@localhost ~]$ export ORACLE_SID=neworcl[oracle@localhost ~]$ echo $ORACLE_SIDneworcl[oracle@localhost ~]$ rlwrap sqlplus / sysdba;*Plus: Release 11.2.0.3.0 Production Thu Jun 7 23:45:30 2018Copyright (c) 1982, 2011, Oracle. rights reserved.Connected :Oracle 11g Enterprise Edition Release 11.2.0.3.0 - Production the Partitioning, OLAP, Data Mining Application Testing optionsSYS@neworcl> instance_name,status v$instance;INSTANCE_NAME STATUS---------------- ------------neworcl SYS@neworcl>
SYS@neworcl> ho ps -ef | grep orcoracle 4430 1 0 Jun07 ? 00:00:00 ora_pmon_neworcloracle 4432 1 0 Jun07 ? 00:00:00 ora_psp0_neworcloracle 4435 1 0 Jun07 ? 00:00:00 ora_vktm_neworcloracle 4439 1 0 Jun07 ? 00:00:00 ora_gen0_neworcloracle 4441 1 0 Jun07 ? 00:00:00 ora_diag_neworcloracle 4443 1 0 Jun07 ? 00:00:00 ora_dbrm_neworcloracle 4446 1 0 Jun07 ? 00:00:00 ora_dia0_neworcloracle 4448 1 0 Jun07 ? 00:00:00 ora_mman_neworcloracle 4450 1 0 Jun07 ? 00:00:02 ora_dbw0_neworcloracle 4452 1 0 Jun07 ? 00:00:14 ora_lgwr_neworcloracle 4455 1 0 Jun07 ? 00:00:00 ora_ckpt_neworcloracle 4457 1 0 Jun07 ? 00:00:00 ora_smon_neworcloracle 4459 1 0 Jun07 ? 00:00:00 ora_reco_neworcloracle 4461 1 0 Jun07 ? 00:00:00 ora_mmon_neworcloracle 4463 1 0 Jun07 ? 00:00:00 ora_mmnl_neworcloracle 4465 1 0 Jun07 ? 00:00:00 ora_d000_neworcloracle 4467 1 0 Jun07 ? 00:00:00 ora_s000_neworcloracle 4736 1 0 Jun07 ? 00:00:00 ora_smco_neworcloracle 4738 1 0 Jun07 ? 00:00:00 ora_qmnc_neworcloracle 4746 1 0 Jun07 ? 00:00:00 ora_q000_neworcloracle 4800 1 0 Jun07 ? 00:00:00 ora_cjq0_neworcloracle 4900 4899 0 Jun07 ? 00:00:00 oracleneworcl (DESCRIPTION=(=YES)(ADDRESS=(PROTOCOL=beq)))oracle 4909 1 0 Jun07 ? 00:00:00 ora_q002_neworcloracle 4942 1 0 00:00 ? 00:00:00 ora_w000_neworcloracle 5025 1 0 00:02 ? 00:00:00 ora_pmon_orcloracle 5027 1 0 00:02 ? 00:00:00 ora_psp0_orcloracle 5029 1 0 00:02 ? 00:00:00 ora_vktm_orcloracle 5033 1 0 00:02 ? 00:00:00 ora_gen0_orcloracle 5035 1 0 00:02 ? 00:00:00 ora_diag_orcloracle 5037 1 0 00:02 ? 00:00:00 ora_dbrm_orcloracle 5039 1 0 00:02 ? 00:00:00 ora_dia0_orcloracle 5041 1 0 00:02 ? 00:00:00 ora_mman_orcloracle 5043 1 0 00:02 ? 00:00:00 ora_dbw0_orcloracle 5045 1 0 00:02 ? 00:00:00 ora_lgwr_orcloracle 5047 1 0 00:02 ? 00:00:00 ora_ckpt_orcloracle 5049 1 0 00:02 ? 00:00:00 ora_smon_orcloracle 5051 1 0 00:02 ? 00:00:00 ora_reco_orcloracle 5053 1 0 00:02 ? 00:00:00 ora_mmon_orcloracle 5055 1 0 00:02 ? 00:00:00 ora_mmnl_orcloracle 5057 1 0 00:02 ? 00:00:00 ora_d000_orcloracle 5059 1 0 00:02 ? 00:00:00 ora_s000_orcloracle 5083 1 0 00:02 ? 00:00:00 ora_arc0_orcloracle 5085 1 0 00:02 ? 00:00:00 ora_arc1_orcloracle 5087 1 0 00:02 ? 00:00:00 ora_arc2_orcloracle 5089 1 0 00:02 ? 00:00:00 ora_qmnc_orcloracle 5105 1 0 00:02 ? 00:00:00 ora_cjq0_orcloracle 5107 1 0 00:03 ? 00:00:00 ora_vkrm_orcloracle 5109 1 0 00:03 ? 00:00:00 ora_q000_orcloracle 5111 1 0 00:03 ? 00:00:00 ora_q001_orcloracle 5155 1 0 00:07 ? 00:00:00 ora_smco_orcloracle 5157 1 0 00:07 ? 00:00:00 ora_w000_orcloracle 5183 4899 0 00:11 pts/3 00:00:00 /bin/bash -c ps -ef | grep orcoracle 5185 5183 0 00:11 pts/3 00:00:00 grep orcSYS@neworcl>
三:查看内存信息
SYS@orcl> v$memory_dynamic_components Name ? Type ----------------------------------------- -------- ---------------------------- COMPONENT 2(64) CURRENT_SIZE NUMBER MIN_SIZE NUMBER MAX_SIZE NUMBER USER_SPECIFIED_SIZE NUMBER OPER_COUNT NUMBER LAST_OPER_TYPE 2(13) LAST_OPER_MODE 2(9) LAST_OPER_TIME GRANULE_SIZE NUMBERSYS@orcl> col COMPONENT a30;SYS@orcl> linesize 300;SYS@orcl> COMPONENT ,CURRENT_SIZE/1024/1024 , MAX_SIZE/1024/1024 v$memory_dynamic_components ;COMPONENT CURRENT_SIZE/1024/1024 MAX_SIZE/1024/1024------------------------------ ---------------------- ------------------shared pool 180 180large pool 4 4java pool 4 4streams pool 4 4SGA Target 328 328 buffer cache 96 96KEEP buffer cache 0 0RECYCLE buffer cache 0 0 2K buffer cache 16 16 4K buffer cache 0 0 8K buffer cache 0 0COMPONENT CURRENT_SIZE/1024/1024 MAX_SIZE/1024/1024------------------------------ ---------------------- ------------------ 16K buffer cache 16 16 32K buffer cache 0 0Shared IO Pool 0 0PGA Target 172 184ASM Buffer Cache 0 016 selected.SYS@orcl>
——————————————————————————————————————————————————————————————————————————————-——————————