Author Archives: Andrew Fraser

Change many oracle database parameters using a temporary pfile/init.ora from spfile

Spfiles are better than pfiles (init.ora’s) for most purposes, since they allow parameters to be changed with “alter system set parameter” SQL commands. However if you want to change a whole load of parameters in one go, it is easier … Continue reading

Posted in Spfile | Leave a comment

List all crons and database links with scripts

I’m currently listing all interfaces – database links and cron jobs – into excel, and used these two scripts to automate the process. Shell script to list all crons (note that this assumes crons in /etc/cron.d run as root): for … Continue reading

Posted in Database links, Scripts | Leave a comment

unlock orcladmin password in shell script

Shell script to check if orcladmin account is locked, and unlock it if required # Check to see if orcladmin account is locked, and unlock it if it is. if [ “`ldapbind -p <myport> -D cn=orcladmin -w <myorcladminpassword>`” = “bind … Continue reading

Posted in Oracle forms, Scripts, Security | Leave a comment

Indexed views – workaround for “Cannot create index on view because it uses a LEFT, RIGHT, or FULL OUTER join, and no OUTER joins are allowed in indexed views. Consider using an INNER join instead.”

Indexed views (the SQL Server equivalent of Oracle’s materialized views) are a good performance fix, especially for reporting and data warehouse systems. However they only work with inner joins. Attempts to create an indexed view with outer joins fail with: … Continue reading

Posted in Performance tuning, SQL server | Leave a comment

Oracle range limit AD BC dates

This is the extreme limit for oracle dates: alter session set nls_date_format = ‘Dy DD-Mon-YYYY AD’ ; select sysdate, to_date(’01-JAN-4712 BC’,'DD-MON-YYYY AD’), to_date(’30-DEC-9999 AD’,'DD-MON-YYYY AD’) from dual ; Without encountering this error: ORA-01841: (full) year must be between -4713 and … Continue reading

Posted in Uncategorized | Leave a comment

Oracle SQL Developer privileges for Other Users procedures and package bodies

To view code for procedures and package bodies in SQL Developer that are owned by other users, you need the following privilege: grant select_catalog_role to <user> ; This privilege does not give access to the sys.link$ view, so should be … Continue reading

Posted in SQL Developer | Leave a comment

Oracle Data Guard Overview

Oracle Data Guard is Oracle’s main solution for high availability in the event of a disaster. This overview is for Oracle 11gR2. A pdf version of this page is available here.

Posted in Dataguard | 1 Comment

Switch Oracle Forms List of Values on and off dynamically at run time

In e.g. post-query block level trigger: IF block.check_field = ‘F’ THEN — switch on Set_Item_Property( ‘block.field’ , LOV_NAME, ‘your lov’) ; Set_Item_Property( ‘block.field’, VALIDATE_FROM_LIST, PROPERTY_TRUE); ELSE — switch off Set_Item_Property( ‘block.field’ , LOV_NAME, ”) ; Set_Item_Property( ‘block.field’, VALIDATE_FROM_LIST, PROPERTY_FALSE); END … Continue reading

Posted in Oracle forms | Leave a comment

Oracle Developer Suite 10g 9.0.4.0.1 windows software download media

Oracle Developer Suite 10g 9.0.4.0.1 for Windows (forms developer) is not easy to obtain now, out of support by Oracle for a long time, but that version is still in use out there. So I have zipped both installation CDs … Continue reading

Posted in Uncategorized | 6 Comments

Cron fix for ulimit: max user processes: cannot modify limit:operation not permitted

Werner Puschitz has details of how to use ulimit and limits.conf to change maximum processes and open file descriptors. But for processes running from cron, I found I had to additionally make the below changes (this is on old version: … Continue reading

Posted in Uncategorized | 1 Comment