1.4.5
看bbk的框架
ls
env | grep ORA
cd /u01/oradata
ls
ll
cd bbk
ll
cd /u01/admin/
ll
ll bbk
cd
cd db
cd dbs
ls
vi initbbk.ora
clear
ls
ll
env | grep ORA
执行创建数据库语句。
sqlplus /nolog
conn /as sysdba
create spfile from pfile
!
ls
ll
exit
startup nomount;
!
clear
ps -ef | grep oracle
exit
@$ORACLE_HOME/dbs/crdb01.sql;
看alert日志
cd $ORACLE_HOME/admin/bbk/bdump
ls
tail -f alert_bbk.log
# 出错看alert
!
ps -ef | grep oracle
(alert)ls
rm -f alert_bbk.log
ls
cd
cd /u01/oradata/bbk/
ls
ll
rm -f *
ll
cd
cd dbs
orapwd file=orapwbbk password=oracle entries=10
改环境变量
ll
env | grep ORA
. ./bbk.env
env | grep ORA
sqlplus /nolog
conn /as sysdba
语句执行
startup nomount
@$ORACLE_HOME/DBS/crdb01.sql
(dbs) tail -f /u01/admin/bbk/bdump/alert/alert_bbk.log
额外表空间
create tablespace mytbs datafile '/u01/oradata/bbkmytbs01.dbf' size 100M extent management local
执行脚本,创建数据字典,视图
(dbs)ls
cd
cd rdbms/
ll
cd admin
ls
(SQL)
spool log1.log
@?/rdbms/admin/catalog.sql;
(dbs)
vi log1.log
/err
(SQL)
spool log2.log
@?/rdbms/admin/catproc.sql;
(dbs)
cat log2.log
cat log2.log | grep err | more
(SQL)
spool log3.log
@?/sqlplus/admin/pupbld.sql;
select * from dual;
desc sba_objects;
测试
ps -ef | grep oracle
exit
shutdown immediate
sqlplus /nolog
conn /as sysdba
startup
select * from dual;
create table testbl(id integer,name char(10));
insert into testbl values(0,'wilson');
commit;
select * from testbl;