| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> oracle >> 讲解Oracle数据库10g疑难问题的解决方法 jiang jie Oracle shu ju ku 10g yi nan wen ti de jie jue fang fa
 

讲解Oracle数据库10g疑难问题的解决方法

2008-08-15 05:14:55 编辑來源:互联网 繁體版 评论
 
 
本文为【讲解Oracle数据库10g疑难问题的解决方法】的汉字拼音对照版显示拼音
  yizenyangpeizhiEM使shiqizhichiSSL xieyi

  10G EM zhongdeOMS, DBConsole,Agent douzhichiSSL xieyi.

  juticaozuo:

  1. ruguomeiyouhuanjingbianliangORACLE_SID,qingxianpeizhi,huozhezhijieqiaoruset ORACLE_SID=xxx (UNIXhuanjingxiaqinggenjubutongdeshellleixing使shiyongbutongdeyufa:setenv, export...)

  2. jianru emctl secure ,keyikandaoquanbudexuanxiang:

  secure oms

  [] [-reset]

  secure agent

  secure em

  secure dbconsole

  []

  secure setpwd

  secure status [oms url]

  secure lock | unlock

  3. yipeizhiomsweili

  3.1 xiantingdiaosuoyouyuomsxiangguande fuwu(opmnctl stopall)

  3.2 qiaoru: emctl secure oms,huirangnishururegistration password,ranhouxitonghuichanshengxiangguandezhengshuwenjian, ruguoyiqieshunlidehua,xitonghuiyoutishipeizhichenggongdexinxi

  3.3 chongxinqidongfuwu(opmnctl startall)

  queshengqingkuangxia7777he4889zhelianggeduankoushikeyongde, peizhichengsecure moshihou,4888duankoushizhichiSSLxieyide. cong$EM_HOME\sysman\configmuluxiadeemoms.propertieswenjianzhongkeyikandaopeizhixinxi.

  3.4 jianceomsshifouyijingyunxingzaihttpsxieyixia

  emctl secure status oms url

  zhuyi: URL yaoshuruwanzheng,

  liru: https://myserver:4888/em/upload/

  4. Agent, DBconsoledepeizhijibenleisi.

  5. qidongliulanqiyunxingshiIEhuitanchuyigeanzhuanganquanzhengshudechuangkouan"queren".

  erchuxianlewenti,zenyangjiejue

  yiDB Controlweili, dazhidebuzhoushizheyangde:

  1. emctl status dbconsole chakandb control dezhuangtai

  2.qu $ORACLE_HOME\hostname_sid\sysman\logmuluxiachakanxiangguanrizhi(emoms.log,emagent.logdeng)

  3. jianchapeizhiwenjian emd.properties,emoms.properties

  mulu: $ORACLE_HOME\hostname_sid\sysman\config

  4. quebaojiantingqigongzuozhengchang: lsnrctl status

  5. 10G EM 使shiyongdeshipeizhiwenjianzhongdingyidelianjiechuanerbushizhijie访fangwentnsnames.ora .

  mulu: $ORACLE_HOME\hostname_sid\sysman\config

  wenjian: emoms.properties.

  shenshu: oracle.sysman.eml.mntr.emdRepConnectDescriptor

  sanxiugailejiantingduankou, zenyangbaozheng DB Control zhengchangyunxing

  1. xiugai listener.ora hetnsnames.ora zhelianggewenjian:

  tnsnames.ora zhongxuyaojiaru:

  listener_1 =

  (ADDRESS = (PROTOCOL = TCP)

  (HOST = xxxx)(PORT = xindeduankou))

  ranhouqidongshujuku:

  SQL> show parameter local_listener ;

  SQL> alter system set local_listener='listener_1' scope=spfile;

  chongqishujuku使shidexiugaishengxiao

  2. xiugai $ORACLE_HOME\hostname_sid\sysman\config

  xiadeemoms.propertieswenjian:

  oracle.sysman.eml.mntr.emdRepPort=xindeduankou

  oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=xxx)(PORT\=xindeduankou)))(CONNECT_DATA\=(SERVICE_NAME\=xxx)))

  3. zuihouhuanyaoxiugai $ORACLE_HOME\hostname_sid\sysman\emd

  xiadetargets.xml:

  4. chongxinqidongjiantingqihedbconsole fuwu.

  5. ruguoxianshangmiandecaozuomafankeyiyongemcazhegeminglingxinggongju:

  emca -h chakansuoyoukeyongdemingling

  emca -r tiaoguoziliaodangankudechuangjian.

  sizenyangxiugai DB Control defuwuduankou

  queshengqingkuangxia DB Control deduankoushi5500, keyishenkaoxiamiandeshuominggenggaiduankou

  ruguoyonghuxianggaibianomsduankoubixugaibianyixiasangewenjianranhouchongqidb controlyi使shidegaibianshengxiao

  1.bianji$ORACLE_HOME/_/sysman/config/emoms.propertiesbinggaibianyixiashenshu

  oracle.sysman.emSDK.svlt.ConsoleServerPort

  oracle.sysman.emSDK.svlt.ConsoleServerHTTPSPort

  2.bianji$ORACLE_HOME/_/sysman/config/emd.propertiesbinggaibianyixiashenshu:

  REPOSITORY_URL

  emdWalletSrcUrl

  3.bianji$ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole__/config/http-web-site.xmlbinggaibianyixiashenshu:

  web-site port

  zhuqingzaixiugaiqianbeifen

  wuruhe使shiyong"Automatic SGA Management"

  Automatic SGA Management shi 10G yinrudexintexingzhiyijiangchushihuashenshuwenjianzhongyuneicunguanlimiqieyouguandejigeshenshuchouquchulai,jiaoyoushujukuquzixingguanli(youxinzengjiadeshenshuSGA_TARGETlaiguanli),zaiyidingchengxushangnengjianqingDBAdefudan.

  zhiyushenshudehelixinghuanxuyaojieheAWR Report quyanzheng.

  SGA_TARGET = db_cache_size + db_nk_cache_size(n=2,4,...)

  + db_keep_cache_size + db_recycle_cache_size +

  shared_pool_size + java_pool_size + large_pool_size + xxxx

  xxx: shiyigebaoliuzhicongmuqiandeshiyanlaikanjibenshi4M

  buzhou:

  1.

  alter system set sga_target=300m scope=both

  create pfile from spfile;

  shutdown immediate;

  xiugaiinit.ora wenjian,jiangzhexieshenshudezhishecheng0:

  db_cache_size, shared_pool_size, java_pool_size,large_pool_size

  2. qidongSQLPLUS,yixindepfilewenjianqidongshujuku

  SQL> startup pfile='....'

  rangwomenlaikankantiaozhengdejieguo:

  SQL> select name, block_size, current_size from v$buffer_pool;

  name block_size current_size

  -------------------------------------------------------------

  KEEP 8192 204

  SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$SGASTAT

  group by pool;

  pool M bytes

  -------------------------------------------------

  java pool 4

  large pool 4

  shared pool 84

  205.002403

  205.002403=buffer cache + log buffer + fixed sga + all others ...

  gaidongjava pooldezhi

  SQL> alter system set java_pool_size=20M;

  SQL> select name, block_size, current_size,prev_size from v$buffer_pool;

  name block_size current_size prev_size

  ----------------------------------------------------------------------------------------------

  KEEP 8192 188 204

  SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$SGASTAT

  group by pool;

  pool M bytes

  -------------------------------------------------

  java pool 20

  large pool 4

  shared pool 84

  189.002403

  keyikanchu, db_cache_sizedezhiyijingbeizidongtiaoxiaole.

  zaibajava pool dezhigaihuiqu

  SQL> alter system set java_pool_size=8M;

  SQL> select name, block_size, current_size,prev_size from v$buffer_pool;

  name block_size current_size prev_size

  -----------------------------------------------------------------------------------

  KEEP 8192 188 204

  SQL> select name, block_size, current_size,prev_size from v$buffer_pool;

  pool M bytes

  -------------------------------------------------

  java pool 20

  large pool 4

  shared pool 84

  189.002403

  zheyici, db_cache_sizedezhimeiyoubianhua , JAVA_POOL_SIZEdezhiyemeiyoubianhua

  xiugailarge pooldezhiwei16M

  SQL> alter system set large_pool_size=16M;

  System altered.

  SQL> select name,block_size,current_size,prev_size from v$buffer_pool;

  NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE

  -------------------- ---------- ------------ ---------

  DEFAULT 8192 176 188

  SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$sgastat group by pool;

  POOL M bytes

  ------------ ----------

  java pool 20

  large pool 16

  shared pool 84

  177.002403

  zhecidb_cache_sizehelarge_pool_sizedezhidoubianle

  tongyang,tiaodashared_pool_sizehou, db_cache_sizehuizidongjianxiao.

  suirandb_nk_cache_sizedezhibuhuisuizheworkload degaibianerzidongtiaozheng, womenhuanshikeyikankanshougonggaidongdb_nk_block_size deqingkuang

  SQL> alter system set db_2k_cache_size=4m;

  System altered.

  SQL> select name,block_size,current_size,prev_size from v$buffer_pool;

  NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE

  ---------------- ----------------- ------------ ----------

  DEFAULT 8192 172 176

  DEFAULT 2048 4 0

  SQL> alter system set db_2k_cache_size=0;

  System altered.

  SQL> select name,block_size,current_size,prev_size from v$buffer_pool;

  NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE

  ----------------- ---------------- ------------------ --------------

  DEFAULT 8192 176 172

  SQL> alter system set db_2k_cache_size=8m;

  System altered.

  SQL> select name,block_size,current_size,prev_size from v$buffer_pool;

  NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE

  -------------------- ---------- ------------ ----------

  DEFAULT 8192 168 176

  DEFAULT 2048 8 0

  jielun: shougongtiaozhengdb_nk_cache_sizequeshihuiyingxiangyuanyoudeshenshu.

  zuihoushuoyidian: SGA_TARGETshenshuyuSGA_MAX_SIZEshenshuyoumiqieguanlianjibendeyuanzejiushiqianzhedezhibunengdayuhouzhedezhi.

  zongjieshezhileSGA_TARGETshenshuhoushujukuhuizaizhegefanweineizixingtiaozhengdanxuduoqingkuangxia, zenyanghelidishezhizhegeshenshurengshiDBAxuyaokaolvdewenti, tamenxuyaojieheAWR Reportdengfuzhudegongjulaifenxi.( dangranwomenkeyigenjuAdvisordelishixinxierquedingyigebijiaohelidezhi)

  

  yiluanmawenti

  Redhat RHEL AS3 xiaanzhuang Oracle DB 10g zhongwenluanmawenti

  bushaoxiongdifanyangzairhel3xiaanzhuangoracle10gshichuxianluanma, qishizaianzhuanghe使shiyongshichuxianluanmadedifangyouduoge, keyifenweisanlei:

  1. anzhuangshideluanma

  2. yixieyingyongchengxudeluanma, biru dbca, netca

  3. yixiejiyuoc4jdewebyingyongdeluanma, biru isqlplus, em

  zaochengzhexiewentideyuanyindoushiyige, jiushizhexiechengxudou使shiyongjdk, xiangyingdejdk(huojre) 使shiyongdezitipeizhiwenjian font.properties zhongdezitihecaozuoxitongdezitihuozhezitipeizhiwenjianbupipei. jiejuedebanfashibaliangzhegaichengyizhi.

  1. xiazai, jiebao ship.db.cpio.gz, shengchengmulu Disk1

  2. cd Disk1/stage/Components/oracle.swd.jre/1.4.2.0.0/1/DataFiles/

  unzip all_except_bin.jar(zheshishengchengyige jre demulu)

  cd jre/1.4.2/lib/

  mv font.properties font.properties.bak

  cp font.properties.zh_CN.Redhat8.0 font.properties

  cd ../../../

  zip -r all_except_bin.jar.new jre/

  mv all_except_bin.jar.new all_except_bin.jar

  (qishijiushiba font.properties wenjianhuandiao. zheyanganzhuangshihanzixianshijiumeiyouwentile)

  3. rufapaozhi, baDisk1/stage/Components/oracle.jdk/1.4.2.0.0/1/DataFiles/sol_bin.1.1.jarwenjianlimiandefont.properties wenjianhuandiao, chuangjianshujukuhezhixingwangluopeizhishideluanmajiumeiyoule. isqlplus heem deluanmayejiejuele

  yongIEdengluLinuxfuwuqishangdeemchuxiandeluanma

  buzhidaodajiayoumeiyouzhuyidaoEMxianshidezhongwenfanyihenshizaogaoup/down dongbudongjiufanyichengxiangshangxiangxiarangrenkuxiaobude.henduopengyoudoushuogancuigeixianshiyingwensuanlekeshizenmexianshine?

  haolexianzaiwomenyouyizhongbanfahenrongyidejiejuezhegewenti:

  dakainideIEliulanqixuanze'gongju"-->Internetxuanxiang-->changgui

  xuanzeyuyanmorenzhiyouzhongwenxuanzetianjiajiaruyingyu(meiguo),tiaozhengshunxubayingyu(meiguo)fangdaozuishangmian

  OK ,queding

  dakainide http://yoururl:5500/em

  wentijiejuele

  er10gruhegenggaiguidangmoshi

  1. duiyuchushihuawenjian,zhixuyaoxiugailog_archive_dest_n zhegeshenshu.n=1,2,3,....10, Oracle queshenghui使shiyonglog_archive_dest_10zhegeshenshulai使shiyongflash recovery arealimiancunfangdeguidangrizhiwenjian,daxiaoyoushenshudb_recovery_file_dest_sizelaijueding.

  xiugai:

  log_archive_dest_1="location=c:\oracle\10g\...\archivelog quota_size=2G"

  ...

  ruguoguidang使shiyongflash recovery area, shangmiandeshenshubuxuyaozhidingrenhezhiOracle huizidong使shiyongdb_recovery_file_destzhegeshenshusuozhidingdelujing

  2. qidongsqlplus:

  startup mount pfile='....'

  alter database archivelog;

  (ruguoqiyongflashback, alter database flashback on)

  alter database open;

  archive log list(chakanshifouyunxingzaiguidangmoshi)

  (ruguoqianmiandelog_archive_dest_nmeiyoushezhizehuixianshiUSE_DB_RECOVERY_FILE_DEST)

  3. zenyangbianchengnoarchivelog moshi

  buzhoujibentongshang

  sanyongdblinkzai10Gzhongzuocreate table ..as select * from ..varchar2()decolumnkuandubiancheng3bei

  wentimiaoshuliruvarchar2(255)==>varchar(765)

  ceshi

  1. huanjing: liangtaijiqidouzhuangde10Gdeshujuku

  2. ceshibuzhouhejieguo:

  SQL> conn test1/test1@db10G_server1

  SQL> create database link link_server2

  connect to test1 identified by test1

  using 'db10G_server2'

  SQL> conn test1/test1@db10G_server2

  SQL> create table test1_t1 as select * from all_objects

  where rownum<=3000;

  SQL> desc test1_t1;

  Name Null? Type

  ---------------------------------------------------------------

  OWNER VARCHAR2(30)

  OBJECT_NAME VARCHAR2(30)

  SUBOBJECT_NAME VARCHAR2(30)

  OBJECT_ID NUMBER

  DATA_OBJECT_ID NUMBER

  OBJECT_TYPE VARCHAR2(19)

  CREATED DATE

  LAST_DDL_TIME DATE

  TIMESTAMP VARCHAR2(19)

  STATUS VARCHAR2(7)

  TEMPORARY VARCHAR2(1)

  GENERATED VARCHAR2(1)

  SECONDARY VARCHAR2(1)

  SQL> conn test1/test1@db10G_server1

  SQL> create table test1_linkt1 as

  select * from test1_t1@link_server2;

  SQL> desc test1_linkt1

  Name Null? Type

  ----------------------------------------- -------- ----------------

  OWNER VARCHAR2(60)

  OBJECT_NAME VARCHAR2(60)

  SUBOBJECT_NAME VARCHAR2(60)

  OBJECT_ID NUMBER

  DATA_OBJECT_ID NUMBER

  OBJECT_TYPE VARCHAR2(38)

  CREATED DATE

  LAST_DDL_TIME DATE

  TIMESTAMP VARCHAR2(38)

  STATUS VARCHAR2(14)

  TEMPORARY VARCHAR2(2)

  GENERATED VARCHAR2(2)

  SECONDARY VARCHAR2(2)

  biaojiegouyiyangdanshiliedechangduqueshibianle, tongguodblinkchuangjiandebiaodevarchar2liedechangdushiyuanbiaodeliangbei

  zailaikankanzifuji

  1.Server1shangdeshujukuzifuji

  SQL> column value format A20

  SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';

  value

  --------------

  ZHS16GBK

  2. Server2shangdeshujukuzifuji

  SQL> conn test1/test1@db10G_server2

  SQL> column value format A20

  SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';

  value

  --------------

  AL32UTF8

  sizai10gbuzhichideLinuxfaxingbanshanganzhuang10gdejiejuefangfa

  zhengchanganzhuangde10gzhizhichiRed Hat Enterprise Linux 2.1 and 3, and on UnitedLinux 1.0ruguoshiqitadebanbenbirufedorarh9deng10gjianghuishuobuzhichierbuyuanxuanzhuangjiejuefangfaruxia

  1.yunxingrunInstaller -ignoreSysPrereqszheyanghuitiaoguojiancha

  2.xiugai/etc/redhat-releasewenjianrang10grenweizijichuyuzhichidecaozuoxitongzhongyunxingxiamiandeminglingjike

  su - root

  cp /etc/redhat-release /etc/redhat-release.backup

  cat > /etc/redhat-release << EOF

  Red Hat Enterprise Linux AS release 3 (Taroon)

  EOF

  anzhuangwanbizaijiangnagewenjianhuanyuan

  su - root

  cp /etc/redhat-release.backup /etc/redhat-release

  3.tongyangdesiluwomenkeyiquxiugaiOracle deinstall/oraparam.iniwenjian:

  [Certified Versions]

  Linux=redhat-2.1,UnitedLinux-1.0,redhat-3

  bazhegepingbidiaohuozheshitianjiaxindeneirong

  [Certified Versions]

  Linux=redhat-2.1,UnitedLinux-1.0,redhat-3

  [Linux-redhat-2.1-optional]

  TEMP_SPACE=80

  SWAP_SPACE=150

  MIN_DISPLAY_COLORS=256

  [UnitedLinux-1.0-optional]

  TEMP_SPACE=80

  SWAP_SPACE=150

  MIN_DISPLAY_COLORS=256

  [Linux-redhat-3.0-optional]

  TEMP_SPACE=80

  SWAP_SPACE=150

  MIN_DISPLAY_COLORS=256

  duizhegedifangdingzhiyixiajiukeyile

  zhuyouxingqudepengyoubufangceshiyixiaqishizaizhegedifangkeyidingzhihenduodong西xidedanshibutuijianzaizhengshideyingyongzhongzhemezuo原文
 
 
 
 
上一篇《教你轻松解决Oracle数据库的服务启动问题》
下一篇《Oracle/JSP技术涉及日期和时间问题的处理》
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
一、怎样配置EM使其支持SSL 协议 10G EM 中的OMS, DBConsole,Agent 都支持SSL 协议. 具体操作: ◆1. 如果没有环境变量ORACLE_SID,请先配置,或者直接敲入set ORACLE_SID=xxx (UNIX环境下请根据不同的shell类型使用不同的语法:setenv, export...) ◆2. 键入 emctl secure ,可以看到全部的选项: secure oms [] [-reset] secure agent secure em secure dbconsole [] secure setpwd secure status [oms url] secure lock | unlock ◆3. 以配置oms为例 ◆3.1 先停掉所有与oms相关的 服务(opmnctl stopall) ◆3.2 敲入: emctl secure oms,会让你输入registration password,然后系统会产生相关的证书文件, 如果一切顺利的话,系统会有提示配置成功的信息 ◆3.3 重新启动服务(opmnctl startall) 缺省情况下,7777和4889这两个端口是可用的, 配置成secure 模式后,4888端口是支持SSL协议的. 从$EM_HOME\sysman\config目录下的emoms.properties文件中可以看到配置信息. ◆3.4 检测oms是否已经运行在https协议下 emctl secure status oms url 注意: URL 要输入完整, 例如: [url=https://myserver:4888/em/upload/]https://myserver:4888/em/upload/[/url] ◆4. Agent, DBconsole的配置基本类似. ◆5. 启动浏览器运行时,IE会弹出一个安装安全证书的窗口,按"确认". 二、出现了问题,怎样解决 以DB Control为例, 大致的步骤是这样的: ◆1. emctl status dbconsole 查看db control 的状态 ◆2.去 $ORACLE_HOME\hostname_sid\sysman\log目录下查看相关日志(emoms.log,emagent.log等) ◆3. 检查配置文件 emd.properties,emoms.properties 目录: $ORACLE_HOME\hostname_sid\sysman\config ◆4. 确保监听器工作正常: lsnrctl status ◆5. 10G EM 使用的是配置文件中定义的连接串,而不是直接访问tnsnames.ora . 目录: $ORACLE_HOME\hostname_sid\sysman\config 文件: emoms.properties. 参数: oracle.sysman.eml.mntr.emdRepConnectDescriptor 三、修改了监听端口, 怎样保证 DB Control 正常运行 ◆1. 修改 listener.ora 和tnsnames.ora 这两个文件: tnsnames.ora 中需要加入: listener_1 = (ADDRESS = (PROTOCOL = TCP) (HOST = xxxx)(PORT = 新的端口)) 然后启动数据库: SQL> show parameter local_listener ; SQL> alter system set local_listener='listener_1' scope=spfile; 重启数据库使得修改生效 ◆2. 修改 $ORACLE_HOME\hostname_sid\sysman\config 下的emoms.properties文件: oracle.sysman.eml.mntr.emdRepPort=新的端口 oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=xxx)(PORT\=新的端口)))(CONNECT_DATA\=(SERVICE_NAME\=xxx))) ◆3. 最后,还要修改 $ORACLE_HOME\hostname_sid\sysman\emd 下的targets.xml: ◆4. 重新启动监听器和dbconsole 服务. ◆5. 如果嫌上面的操作麻烦,可以用emca这个命令行工具: emca -h 查看所有可用的命令 emca -r 跳过资料档案库的创建. 四、怎样修改 DB Control 的服务端口 缺省情况下, DB Control 的端口是5500, 可以参考下面的说明更改端口。 如果用户想改变oms端口,必须改变以下三个文件,然后重启db control以使得改变生效: ◆1.编辑$ORACLE_HOME/_/sysman/config/emoms.properties并改变以下参数: oracle.sysman.emSDK.svlt.ConsoleServerPort oracle.sysman.emSDK.svlt.ConsoleServerHTTPSPort ◆2.编辑$ORACLE_HOME/_/sysman/config/emd.properties并改变以下参数: REPOSITORY_URL emdWalletSrcUrl ◆3.编辑$ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole__/config/http-web-site.xml并改变以下参数: web-site port 注:请在修改前备份。 ◆五、如何使用"Automatic SGA Management" Automatic SGA Management 是 10G 引入的新特性之一,将初始化参数文件中与内存管理密切有关的几个参数抽取出来,交由数据库去自行管理(由新增加的参数SGA_TARGET来管理),在一定程序上能减轻DBA的负担. 至于参数的合理性,还需要结合AWR Report 去验证. SGA_TARGET = db_cache_size + db_nk_cache_size(n=2,4,...) + db_keep_cache_size + db_recycle_cache_size + shared_pool_size + java_pool_size + large_pool_size + xxxx xxx: 是一个保留值,从目前的实验来看,基本是4M 步骤: ◆1. alter system set sga_target=300m scope=both create pfile from spfile; shutdown immediate; 修改init.ora 文件,将这些参数的值设成0: db_cache_size, shared_pool_size, java_pool_size,large_pool_size ◆2. 启动SQLPLUS,以新的pfile文件启动数据库 SQL> startup pfile='....' 让我们来看看调整的结果: SQL> select name, block_size, current_size from v$buffer_pool; name block_size current_size ------------------------------------------------------------- KEEP 8192 204 SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$SGASTAT group by pool; pool M bytes ------------------------------------------------- java pool 4 large pool 4 shared pool 84 205.002403 205.002403=buffer cache + log buffer + fixed sga + all others ... 改动java pool的值 SQL> alter system set java_pool_size=20M; SQL> select name, block_size, current_size,prev_size from v$buffer_pool; name block_size current_size prev_size ---------------------------------------------------------------------------------------------- KEEP 8192 188 204 SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$SGASTAT group by pool; pool M bytes ------------------------------------------------- java pool 20 large pool 4 shared pool 84 189.002403 可以看出, db_cache_size的值已经被自动调小了. 再把java pool 的值改回去 SQL> alter system set java_pool_size=8M; SQL> select name, block_size, current_size,prev_size from v$buffer_pool; name block_size current_size prev_size ----------------------------------------------------------------------------------- KEEP 8192 188 204 SQL> select name, block_size, current_size,prev_size from v$buffer_pool; pool M bytes ------------------------------------------------- java pool 20 large pool 4 shared pool 84 189.002403 这一次, db_cache_size的值没有变化 , JAVA_POOL_SIZE的值也没有变化 修改large pool的值为16M SQL> alter system set large_pool_size=16M; System altered. SQL> select name,block_size,current_size,prev_size from v$buffer_pool; NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE -------------------- ---------- ------------ --------- DEFAULT 8192 176 188 SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$sgastat group by pool; POOL M bytes ------------ ---------- java pool 20 large pool 16 shared pool 84 177.002403 这次,db_cache_size和large_pool_size的值都变了 同样,调大shared_pool_size后, db_cache_size会自动减小. 虽然db_nk_cache_size的值不会随着workload 的改变而自动调整, 我们还是可以看看手工改动db_nk_block_size 的情况 SQL> alter system set db_2k_cache_size=4m; System altered. SQL> select name,block_size,current_size,prev_size from v$buffer_pool; NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE ---------------- ----------------- ------------ ---------- DEFAULT 8192 172 176 DEFAULT 2048 4 0 SQL> alter system set db_2k_cache_size=0; System altered. SQL> select name,block_size,current_size,prev_size from v$buffer_pool; NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE ----------------- ---------------- ------------------ -------------- DEFAULT 8192 176 172 SQL> alter system set db_2k_cache_size=8m; System altered. SQL> select name,block_size,current_size,prev_size from v$buffer_pool; NAME BLOCK_SIZE CURRENT_SIZE PREV_SIZE -------------------- ---------- ------------ ---------- DEFAULT 8192 168 176 DEFAULT 2048 8 0 结论: 手工调整db_nk_cache_size确实会影响原有的参数. 最后说一点: SGA_TARGET参数与SGA_MAX_SIZE参数有密切关联,基本的原则就是前者的值不能大于后者的值. 总结:设置了SGA_TARGET参数后,数据库会在这个范围内自行调整;但许多情况下, 怎样合理地设置这个参数仍是DBA需要考虑的问题, 他们需要结合AWR Report等辅助的工具来分析.( 当然,我们可以根据Advisor的历史信息而确定一个比较合理的值)。 一、乱码问题 Redhat RHEL AS3 下安装 Oracle DB 10g 中文乱码问题 不少兄弟反映在rhel3下安装oracle10g时出现乱码, 其实在安装和使用时出现乱码的地方有多个, 可以分为三类: 1. 安装时的乱码 2. 一些应用程序的乱码, 比如 dbca, netca 3. 一些基于oc4j的web应用的乱码, 比如 isqlplus, em 造成这些问题的原因都是一个, 就是这些程序都使用jdk, 相应的jdk(或jre) 使用的字体配置文件 font.properties 中的字体和操作系统的字体或者字体配置文件不匹配. 解决的办法是把两者改成一致. ◆1. 下载, 解包 ship.db.cpio.gz, 生成目录 Disk1 ◆2. cd Disk1/stage/Components/oracle.swd.jre/1.4.2.0.0/1/DataFiles/ unzip all_except_bin.jar (这时生成一个 jre 的目录) cd jre/1.4.2/lib/ mv font.properties font.properties.bak cp font.properties.zh_CN.Redhat8.0 font.properties cd ../../../ zip -r all_except_bin.jar.new jre/ mv all_except_bin.jar.new all_except_bin.jar (其实就是把 font.properties 文件换掉. 这样安装时汉字显示就没有问题了) ◆3. 如法炮制, 把Disk1/stage/Components/oracle.jdk/1.4.2.0.0/1/DataFiles/sol_bin.1.1.jar文件里面的font.properties 文件换掉, 创建数据库和执行网络配置时的乱码就没有了. isqlplus 和em 的乱码也解决了。 用IE登录Linux服务器上的em出现的乱码 不知道大家有没有注意到,EM显示的中文翻译很是糟糕,up/down 动不动就翻译成“向上”“向下”,让人哭笑不得.很多朋友都说,干脆给显示英文算了,可是怎么显示呢? 好了,现在我们有一种办法很容易的解决这个问题: 打开你的IE浏览器,选择'工具"-->Internet选项-->常规 选择“语言”,默认只有“中文”,选择“添加”,加入英语(美国),调整顺序,把”英语(美国)“放到最上面 OK ,确定。 打开你的 [url=http://yoururl:5500/em]http://yoururl:5500/em[/url] 问题解决了。 二、10g如何更改归档模式 ◆1. 对于初始化文件,只需要修改log_archive_dest_n 这个参数.n=1,2,3,....10, Oracle 缺省会使用log_archive_dest_10这个参数来使用flash recovery area里面存放的归档日志文件,大小由参数db_recovery_file_dest_size来决定. 修改: log_archive_dest_1="location=c:\oracle\10g\...\archivelog quota_size=2G" ... 如果归档使用flash recovery area, 上面的参数不需要指定任何值,Oracle 会自动使用db_recovery_file_dest这个参数所指定的路径。 ◆2. 启动sqlplus: startup mount pfile='....' alter database archivelog; (如果启用flashback, alter database flashback on) alter database open; archive log list(查看是否运行在归档模式) (如果前面的log_archive_dest_n没有设置,则会显示USE_DB_RECOVERY_FILE_DEST) ◆3. 怎样变成noarchivelog 模式 步骤基本同上。 三、用dblink在10G中做create table ..as select * from ..varchar2()的column宽度变成3倍 问题描述:例如:varchar2(255)==>varchar(765) 测试: ◆1. 环境: 两台机器都装的10G的数据库 ◆2. 测试步骤和结果: SQL> conn [url=mailto:test1/test1@db10G_server1]test1/test1@db10G_server1[/url] SQL> create database link link_server2 connect to test1 identified by test1 using 'db10G_server2' SQL> conn [url=mailto:test1/test1@db10G_server2]test1/test1@db10G_server2[/url] SQL> create table test1_t1 as select * from all_objects where rownum<=3000; SQL> desc test1_t1; Name Null? Type --------------------------------------------------------------- OWNER VARCHAR2(30) OBJECT_NAME VARCHAR2(30) SUBOBJECT_NAME VARCHAR2(30) OBJECT_ID NUMBER DATA_OBJECT_ID NUMBER OBJECT_TYPE VARCHAR2(19) CREATED DATE LAST_DDL_TIME DATE TIMESTAMP VARCHAR2(19) STATUS VARCHAR2(7) TEMPORARY VARCHAR2(1) GENERATED VARCHAR2(1) SECONDARY VARCHAR2(1) SQL> conn [url=mailto:test1/test1@db10G_server1]test1/test1@db10G_server1[/url] SQL> create table test1_linkt1 as select * from [url=mailto:test1_t1@link_server2]test1_t1@link_server2[/url]; SQL> desc test1_linkt1 Name Null? Type ----------------------------------------- -------- ---------------- OWNER VARCHAR2(60) OBJECT_NAME VARCHAR2(60) SUBOBJECT_NAME VARCHAR2(60) OBJECT_ID NUMBER DATA_OBJECT_ID NUMBER OBJECT_TYPE VARCHAR2(38) CREATED DATE LAST_DDL_TIME DATE TIMESTAMP VARCHAR2(38) STATUS VARCHAR2(14) TEMPORARY VARCHAR2(2) GENERATED VARCHAR2(2) SECONDARY VARCHAR2(2) 表结构一样,但是列的长度确实变了, 通过dblink创建的表的varchar2列的长度是原表的两倍 再来看看字符集 ◆1.Server1上的数据库字符集 SQL> column value format A20 SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET'; value -------------- ZHS16GBK ◆2. Server2上的数据库字符集 SQL> conn [url=mailto:test1/test1@db10G_server2]test1/test1@db10G_server2[/url] SQL> column value format A20 SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET'; value -------------- AL32UTF8 四、在10g不支持的Linux发行版上安装10g的解决方法 正常安装的10g只支持Red Hat Enterprise Linux 2.1 and 3, and on UnitedLinux 1.0。如果是其它的版本,比如fedora,rh9等,10g将会说不支持,而不允许安装,解决方法如下: ◆1.运行runInstaller -ignoreSysPrereqs,这样会跳过检查 ◆2.修改/etc/redhat-release文件,让10g认为自己处于支持的操作系统中,运行下面的命令即可 su - root cp /etc/redhat-release /etc/redhat-release.backup cat > /etc/redhat-release << EOF Red Hat Enterprise Linux AS release 3 (Taroon) EOF 安装完毕,再将那个文件还原: su - root cp /etc/redhat-release.backup /etc/redhat-release ◆3.同样的思路,我们可以去修改Oracle 的install/oraparam.ini文件: [Certified Versions] Linux=redhat-2.1,UnitedLinux-1.0,redhat-3 把这个屏蔽掉,或者是添加新的内容: [Certified Versions] Linux=redhat-2.1,UnitedLinux-1.0,redhat-3 [Linux-redhat-2.1-optional] TEMP_SPACE=80 SWAP_SPACE=150 MIN_DISPLAY_COLORS=256 [UnitedLinux-1.0-optional] TEMP_SPACE=80 SWAP_SPACE=150 MIN_DISPLAY_COLORS=256 [Linux-redhat-3.0-optional] TEMP_SPACE=80 SWAP_SPACE=150 MIN_DISPLAY_COLORS=256 对这个地方定制一下就可以了。 注:有兴趣的朋友不妨测试一下,其实在这个地方可以定制很多东西的,但是不推荐在正式的应用中这么做。
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
我们约会吧
漂亮白皙的模特
好纯好美的女生
靓丽的网络美女
痞子的甘南日记
疑是银河落九天
雪域坝上四——纯美色
冬日恋歌——西城杨柳弄轻柔
 
>>返回首页<<
 为你推荐
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
©2005- 王朝网络 版权所有