CREATE USER "RMS" PROFILE "DEFAULT"
IDENTIFIED BY "XXXXX" DEFAULT TABLESPACE "TRMSDATA"
ACCOUNT UNLOCK;
GRANT DELETE ANY TABLE TO "RMS";
GRANT EXECUTE ANY PROCEDURE TO "RMS";
GRANT INSERT ANY TABLE TO "RMS";
GRANT SELECT ANY SEQUENCE TO "RMS";
GRANT SELECT ANY TABLE TO "RMS";
GRANT UNLIMITED TABLESPACE TO "RMS";
GRANT UPDATE ANY TABLE TO "RMS";
GRANT "CONNECT" TO "RMS";
GRANT "DBA" TO "RMS";
1.1.3.3.2 导入数据脚本
imp rms/XXXXX@trmstest file=rmsdb.dmp full=y commit=y ignore=y buffer=1024000 feedback=100000
1.1.3.3.3 分析表
导入数据后要进行oracle表分析提高性能
大表用单独session 加大sort_area_size提高分析速度
alter session set sort_area_size = 100000000;
alter session set sort_area_retained_size = 100000000;
alter session set sort_multiblock_read_count = 128;
alter session set db_file_multiblock_read_count = 128;
analyze table rms.ATOM_RES_SERV_INS compute statistics;
1.1.4 程序问题
1.1.4.1 EJB注释配置不正确
多数为helper-bean-id 用spring配置文件中的bean-name不相符
1.1.4.2 Hibernate 、JDBC、存贮过程
l 批量操作改成使用存贮过程速度比用JDBC高出近100倍
l Hibernate效率最低,设备增加原来采用Hibernate时weblogic服务器CPU很高
l 数据库连接泄漏,没有按要求使用JDBCTemplete,而是自己写JDBC代码,程序存贮过程调用中大量存在这类问题
1.1.4.3 SQL优化
l Is null 不会使用索引只会做全表扫描
l Where 条件中 结果集小的条件放在后面
l 对于大表子查询的效率高于表连接
l 复杂查询语句用PL/SQL查看执行计划,看是否有利用有效索引,是否存在对大表的全表扫描
1.1.5 操作系统
1.1.5.1 调整oracle9i数据库主机
kctune -h nproc=4096
kctune -h STRMSGSZ=65535
kctune -h dnlc_hash_locks=512
kctune -h ksi_alloc_max=32768
kctune -h max_thread_proc=256
kctune -h maxdsiz=1073741824
kctune -h maxdsiz_64bit=2147483648
kctune -h maxssiz=134217728
kctune -h maxssiz_64bit=1073741824
kctune -h maxswapchunks=16384
kctune -h maxtsiz=0X4000000
kctune -h maxtsiz_64bit=0X40000000
kctune -h maxuprc=3000
kctune -h maxusers=4096
kctune -h msgmap=4098
kctune -h msgmni=4096
kctune -h msgseg=16384
kctune -h msgtql=4096
kctune -h ncallout=8000
kctune -h ncsize=34816
kctune -h nfile=63488
kctune -h nflocks=4096
kctune -h ninode=34816
kctune -h nkthread=7184
kctune -h nstrpty=60
kctune -h semmni=8192
kctune -h semmns=16384
kctune -h semmnu=4092
kctune -h semvmx=32768
kctune -h shmmax=16743656000
kctune -h shmmni=512
kctune -h shmseg=32
kctune -h vps_ceiling=64
1.1.5.2 weblogic9.2主机内核参数
kctune -h max_thread_proc=4096
kctune -h maxusers=2048
kctune -h maxfiles=2048
kctune -h maxuprc=1024
kctune -h maxdsiz=0x40000000
kctune -h maxdsiz_64bit=0x80000000
1.1.5.3 操作系统补丁
未安装操作系统补丁,正式测试过程中用HP工程师提供的HPjconfig发现系统未安装Java 1.5补丁
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/