Thursday, November 3, 2011
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Tuesday, October 18, 2011
How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ?
Thursday, October 6, 2011
Disable IPv6 on RedHat Enterprise RHEL 5.7
Install Oralce 11gr2 Grid on Virtual Box
TIPS from Oracle ASM disk owner
By default, the 2.6 kernel device file naming scheme udev dynamically creates device file names when the server is started, and assigns ownership of them to root. If udev applies default settings, then it changes device file names and owners for voting disks or Oracle Cluster Registry partitions, corrupting them when the server is restarted. For example, a voting disk on a device named /dev/sdd owned by the user grid may be on a device named /dev/sdf owned by root after restarting the server.If you use ASMLIB, then you do not need to ensure permissions and device path persistency in udev.
If you do not use ASMLIB, then you must create a custom rules file. When udev is started, it sequentially carries out rules (configuration directives) defined in rules files. These files are in the path /etc/udev/rules.d/. Rules files are read in lexical order. For example, rules in the file 10-wacom.rules are parsed and carried out before rules in the rules file 90-ib.rules.
When specifying the device information in the UDEV rules file, ensure that the OWNER, GROUP and MODE are specified before any other characteristics in the order shown. For example, if you want to include the characteristic ACTION on the UDEV line, then specify ACTION after OWNER, GROUP, and MODE.
Where rules files describe the same devices, on the supported Linux kernel versions, the last file read is the one that is applied.
To configure a permissions file for disk devices, complete the following tasks:
To obtain information about existing block devices, run the command
scsi_id(/sbin/scsi_id) on storage devices from one cluster node to obtain their unique device identifiers. When running thescsi_idcommand with the-sargument, the device path and name passed should be that relative to thesysfsdirectory/sys(for example,/block/device) when referring to/sys/block/device. For example:# /sbin/scsi_id -g -s /block/sdb/sdb1 360a98000686f6959684a453333524174 # /sbin/scsi_id -g -s /block/sde/sde1 360a98000686f6959684a453333524179
Record the unique SCSI identifiers of clusterware devices, so you can provide them when required.
Note:
The commandscsi_idshould return the same device identifier value for a given device, regardless of which node the command is run from.Configure SCSI devices as trusted devices (white listed), by editing the
/etc/scsi_id.configfile and addingoptions=-gto the file. For example:# cat > /etc/scsi_id.config vendor="ATA",options=-p 0x80 options=-g
Using a text editor, create a UDEV rules file for the Oracle ASM devices, setting permissions to 0660 for the installation owner and the group whose members are administrators of the Oracle Grid Infrastructure software. For example, using the installation owner
gridand using a role-based group configuration, with the OSASM groupasmadmin:# vi /etc/udev/rules.d/99-oracle-asmdevices.rules KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="14f70656e66696c00000000", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?2", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="14f70656e66696c00000001", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?3", BUS=="scsi", PROGRAM=="/sbin/scsi_id", RESULT=="14f70656e66696c00000002", OWNER="grid", GROUP="asmadmin", MODE="0660"
Copy the
rules.dfile to all other nodes on the cluster. For example:# scp 99-oracle-asmdevices.rules root@node2:/etc/udev/rules.d/99-oracle-asmdevices.rules
Load updated block device partition tables on all member nodes of the cluster, using
/sbin/partprobedevicename. You must do this asroot.Run the command
udevtest(/sbin/udevtest) to test the UDEV rules configuration you have created. The output should indicate that the block devices are available and the rules are applied as expected. For example:# udevtest /block/sdb/sdb1 main: looking at device '/block/sdb/sdb1' from subsystem 'block' udev_rules_get_name: add symlink 'disk/by-id/scsi-360a98000686f6959684a453333524174-part1' udev_rules_get_name: add symlink 'disk/by-path/ip-192.168.1.1:3260-iscsi-iqn.1992-08.com.netapp:sn.887085-part1' udev_node_mknod: preserve file '/dev/.tmp-8-17', because it has correct dev_t run_program: '/lib/udev/vol_id --export /dev/.tmp-8-17' run_program: '/lib/udev/vol_id' returned with status 4 run_program: '/sbin/scsi_id' run_program: '/sbin/scsi_id' (stdout) '360a98000686f6959684a453333524174' run_program: '/sbin/scsi_id' returned with status 0 udev_rules_get_name: rule applied, 'sdb1' becomes 'ocr1' udev_device_event: device '/block/sdb/sdb1' validate currently present symlinks udev_node_add: creating device node '/dev/ocr1', major = '8', minor = '17', mode = '0640', uid = '0', gid = '500' udev_node_add: creating symlink '/dev/disk/by-id/scsi-360a98000686f6959684a453333524174-part1' to '../../ocr1' udev_node_add: creating symlink '/dev/disk/by-path/ip-192.168.1.1:3260-iscsi-iqn.1992-08.com.netapp:sn.84187085 -part1' to '../../ocr1' main: run: 'socket:/org/kernel/udev/monitor' main: run: '/lib/udev/udev_run_devd' main: run: 'socket:/org/freedesktop/hal/udev_event' main: run: '/sbin/pam_console_apply /dev/ocr1 /dev/disk/by-id/scsi-360a98000686f6959684a453333524174-part1 /dev/disk/by-path/ip-192.168.1.1:3260-iscsi-iqn.1992-08.com.netapp:sn.84187085- part1'
In the example output, note that applying the rules renames OCR device
/dev/sdb1to/dev/ocr1.Enter the command to restart the UDEV service.
On Asianux, Oracle Linux 5, and RHEL5, the commands are:
# /sbin/udevcontrol reload_rules # /sbin/start_udev
On SUSE 10 and 11, the command is:
# /etc/init.d boot.udev restart
Wednesday, September 28, 2011
Script show Solaris system information
Thursday, September 1, 2011
setup mail function in 11g use new ACL
Tuesday, March 15, 2011
SQL Server get all tables size
Friday, November 19, 2010
ORA-01548 active rollback segment , Unable drop undo tablespace
- find out active rollback segment. Either by SQL or try to drop undo tablespace.
select segment_name, status from dba_rollback_segs where tablespace_name='undotbs_corrupt' and status = ‘NEEDS RECOVERY’; - shutdown database. It may take pretty long time to shutdown.
- change parameter
*.undo_management='MANUAL'
*._offline_rollback_segments=_SYSSMU10$,_SYSSMU11$,_SYSSMU12$,_SYSSMU13$,_SYSSMU14$,_SYSSMU15$,_SYSSMU16$) - bring up database
- Drop the UNDO tablespace.
- Recreate UNDO tablespace.
- shutdown database
- change parameter back to original
- bring up database
Tuesday, July 6, 2010
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
There are two way to get around it.
- Put UR=A in your tnsnames.ora for the entry. e.g.
STBY=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = STBY)
(UR = A)
)
) - Create static listener to allow listener know which oracle SID to connect. e.g.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = TESTDB.gov.edmonton.ab.ca)
(ORACLE_HOME = /u01/app/ora10g/product/10.2.0.4/db_1)
(SID_NAME = TESTDB1)
)
)
After you change listener.ora you need reload listener to take effect.
Thursday, November 26, 2009
Fix ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
2. change parameter use manual management of undo, else you can't open database
undo_management=manual
3. startup database
4. recreate undo tablespace
drop tablespace undotbs1 including contents and datafiles;
create UNDO TABLESPACE "UNDOTBS1" DATAFILE 'F:\ORACLE\ORADATA\ORACLE_SID\UNDOTBS1.ORA' SIZE 200M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;
5. restart database
6. check alert log. done.
Tuesday, June 23, 2009
Key step of setup APEX on 11G RAC
--/u01/app/ora10g/oms10g/Apache/modplsql/conf/dads.conf
--add the following lines to file dads.conf
Alias /i/ "/u01/app/ora10g/oms10g/Apache/images/"
AddType text/xml xbl
AddType text/x-component htc
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sss-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=xxx-vip)(PORT=1521))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=DBSERVICENAME))) TNSFormat
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword apexpassword
PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
Allow from all
/*
Beaware no space in the value field and TNSFormat is ritht setting instead of TNSNamesFormat
[Mon Jun 22 16:15:51 2009] [error] mod_plsql: '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oak-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=olive-vip)(PORT=1521
))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=OEMT))) TNSNamesFormat' is not allowed for parameter 'PlsqlDatabaseConnectString' in DAD '/p
ls/apex' (Should be one of [SIDFormat], [ServiceNameFormat], [TNSFormat], [NetServiceNameFormat], or blank for backward compatibility format)
*/
Monday, April 27, 2009
steps needed for Xming
Xlib: connection to "162.106.51.66:0.0" refused by server
Xlib: No protocol specified
the file is located in the binary folder with xming. Just add your server name or IP in it.
also you can limit users.
eg.
servera
servera:oracle
reference: http://www.windowsreference.com/free-utilities/xming-free-x-windows-server-for-windows-2000xpvista/
create a oracle user authenticated by OS
2. create user in oracle database.
CREATE USER os_oracle IDENTIFIED EXTERNALLY
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp
;
GRANT dba TO oracle;
exit;
3. make sure the user oracle is in OS dba group.
Friday, April 24, 2009
Putty settings
to tranfer your setting to another machine you can export the setting and import the setting.
to export:
regedit /e putty.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
To import settings:
regedit /s putty.reg
I have run into a problem that the windows title is set and it then become fixed always show the title in the setting. To let dynamic title with server name back you need clear the the setting under windows behaviour. Or delete windowtitle from registry.
