Home  >  Article  >  Database  >  追踪DBCA建库log

追踪DBCA建库log

WBOY
WBOYOriginal
2016-06-07 15:54:121966browse

追踪DBCA建库log,方便异常解决,也就说在您在运行dbca建库时,无聊的时候可以看看 方法一:(oracle提供的log位置去查看) 10g、11g中dbca 10g dbca的日志位置$ORACLE_HOME/cfgtoollogs/dbca/trace.log 11g dbca的日志在 $ORACLE_BASE/cfgtoollogs/dbca/实例

追踪DBCA建库log,方便异常解决,也就说在您在运行dbca建库时,无聊的时候可以看看大笑

方法一:(oracle提供的log位置去查看)

10g、11g中dbca

 10g dbca的日志位置$ORACLE_HOME/cfgtoollogs/dbca/trace.log 

 11g dbca的日志在 $ORACLE_BASE/cfgtoollogs/dbca/实例名/trace.log

例如:

ora11g/oracle>$ cd /oracle/cfgtoollogs/dbca/ora11g/

ora11g/oracle>$ll –trlh

total 260K

-rw-r----- 1 oracle oinstall 0 Jan 12 09:46 rmanDeleteFiles.sql

-rw-r----- 1 oracle oinstall 1.3K Feb 18 04:50 rmanRestoreDatafiles.sql

-rw-r----- 1 oracle oinstall 733 Feb 18 04:54 CloneRmanRestore.log

-rw-r----- 1 oracle oinstall 2.2K Feb 18 04:58 tts_example_imp.log

-rw-r----- 1 oracle oinstall 38K Feb 18 05:02 cloneDBCreation.log

-rw-r----- 1 oracle oinstall 17K Feb 18 05:02 mkplug_v3_ora11g.log

-rw-r----- 1 oracle oinstall 16 Feb 18 05:02 postScripts.log

-rw-r----- 1 oracle oinstall 48 Feb 18 05:02 lockAccount.log

-rw-r----- 1 oracle oinstall 2.4K Feb 18 05:04 postDBCreation.log

-rw-r----- 1 oracle oinstall 26K Feb 18 05:05 emConfig.log

-rw-r----- 1 oracle oinstall 142K Feb 18 05:23 trace.log

方法二:编辑安装脚本 ,这一步的做法是先安装完oracle 软件,建库的时候才用的到 

1.找到dbca可执行文件

[root@ora11g~]# su - oracle

[oracle@ora11g~]$ cd $ORACLE_HOME/bin

2.查看命令并做好备份

[oracle@ora11g~]$ ls-al dbca

[oracle@ora11g~]$cp dbca dbca.bak

[oracle@ora11g~]$ ls -al dbca*

-rwxr-xr-x 1 oracle oinstall 6229 Jan 12 09:23 dbca
-rwxr-xr-x 1 oracle oinstall 6229 Mar 26 04:09 dbca.bak

3.修改dbca trace参数

[oracle@ora11g~]$ vi dbca 

 找到如下一行 

 # Run DBCA  exec $JRE_DIR/bin/java $JRE_OPTIONS $DEBUG_STRING -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS

 改为  exec $JRE_DIR/bin/java $JRE_OPTIONS $DEBUG_STRING -DTRACING.ENABLED=true -DTRACING.LEVEL=2 -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS

4.导入dbcalog

[oracle@ora11g~]$dbca > dbca.log

[oracle@ora11g~]$pwd

/home/oracle 

5.查看dbca trace文件内容

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn