dbca、runInstaller工具及控制文件相关
时间:2011-01-09 来源:cbso520
silent mode install oracle software
./runInstaller -record -destinationFile /tmp/install.rsp
./runInstaller -responseFile /tmp/install.rsp -silent
silent mode install oracle database
./dbca
ORACLE DBCA创建数据库
DBCA template迁移DB(做实验) ->OK 数据库软件版本需要相同,新的数据库中用户需要重新启用,即首先解锁用户,再重新设置密码.
DBCA图形界面
DBCA silent(做实验)手动创建(做实验)
ORACLE INSTANCE
emctl start dbconsole
emctl stop dbconsole
spfile --spfileSID.ora
init --initSID.ora配置OEM:利用DBCA工具或者EMCA命令行来配置
emca -repos recreate
emca --config dbcontrol db 参数文件
$ORACLE_HOME/dbs/ --linux/unix
$ORACLE_HOME/database/ --XP
show parameter spfile;
10G:
create spfile from pfile;
create pfile from spfile;
11G:
create spfile='...' from memory;
create pfile='...' from memory;
*.open_cursors=300 --每个用户能打开300个.
nomount --parameter file
mount --open control file
open --datafile logfile (根据controlfile中SCN判断是否一致 datafile logfile)动态性能视图
v$fixed_table --all the dynamic views密码文件格式:orapwSID
lsnrctl start
password file exists
remote_login_passwordfile --exclusive shared none
sqlnet.ora --authentication method
/etc/init.d/iptables status --check firewall status
system-config-securitylevel --config firewall控制文件
*.control_files=
controlfile over 100M ,we need to recreate the controlfile.
alter system set control_files='...','...','...' scope=spfile;
host cp /home/.../control0{1,4}.ctl
alter database backup controlfile to trace as '/tmp/control.sql'; --create script to recreate control file;
alter database backup controlfile to '/tmp/control.ctl' --backup controlfile to binary file;
vi 50dd 删除前50行内容编辑控制文件脚本,删除多余的内容,删除控制文件脚本中的注释、空行及行头的空格重建控制文件(做实验),目的是减少控制文件容量重做日志文件
ckpt
every 3 seconds
scann blocks overtime
before dbwr
v$license
isqlplus DBA登录,需要配置OC4J J2EE
EM: http[s]://ip:1158/em
alter tablespace t_name drop datafile '/tmp/test.dbf';
alter tablespace big_tab resize 160M; --resize big tablespace
alter database datafile '/lslfs/slsdfjld.dbf' reszie 1G; --resize datafile
alter database datafile 'datafile location' autoextent on next 1m maxsize 2g;
drop tablespace bg_t including contents and datafiles;
10g中文件号固定的是1,2,3
SQL> select file#,name from V$datafile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
/home/oracle/oradata/jerry/system01.dbf
2
/home/oracle/oradata/jerry/undotbs01.dbf
3
/home/oracle/oradata/jerry/sysaux01.dbf
OMF
db_create_file_dest