| | Unix permissions problem under ORACLE_HOME
Apparently this is a known Oracle bug, after installing Oracle 10.2.0 Unix permissions under ORACLE_HOME are not set correctly, so directories and files are accessible to the installation user and group (i.e. oracle:dba) but not to the reset of the world (others). If you get any of the following errors ... | |  More... 04/26/06 | | | | | | | | |
|
| | Oracle automatic memory management
In Oracle10g memory can be managed automatically by setting parameter sga_target. Oracle will then manage parameters like: db_cache_size, shared_pool_size, java_pool_size, large_pool_size. You will see new '__' parameters created by Oracle:
__db_cache_size, __shared_pool_size, __java_pool_size, __large_pool_size, these are now dynamically managed.
Check what sga_target is set to:
SQL> sho parameter sga_target
NAME ... | |  More... 04/10/06 | | | | | | | | |
|
| | Show parent processes for zombies
Use this script to display all processes related (parents and children) to zombie processes on a Unix system. In this case processes are run by user oracle.
#!/bin/ksh
ZOMBIES=`ps -ef|grep oracle|grep 'defunct'|grep -v grep|awk '{printf("%s ", $2);}'`
if [ "X${ZOMBIES}" == "X" ] ; then
echo "No zombies found"
else
ptree ${ZOMBIES} | more
fi
The output may ... | | More... 04/05/06 | | | | | | | | |
|
|
|
| | Syntax to create database link
Syntax for creating db link in Oracle database:
create database link LINKNAME connect to USERNAME identified by "PASSWORD" using 'DBNAME';
| |  More... 03/08/06 | | | | | | | | |
|
| | Recover Oracle database and standby db examples
Just some handy quick syntax references for Oracle database recovery.
-- Recover Oracle standby database
select to_char(sysdate, 'dd/mm/yyyy hh24:mi:ss') AS start_time from dual;
ALTER DATABASE RECOVER automatic standby database until time '2006-02-24:09:00:00';
select to_char(sysdate, 'dd/mm/yyyy hh24:mi:ss') AS end_time from dual;
-- Recover database until certain time:
recover database until time '2006-02-24:09:00:00';
-- Recover database after RMAN restore ... | | More... 02/24/06 | | | | | | | | |
|
| | Remove www from URL using mod_rewrite
You may choose not to have www alias for your domain, so that www.domain.com will redirect to domain.com, use mod_rewrite and .htaccess to achieve this. (This may be useful if for example you have a really long domain name)
Put the following into your .htaccess
RewriteEngine on
rewritecond %{http_host} ^www\.domain\.com [nc]
rewriterule ^(.*)$ http://domain.com/$1 ... | | More... 02/19/06 | | | | | | | | |
|
|
| | Select random row from Oracle table
Use this query to select a random record from Oracle table. This works from TOAD as well as sqlplus:
SELECT col_name
FROM
(SELECT col_name
FROM table_name
ORDER BY dbms_random.value)
WHERE rownum = 1;
| |  More... 02/16/06 | | | | | | | | |
|
<< 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Page 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 >> |