for check ebs 12.2 active user connection, we need connect to database of this ebs app, and running sql follow:
/* Formatted on 8/30/2018 11:47:28 AM (QP5 v5.252.13127.32867) */
SELECT ( (SELECT SYSDATE FROM DUAL)),
(SELECT ' user sessions : ' || COUNT (DISTINCT session_id)
How_many_user_sessions
FROM icx_sessions icx
WHERE disabled_flag != 'Y'
AND PSEUDO_FLAG = 'N'
AND ( last_connect
+ DECODE (
FND_PROFILE.VALUE ('ICX_SESSION_TIMEOUT'),
NULL, limit_time,
0, limit_time,
FND_PROFILE.VALUE ('ICX_SESSION_TIMEOUT') / 60)
/ 24) > SYSDATE
AND counter < limit_connects)
FROM DUAL;
tbthien
Thứ Tư, 29 tháng 8, 2018
Thứ Ba, 19 tháng 1, 2016
Config timezone for weblogic
Today, i meet timezone trouble in weblogic 12.1.2. So very tire when see it, i already check datetime in weblogic server and database server. But weblogic applcation can't get correct time when start server. Now i fix it by editing java parameter in setDomainEnv.sh in weblogic follow:
1) Set environment and go to domain home
$ export MW_HOME=/u01/app/wlg12
$ export DOMAIN_HOME=$MW_HOME/user_projects/domains/TESTDOM
$ cd $DOMAIN_HOME/bin
2) Modify environment
$ vi setDomainEnv.sh
Add the following java property to your WebLogic startup script EXTRA_JAVA_PROPERTIES to change the timezone setting and add timezone properties follow example:
EXTRA_JAVA_PROPERTIES="-Duser.timezone=Asia/Bangkok -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder ${EXTRA_JAVA_PROPERTIES}"
3) Restart weblogic
./startWebLogic.sh &
./startNodeManager.sh &
1) Set environment and go to domain home
$ export MW_HOME=/u01/app/wlg12
$ export DOMAIN_HOME=$MW_HOME/user_projects/domains/TESTDOM
$ cd $DOMAIN_HOME/bin
2) Modify environment
$ vi setDomainEnv.sh
Add the following java property to your WebLogic startup script EXTRA_JAVA_PROPERTIES to change the timezone setting and add timezone properties follow example:
EXTRA_JAVA_PROPERTIES="-Duser.timezone=Asia/Bangkok -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder ${EXTRA_JAVA_PROPERTIES}"
./startWebLogic.sh &
./startNodeManager.sh &
Thứ Hai, 22 tháng 6, 2015
Disable SSL on EBS R12
Using SSL is good for Production
system. But In real business working, we need clone production system to other
system as DEV, UAT, TEST.. environment. In this Environment, SSL make system
more slow and don't need using this. For disable SSL on EBS r12 we need do some
acction follow:
1) Stop Application Server
#su -
oracle
$cd
<APPL_TOP>
$source
APPSvis_serverebs.env
$adstpar.sh
apps/<apps password>
2) Disable SSL follow command
$
txkrun.pl -script=SetAdvCfg \-appsuser=apps -appspass=<Apps Password>
-disable=SSL \-s_webport=<Web port>
example:
$
txkrun.pl -script=SetAdvCfg \-appsuser=apps -appspass=apps -disable=SSL
\-s_webport=8000
3) Rung auto config an application server
$adautocfg.sh
<Input
apps password>
4) Start Application server
$adstrtal.sh
apps/<apps password>
5) Retest web access URL
http://<server_name>:<port>
Thứ Hai, 3 tháng 11, 2014
Check Oracle Database table growth
In DBA job, sometime we need to check table growth rate. For check table growth we need to enable snapshot of database. This snapshot will keep information of database in capture time. Base on this snapshot, we can calculate table growth rate.
To view the object (segment) growth in blocks, you can use the views dba_hist_seg_stat and dba_hist_snapshot like below.
select obj.owner, obj.object_name,
to_char(sn.BEGIN_INTERVAL_TIME,'RRRR-MON-DD') start_day,
sum(a.db_block_changes_delta) block_increase
from dba_hist_seg_stat a,
dba_hist_snapshot sn,
dba_objects obj
where sn.snap_id = a.snap_id
and obj.object_id = a.obj#
and obj.owner not in ('SYS','SYSTEM')
and end_interval_time between to_timestamp('01-JAN-2012','DD-MON-RRRR')
and to_timestamp('02-FEB-2012','DD-MON-RRRR')
group by obj.owner, obj.object_name,
to_char(sn.BEGIN_INTERVAL_TIME,'RRRR-MON-DD')
order by obj.owner, obj.object_name
This script check only increase database block, if you want change from block to OS size we must know database block size. In default , database block size is 8192 Bytes.
When you summary total increase size of table and compare with increase size of database, you will see it not equal. Because, this command don't minus delete block of table, and calculate database flashback retention, recycle bin and some table is template table. Template table will automatic drop at end of session, then size of table will return to be zero.
Reference: Doc ID 1395195.1
To view the object (segment) growth in blocks, you can use the views dba_hist_seg_stat and dba_hist_snapshot like below.
select obj.owner, obj.object_name,
to_char(sn.BEGIN_INTERVAL_TIME,'RRRR-MON-DD') start_day,
sum(a.db_block_changes_delta) block_increase
from dba_hist_seg_stat a,
dba_hist_snapshot sn,
dba_objects obj
where sn.snap_id = a.snap_id
and obj.object_id = a.obj#
and obj.owner not in ('SYS','SYSTEM')
and end_interval_time between to_timestamp('01-JAN-2012','DD-MON-RRRR')
and to_timestamp('02-FEB-2012','DD-MON-RRRR')
group by obj.owner, obj.object_name,
to_char(sn.BEGIN_INTERVAL_TIME,'RRRR-MON-DD')
order by obj.owner, obj.object_name
This script check only increase database block, if you want change from block to OS size we must know database block size. In default , database block size is 8192 Bytes.
When you summary total increase size of table and compare with increase size of database, you will see it not equal. Because, this command don't minus delete block of table, and calculate database flashback retention, recycle bin and some table is template table. Template table will automatic drop at end of session, then size of table will return to be zero.
Reference: Doc ID 1395195.1
Thứ Năm, 23 tháng 10, 2014
Clear Oracle Enterprise Manager Alert
Clear alert on EM
1. Make a SELECT * from MGMT_CURRENT_SEVERITY and show for the TARGET_GUID, METRIC_GUID and KEY_VALUE.
2. Connect to db user SYSMAN and execute:
for example:
3. Wait a few minutes.
1. Make a SELECT * from MGMT_CURRENT_SEVERITY and show for the TARGET_GUID, METRIC_GUID and KEY_VALUE.
2. Connect to db user SYSMAN and execute:
exec EM_SEVERITY.delete_current_severity(TARGET_GUID,METRIC_GUID,KEY_VALUE);
for example:
exec EM_SEVERITY.delete_current_severity('0DEB8E6980695B7548CF98871084AD10','F95BA0D95585002889E1ABF92B2DA7C3','SYS');
3. Wait a few minutes.
Thứ Tư, 23 tháng 7, 2014
Config Raid 0 in Linux
This port config raid 0 to improve Read/Write performance. We need 1 pc with 3 disk, 2 disk had same Disk size.
[root@vm04 mnt]# fdisk -l
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00035d1e
Device Boot Start End Blocks Id System
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000e9dc
Device Boot Start End Blocks Id System
Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009f996
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdc2 64 30402 243685376 8e Linux LVM
Disk /dev/mapper/vg_vm04-lv_root: 236.9 GB, 236948815872 bytes
255 heads, 63 sectors/track, 28807 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_vm04-lv_swap: 12.6 GB, 12582912000 bytes
255 heads, 63 sectors/track, 1529 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@vm04 mnt]# cd /
[root@vm04 /]# ls
bin cgroup etc lib lost+found misc net proc sbin srv tmp var
boot dev home lib64 media mnt opt root selinux sys usr
[root@vm04 /]# mkdir /disk1
[root@vm04 /]# mkdir /disk2
[root@vm04 /]# fdisk /dev/sda
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-60801, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-60801, default 60801):
Using default value 60801
Command (m for help): p
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000e9dc
Device Boot Start End Blocks Id System
/dev/sda1 1 60801 488384001 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@vm04 /]# fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-60801, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-60801, default 60801):
Using default value 60801
Command (m for help): p
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00035d1e
Device Boot Start End Blocks Id System
/dev/sdb1 1 60801 488384001 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@vm04 /]# mount /dev/sda1 /disk1
mount: you must specify the filesystem type
[root@vm04 /]# mkfs.ext4
mkfs.ext4 mkfs.ext4dev
[root@vm04 /]# mkfs.ext4 /dev/sda1
mke2fs 1.43-WIP (20-Jun-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
30531584 inodes, 122096000 blocks
6104800 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
3727 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
done
[root@vm04 /]#
[root@vm04 /]# mkfs.ext4 /dev/sdb1
mke2fs 1.43-WIP (20-Jun-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
30531584 inodes, 122096000 blocks
6104800 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
3727 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
done
[root@vm04 /]#
[root@vm04 /]# mount /dev/sda1 /disk1
[root@vm04 /]# mount /dev/sdb1 /disk2
[root@vm04 /]# fdisk -l
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00035d1e
Device Boot Start End Blocks Id System
/dev/sdb1 1 60801 488384001 83 Linux
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000e9dc
Device Boot Start End Blocks Id System
/dev/sda1 1 60801 488384001 83 Linux
Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009f996
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdc2 64 30402 243685376 8e Linux LVM
Disk /dev/mapper/vg_vm04-lv_root: 236.9 GB, 236948815872 bytes
255 heads, 63 sectors/track, 28807 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_vm04-lv_swap: 12.6 GB, 12582912000 bytes
255 heads, 63 sectors/track, 1529 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@vm04 /]# dd if=/dev/zero of=/dev/sda1 bs=1G count=1 oflag=direct
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB) copied, 9.20848 s, 117 MB/s
[root@vm04 /]# dd if=/dev/zero of=/dev/sdb1 bs=1G count=1 oflag=direct
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB) copied, 9.65729 s, 111 MB/s
[root@vm04 /]# umount /disk1
[root@vm04 /]# umount /disk2
[root@vm04 /]# mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sda1
mdadm: chunk size defaults to 512K
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
[root@vm04 /]# ls /dev/md
md/ md0
[root@vm04 /]# ls /dev/md0
/dev/md0
[root@vm04 /]# dd if=/dev/zero of=/dev/md0 bs=1G count=1 oflag=direct
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB) copied, 4.71866 s, 228 MB/s
[root@vm04 /]#
Thứ Tư, 16 tháng 10, 2013
VNCVIEWER via ssh
1) from destination server we need install and configuration vncserver
a) install vncserver with yum
b) start and config vncserver
start vncserver
Config password for vncserver
2) install vncviewer on client
#yum install vncviewer
or
#rpm -ivh vncviewer*
3) vnc via ssh
a) install vncserver with yum
#su -
#yum --install vncserver
b) start and config vncserver
start vncserver
#service start vncserver
#vncserver :5901
Config password for vncserver
#vncpasswd
2) install vncviewer on client
#yum install vncviewer
or
#rpm -ivh vncviewer*
3) vnc via ssh
#vncviewer -via "user@host -p port" localhost:1
Đăng ký:
Bài đăng (Atom)