--查看数据库运行模式(spfile还是pfile)
select decode(count(*),1,‘spfile‘,‘pfile‘)
from v$spparameter
where rownum=1 and isspecified=‘TRUE‘;
--以pfile启动数据库
create pfile=‘/u01/app/oracle/product/11.2.0/db_1/dbs/initdbtest.ora‘ from spfile;
shutdown immediate;
startup pfile=‘/u01/app/oracle/product/11.2.0/db_1/dbs/initdbtest.ora‘;
--以spfile启动数据库
create spfile from pfile=‘/u01/app/oracle/product/11.2.0/db_1/dbs/initdbtest.ora‘;
shutdown immediate;
startup;
--从内存创建spfile或pfile
create spfile from memory
create pfile from memory
此命令在丢失当前参数文件时很方便。在RAC环境中,此命令将捕捉系统中每个实例正在使用的参数值。
--pfile重建
adump :审计信息
bdump :后台进程trace 和alert log ,就是说 alert_sid.log也存在这个目录中
cdump :core trace,一般是用来日志应用程序的 除非数据库出了问题 否则基本上不会有什么信息
dpdump :是存放一些登录信息的
udump :前台手动trace的 比如sql trace之后session的trace文件
--10g pfile模板 /u01/app/oracle/admin/test10g/bdump alert_test10.log文件
processes = 150
sga_target = 205520896
control_files = /u01/app/oracle/oradata/test10g/control01.ctl, /u01
/app/oracle/oradata/test10g/control02.ctl, /u01/app/oracle/oradata/test10g/contr
ol03.ctl
db_block_size = 8192
compatible = 10.2.0.1.0
log_archive_format = %t_%s_%r.dbf
db_file_multiblock_read_count= 16
db_recovery_file_dest = /u01/app/oracle/flash_recovery_area
db_recovery_file_dest_size= 2147483648
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain =
dispatchers = (PROTOCOL=TCP) (SERVICE=test10gXDB)
job_queue_processes = 10
background_dump_dest = /u01/app/oracle/admin/test10g/bdump
user_dump_dest = /u01/app/oracle/admin/test10g/udump
core_dump_dest = /u01/app/oracle/admin/test10g/cdump
audit_file_dest = /u01/app/oracle/admin/test10g/adump
db_name = test10g
open_cursors = 300
pga_aggregate_target = 68157440
--11g pfile模板 /u01/app/oracle/diag/rdbms/test11g/test11g/trace alert_test11g.log文件
processes = 150
nls_language = "AMERICAN"
nls_territory = "AMERICA"
sga_target = 400M
control_files = "/u01/app/oracle/oradata/test11g/control01.ctl"
control_files = "/u01/app/oracle/oradata/test11g/control02.ctl"
control_files = "/u01/app/oracle/oradata/test11g/control03.ctl"
db_block_size = 8192
compatible = "11.2.0"
db_recovery_file_dest = "$ORACLE_BASE/flash_recovery_area"
db_recovery_file_dest_size= 2G
undo_management = "AUTO"
undo_tablespace = "UNDOTBS1"
undo_retention = 7200
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=ORCLXDB)"
audit_file_dest = "/u01/app/oracle/admin/test11g/adump"
audit_trail = "NONE"
db_name = "TEST11G"
open_cursors = 300
pga_aggregate_target = 300M
statistics_level = "typical"
diagnostic_dest = "/u01/app/oracle"