Default security: "Local OS Authentication"
LSNRCTL> start
Starting /u01/app/oracle/product/11.2.0.2/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0.2/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/vmxdb01/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 02-MAY-2011 19:51:12
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.2/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/vmxdb01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
Now set a password
[oracle@vmxdb01 ~]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 02-MAY-2011 19:52:28
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File /u01/app/oracle/product/11.2.0.2/db_1/network/admin/listener.ora
Old Parameter File /u01/app/oracle/product/11.2.0.2/db_1/network/admin/listener.bak
The command completed successfully
LSNRCTL> exit
[oracle@vmxdb01 ~]$ cat /u01/app/oracle/product/11.2.0.2/db_1/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.2/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vmxdb01.lab.dbaglobe.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
#----ADDED BY TNSLSNR 02-MAY-2011 19:52:41---
PASSWORDS_LISTENER = 8BF532933B238679
#--------------------------------------------
[oracle@vmxdb01 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 02-MAY-2011 19:52:52
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 02-MAY-2011 19:51:12
Uptime 0 days 0 hr. 1 min. 39 sec
Trace Level off
Security ON: Password or Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.2/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/vmxdb01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
Now the listener has a security concern, because it can be stopped remotely.
on another machine, adding following lines to tnsnames.ora
VMXDB01_LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.21)(PORT = 1521))
)
)
And the listener can be stopped remotely:
C:\Documents and Settings\donghua>lsnrctl
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 02-MAY-2011 19:56
:43
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> set current_listener VMXDB01_LISTENER
Current Listener is VMXDB01_LISTENER
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.21)(PORT=1521)))
TNS-01169: The listener has not recognized the password
TNS-01189: The listener could not authenticate the user
LSNRCTL> set password ora123
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.21)(PORT=1521)))
The command completed successfully
Monday, May 2, 2011
What a OS user can do if it inside a OSDBA group
Setup:
The user can stop and start the database instance through OS authentication
The user can NOT stop listener, because listener was started by user "oracle".
Even change the primary group to "oinstall", it still failed to stop the listener.
"root" user is able to stop the listener, when starting the listener using "root", the listener run as "daemon" user, instead of oracle, so the listener should always started by the software owner of the oracle home.
[oracle1@vmxdb01 ~]$ ps -ef|grep tnslsnr|grep -v grep
oracle 1953 1 0 18:03 ? 00:00:00 /u01/app/oracle/product/11.2.0.2/db_1/bin/tnslsnr LISTENER -inherit
[oracle1@vmxdb01 ~]$ ps -ef|grep smon|grep -v grep
oracle 2041 1 0 18:03 ? 00:00:00 ora_smon_orcl
[oracle1@vmxdb01 ~]$ id oracle1
uid=501(oracle1) gid=100(users) groups=100(users),501(dba)
[root@vmxdb01 ~]# id oracle
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
The user can stop and start the database instance through OS authentication
[oracle1@vmxdb01 ~]$ export ORACLE_SID=orcl
[oracle1@vmxdb01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 18:22:23 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show user
USER is "SYS"
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle1@vmxdb01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 18:22:46 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 627732480 bytes
Fixed Size 1345992 bytes
Variable Size 411043384 bytes
Database Buffers 209715200 bytes
Redo Buffers 5627904 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle1@vmxdb01 ~]$ ps -ef|grep smon
oracle 3371 1 0 18:22 ? 00:00:00 ora_smon_orcl
oracle1 3477 3185 0 18:23 pts/1 00:00:00 grep smon
The user can NOT stop listener, because listener was started by user "oracle".
Even change the primary group to "oinstall", it still failed to stop the listener.
[oracle1@vmxdb01 ~]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 02-MAY-2011 18:23:25
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 02-MAY-2011 18:03:13
Uptime 0 days 0 hr. 20 min. 13 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.2/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/vmxdb01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmxdb01.lab.dbaglobe.com)(PORT=1521)))
TNS-01190: The user is not authorized to execute the requested listener command
"root" user is able to stop the listener, when starting the listener using "root", the listener run as "daemon" user, instead of oracle, so the listener should always started by the software owner of the oracle home.
Different naming methods to connect oracle database
donghua@rh6:~$ tnsping orcl
TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 02-MAY-2011 09:11:43
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vmxdb01.lab.dbaglobe.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (20 msec)
Directly specify complete connection descriptor
donghua@rh6:~$ sqlplus donghua/donghua@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vmxdb01.lab.dbaglobe.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 09:12:01 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Use TNSNAMES
donghua@rh6:~$ sqlplus donghua/donghua@orcl
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 09:13:05 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
EASY Connect
donghua@rh6:~$ sqlplus donghua/donghua@vmxdb01.lab.dbaglobe.com/orcl
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 09:13:27 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
donghua@rh6:~$
Using TWO_TASK environment variable (Using LOCAL on Windows)
donghua@rh6:~$ export TWO_TASK=orcl
donghua@rh6:~$ sqlplus donghua/donghua
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 09:27:57 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select instance_name,host_name from v$instance;
INSTANCE_NAME
----------------
HOST_NAME
----------------------------------------------------------------
orcl
vmxdb01.lab.dbaglobe.com
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 02-MAY-2011 09:11:43
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vmxdb01.lab.dbaglobe.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (20 msec)
Directly specify complete connection descriptor
donghua@rh6:~$ sqlplus donghua/donghua@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vmxdb01.lab.dbaglobe.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 09:12:01 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Use TNSNAMES
donghua@rh6:~$ sqlplus donghua/donghua@orcl
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 09:13:05 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
EASY Connect
donghua@rh6:~$ sqlplus donghua/donghua@vmxdb01.lab.dbaglobe.com/orcl
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 09:13:27 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
donghua@rh6:~$
Using TWO_TASK environment variable (Using LOCAL on Windows)
donghua@rh6:~$ export TWO_TASK=orcl
donghua@rh6:~$ sqlplus donghua/donghua
SQL*Plus: Release 11.2.0.2.0 Production on Mon May 2 09:27:57 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select instance_name,host_name from v$instance;
INSTANCE_NAME
----------------
HOST_NAME
----------------------------------------------------------------
orcl
vmxdb01.lab.dbaglobe.com
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Sunday, May 1, 2011
Necessary workaround to install Oracle 11gR2 client on Ubuntu 11.04 (64bit)
Environment:
donghua@rh6:/usr/lib/x86_64-linux-gnu$ lsb_release -id
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Actually I did not experience such issue on Ubuntu 10.10
Symptoms:
/opt/software/client_112020/bin/genclntsh
/usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a
collect2: ld returned 1 exit status
genclntsh: Failed to link libclntsh.so.11.1
make: *** [client_sharedlib] Error 1
Workaround:
sudo ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /usr/bin/awk /bin/awk
The workaround works:
donghua@rh6:/usr/lib/x86_64-linux-gnu$ sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Sun May 1 16:23:56 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name:
donghua@rh6:/usr/lib/x86_64-linux-gnu$ lsb_release -id
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Actually I did not experience such issue on Ubuntu 10.10
Symptoms:
/opt/software/client_112020/bin/genclntsh
/usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a
collect2: ld returned 1 exit status
genclntsh: Failed to link libclntsh.so.11.1
make: *** [client_sharedlib] Error 1
Workaround:
sudo ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /usr/bin/awk /bin/awk
The workaround works:
donghua@rh6:/usr/lib/x86_64-linux-gnu$ sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Sun May 1 16:23:56 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name:
Configure Oracle ASMLIB on RHEL5
[root@vmxdb02 ~]# groupadd -g 500 oinstall
[root@vmxdb02 ~]# groupadd -g 501 dba
[root@vmxdb02 ~]# useradd -g 500 -G 501 -u 500 -m -d /home/oracle oracle
[root@vmxdb02 ~]# echo ora123|passwd --stdin oracle
Changing password for user oracle.
passwd: all authentication tokens updated successfully.
[root@vmxdb02 stage]# rpm -ihv oracleasm-support-2.1.4-1.el5.i386.rpm
warning: oracleasm-support-2.1.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@vmxdb02 stage]# rpm -ihv oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686.rpm
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-238.el########################################### [100%]
[root@vmxdb02 stage]# rpm -ihv oracleasmlib-2.0.4-1.el5.i386.rpm
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@vmxdb02 stage]# /etc/init.d/
acpid cups-config-daemon irqbalance multipathd portmap single
anacron dnsmasq iscsi netconsole psacct smartd
apmd dund iscsid netfs rawdevices sshd
atd firstboot isdn netplugd rdisc syslog
auditd functions kdump network readahead_early sysstat
autofs gpm killall NetworkManager readahead_later vmware-tools
avahi-daemon haldaemon krb524 nfs restorecond vncserver
avahi-dnsconfd halt kudzu nfslock rhnsd wdaemon
bluetooth hidd lvm2-monitor nscd rpcgssd winbind
capi hplip mcstrans ntpd rpcidmapd wpa_supplicant
conman ip6tables mdmonitor oracleasm rpcsvcgssd xfs
cpuspeed ipmi mdmpd oraclevalidated saslauthd xinetd
crond iptables messagebus pand sendmail ypbind
cups irda microcode_ctl pcscd setroubleshoot yum-updatesd
[root@vmxdb02 stage]# /etc/init.d/oracle
oracleasm oraclevalidated
[root@vmxdb02 stage]# /etc/init.d/oracleasm
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@vmxdb02 stage]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk
Action "createdisk" requires two arguments, the device and the label.
See oracleasm.init(8) for more information.
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk /dev/sdb1
Action "createdisk" requires two arguments, the device and the label.
See oracleasm.init(8) for more information.
[root@vmxdb02 stage]# man oracleasm.init
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk DISK1 /dev/sdb1
Marking disk "DISK1" as an ASM disk: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk DISK2 /dev/sdb2
Marking disk "DISK2" as an ASM disk: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk DISK3 /dev/sdb3
Marking disk "DISK3" as an ASM disk: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk DISK4 /dev/sdb4
Marking disk "DISK4" as an ASM disk: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm listdisks
DISK1
DISK2
DISK3
DISK4
[root@vmxdb02 stage]# /etc/init.d/oracleasm querydisk disk1
Disk "DISK1" is a valid ASM disk
[root@vmxdb02 stage]# /etc/init.d/oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@vmxdb02 stage]# ls -l /dev/oracleasm/
total 0
drwxr-xr-x 1 root root 0 May 1 11:42 disks
drwxrwx--- 1 oracle dba 0 May 1 11:42 iid
[root@vmxdb02 stage]# ls -l /dev/oracleasm/disks/
total 0
brw-rw---- 1 oracle dba 8, 17 May 1 11:44 DISK1
brw-rw---- 1 oracle dba 8, 18 May 1 11:44 DISK2
brw-rw---- 1 oracle dba 8, 19 May 1 11:44 DISK3
brw-rw---- 1 oracle dba 8, 20 May 1 11:45 DISK4
[root@vmxdb02 stage]#
[root@vmxdb02 ~]# groupadd -g 501 dba
[root@vmxdb02 ~]# useradd -g 500 -G 501 -u 500 -m -d /home/oracle oracle
[root@vmxdb02 ~]# echo ora123|passwd --stdin oracle
Changing password for user oracle.
passwd: all authentication tokens updated successfully.
[root@vmxdb02 stage]# rpm -ihv oracleasm-support-2.1.4-1.el5.i386.rpm
warning: oracleasm-support-2.1.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@vmxdb02 stage]# rpm -ihv oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686.rpm
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-238.el########################################### [100%]
[root@vmxdb02 stage]# rpm -ihv oracleasmlib-2.0.4-1.el5.i386.rpm
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@vmxdb02 stage]# /etc/init.d/
acpid cups-config-daemon irqbalance multipathd portmap single
anacron dnsmasq iscsi netconsole psacct smartd
apmd dund iscsid netfs rawdevices sshd
atd firstboot isdn netplugd rdisc syslog
auditd functions kdump network readahead_early sysstat
autofs gpm killall NetworkManager readahead_later vmware-tools
avahi-daemon haldaemon krb524 nfs restorecond vncserver
avahi-dnsconfd halt kudzu nfslock rhnsd wdaemon
bluetooth hidd lvm2-monitor nscd rpcgssd winbind
capi hplip mcstrans ntpd rpcidmapd wpa_supplicant
conman ip6tables mdmonitor oracleasm rpcsvcgssd xfs
cpuspeed ipmi mdmpd oraclevalidated saslauthd xinetd
crond iptables messagebus pand sendmail ypbind
cups irda microcode_ctl pcscd setroubleshoot yum-updatesd
[root@vmxdb02 stage]# /etc/init.d/oracle
oracleasm oraclevalidated
[root@vmxdb02 stage]# /etc/init.d/oracleasm
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@vmxdb02 stage]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk
Action "createdisk" requires two arguments, the device and the label.
See oracleasm.init(8) for more information.
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk /dev/sdb1
Action "createdisk" requires two arguments, the device and the label.
See oracleasm.init(8) for more information.
[root@vmxdb02 stage]# man oracleasm.init
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk DISK1 /dev/sdb1
Marking disk "DISK1" as an ASM disk: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk DISK2 /dev/sdb2
Marking disk "DISK2" as an ASM disk: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk DISK3 /dev/sdb3
Marking disk "DISK3" as an ASM disk: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm createdisk DISK4 /dev/sdb4
Marking disk "DISK4" as an ASM disk: [ OK ]
[root@vmxdb02 stage]# /etc/init.d/oracleasm listdisks
DISK1
DISK2
DISK3
DISK4
[root@vmxdb02 stage]# /etc/init.d/oracleasm querydisk disk1
Disk "DISK1" is a valid ASM disk
[root@vmxdb02 stage]# /etc/init.d/oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@vmxdb02 stage]# ls -l /dev/oracleasm/
total 0
drwxr-xr-x 1 root root 0 May 1 11:42 disks
drwxrwx--- 1 oracle dba 0 May 1 11:42 iid
[root@vmxdb02 stage]# ls -l /dev/oracleasm/disks/
total 0
brw-rw---- 1 oracle dba 8, 17 May 1 11:44 DISK1
brw-rw---- 1 oracle dba 8, 18 May 1 11:44 DISK2
brw-rw---- 1 oracle dba 8, 19 May 1 11:44 DISK3
brw-rw---- 1 oracle dba 8, 20 May 1 11:45 DISK4
[root@vmxdb02 stage]#
Refered settings of kernel parameter settings on Linux
[root@vmxdb02 ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Oracle Enterprise Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
# See /usr/share/doc/kernel-doc-*/Documentation/networking/ip-sysctl.txt
net.ipv4.conf.default.rp_filter = 2
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in bytes
# Controls the default maxmimum size of a mesage queue
# Controls the maximum shared segment size, in bytes
# Controls the maximum number of shared memory segments, in pages
# For 11g, Oracle-Validated setting for fs.file-max is 6815744
# For 10g, uncomment 'fs.file-max = 327679', and comment 'fs.file-max = 6553600' entry and re-run sysctl -p
# fs.file-max = 327679
fs.file-max = 6815744
# Oracle-Validated setting for kernel.msgmni is 2878
kernel.msgmni = 2878
# Oracle-Validated setting for kernel.msgmax is 8192
kernel.msgmax = 8192
# Oracle-Validated setting for kernel.msgmnb is 65536
kernel.msgmnb = 65536
# Oracle-Validated setting for kernel.sem is '250 32000 100 142'
kernel.sem = 250 32000 100 142
# Oracle-Validated setting for kernel.shmmni is 4096
kernel.shmmni = 4096
# Oracle-Validated setting for kernel.shmall is 1073741824
kernel.shmall = 1073741824
# Oracle-Validated setting for kernel.shmmax is 4398046511104 on x86_64 and 4294967295 on i386 architecture. Refer Note id 567506.1
kernel.shmmax = 4294967295
# Oracle-Validated setting for kernel.sysrq is 1
kernel.sysrq = 1
# Oracle-Validated setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144
# For 11g, Oracle-Validated setting for net.core.rmem_max is 4194304
# For 10g, uncomment 'net.core.rmem_max = 2097152', comment 'net.core.rmem_max = 4194304' entry and re-run sysctl -p
# net.core.rmem_max = 2097152
net.core.rmem_max = 4194304
# Oracle-Validated setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144
# For 11g, Oracle-Validated setting for net.core.wmem_max is 1048576
# For 10g, uncomment 'net.core.wmem_max = 262144', comment 'net.core.wmem_max = 1048576' entry for this parameter and re-run sysctl -p
# net.core.wmem_max = 262144
net.core.wmem_max = 1048576
# Oracle-Validated setting for fs.aio-max-nr is 3145728
fs.aio-max-nr = 3145728
# For 11g, Oracle-Validated setting for net.ipv4.ip_local_port_range is 9000 65500
# For 10g, uncomment 'net.ipv4.ip_local_port_range = 1024 65000', comment 'net.ipv4.ip_local_port_range = 9000 65500' entry and re-run sysctl -p
# net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.ip_local_port_range = 9000 65500
# Oracle-Validated setting for vm.min_free_kbytes is 51200 to avoid OOM killer
vm.min_free_kbytes = 51200
[root@vmxdb02 ~]# cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
# -
#Where:
# can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
# can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#- can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to
# - rtprio - max realtime priority
# -
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
# End of file
# Oracle-Validated setting for nofile soft limit is 131072
oracle soft nofile 131072
# Oracle-Validated setting for nofile hard limit is 131072
oracle hard nofile 131072
# Oracle-Validated setting for nproc soft limit is 131072
oracle soft nproc 131072
# Oracle-Validated setting for nproc hard limit is 131072
oracle hard nproc 131072
# Oracle-Validated setting for core soft limit is unlimited
oracle soft core unlimited
# Oracle-Validated setting for core hard limit is unlimited
oracle hard core unlimited
# Oracle-Validated setting for memlock soft limit is 3500000
oracle soft memlock 3500000
# Oracle-Validated setting for memlock hard limit is 3500000
oracle hard memlock 3500000
# For 11.1.0.6, Oracle-Validated setting for stack hard limit is 32MB due to bugdb6820451, this bug is fixed in 11.2, please uncomment 'oracle hard stack 32768' if oracle version is 11.1.0.6
# oracle hard stack 32768
# Kernel sysctl configuration file for Oracle Enterprise Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
# See /usr/share/doc/kernel-doc-*/Documentation/networking/ip-sysctl.txt
net.ipv4.conf.default.rp_filter = 2
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in bytes
# Controls the default maxmimum size of a mesage queue
# Controls the maximum shared segment size, in bytes
# Controls the maximum number of shared memory segments, in pages
# For 11g, Oracle-Validated setting for fs.file-max is 6815744
# For 10g, uncomment 'fs.file-max = 327679', and comment 'fs.file-max = 6553600' entry and re-run sysctl -p
# fs.file-max = 327679
fs.file-max = 6815744
# Oracle-Validated setting for kernel.msgmni is 2878
kernel.msgmni = 2878
# Oracle-Validated setting for kernel.msgmax is 8192
kernel.msgmax = 8192
# Oracle-Validated setting for kernel.msgmnb is 65536
kernel.msgmnb = 65536
# Oracle-Validated setting for kernel.sem is '250 32000 100 142'
kernel.sem = 250 32000 100 142
# Oracle-Validated setting for kernel.shmmni is 4096
kernel.shmmni = 4096
# Oracle-Validated setting for kernel.shmall is 1073741824
kernel.shmall = 1073741824
# Oracle-Validated setting for kernel.shmmax is 4398046511104 on x86_64 and 4294967295 on i386 architecture. Refer Note id 567506.1
kernel.shmmax = 4294967295
# Oracle-Validated setting for kernel.sysrq is 1
kernel.sysrq = 1
# Oracle-Validated setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144
# For 11g, Oracle-Validated setting for net.core.rmem_max is 4194304
# For 10g, uncomment 'net.core.rmem_max = 2097152', comment 'net.core.rmem_max = 4194304' entry and re-run sysctl -p
# net.core.rmem_max = 2097152
net.core.rmem_max = 4194304
# Oracle-Validated setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144
# For 11g, Oracle-Validated setting for net.core.wmem_max is 1048576
# For 10g, uncomment 'net.core.wmem_max = 262144', comment 'net.core.wmem_max = 1048576' entry for this parameter and re-run sysctl -p
# net.core.wmem_max = 262144
net.core.wmem_max = 1048576
# Oracle-Validated setting for fs.aio-max-nr is 3145728
fs.aio-max-nr = 3145728
# For 11g, Oracle-Validated setting for net.ipv4.ip_local_port_range is 9000 65500
# For 10g, uncomment 'net.ipv4.ip_local_port_range = 1024 65000', comment 'net.ipv4.ip_local_port_range = 9000 65500' entry and re-run sysctl -p
# net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.ip_local_port_range = 9000 65500
# Oracle-Validated setting for vm.min_free_kbytes is 51200 to avoid OOM killer
vm.min_free_kbytes = 51200
[root@vmxdb02 ~]# cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#Where:
#
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to
# - rtprio - max realtime priority
#
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
# End of file
# Oracle-Validated setting for nofile soft limit is 131072
oracle soft nofile 131072
# Oracle-Validated setting for nofile hard limit is 131072
oracle hard nofile 131072
# Oracle-Validated setting for nproc soft limit is 131072
oracle soft nproc 131072
# Oracle-Validated setting for nproc hard limit is 131072
oracle hard nproc 131072
# Oracle-Validated setting for core soft limit is unlimited
oracle soft core unlimited
# Oracle-Validated setting for core hard limit is unlimited
oracle hard core unlimited
# Oracle-Validated setting for memlock soft limit is 3500000
oracle soft memlock 3500000
# Oracle-Validated setting for memlock hard limit is 3500000
oracle hard memlock 3500000
# For 11.1.0.6, Oracle-Validated setting for stack hard limit is 32MB due to bugdb6820451, this bug is fixed in 11.2, please uncomment 'oracle hard stack 32768' if oracle version is 11.1.0.6
# oracle hard stack 32768
Saturday, April 30, 2011
Warning: log write time
Symptoms:
Oracle 10.2.0.4 on Solaris sparc 64bit (Solaris 10)
===========================================================
Warning: log write time 930ms, size 1176KB
*** 2011-04-14 10:00:06.961
Warning: log write time 3170ms, size 3651KB
*** 2011-04-14 10:00:10.684
Warning: log write time 790ms, size 969KB
Explanation:
The above warning messages has been introduced in 10.2.0.4 patchset. This warning message
will be generated only if the log write time is more than 500 ms and it will be written to the lgwr trace file.
These messages are very much expected in 10.2.0.4 database in case the log write is more than 500 ms.
This is a warning which means that the write process is not as fast as it intended to be.
Oracle 10.2.0.4 on Solaris sparc 64bit (Solaris 10)
===========================================================
Warning: log write time 930ms, size 1176KB
*** 2011-04-14 10:00:06.961
Warning: log write time 3170ms, size 3651KB
*** 2011-04-14 10:00:10.684
Warning: log write time 790ms, size 969KB
Explanation:
The above warning messages has been introduced in 10.2.0.4 patchset. This warning message
will be generated only if the log write time is more than 500 ms and it will be written to the lgwr trace file.
These messages are very much expected in 10.2.0.4 database in case the log write is more than 500 ms.
This is a warning which means that the write process is not as fast as it intended to be.
Subscribe to:
Posts (Atom)