| | Find segments with corrupted blocks
RMAN picks up logical block corruption when you use the following option in your backup script:
backup full check logical
The following procedure helps to identify segments with corrupted blocks if there are many occurrences of block corruption in the alert log file:
1. Get the list of all currupted blocks (replace alert_DB.log ... | |  More... 10/28/05 | | | | | | | | |
|
| | Changing shared_pool_size dynamically
On Oracle 10.1.0.4.0 changing shared_pool_size dynamically seems to crash the databases. So if you run
alter system set shared_pool_size = 400M;
or
alter system set shared_pool_size = 400M scope = both;
The database will crash with
ERROR at line 1:
ORA-03113: end-of-file on communication channel
It seems that you still have to modify ini file ... | | More... 10/27/05 | | | | | | | | |
|
| | Search and replace using sed
Here's a basic example of using sed. Search file_src for all ocurrences of string1 and replace them with string2, write the output to file_dest
sed s/string1/string2/g file_src > file_dest
| | More... 10/26/05 | | | | | | | | |
|
|
| | Put tablespaces in backup mode
--
-- Sample script to generate start backup and end backup scripts
-- for all tablespaces in the database
--
set pagesize echo off feedback off verify off
spool BEGIN_BACKUP.sql
SELECT 'spool BEGIN_BACKUP.log'
FROM dual;
SELECT 'ALTER SYSTEM SWITCH LOGFILE;'
FROM dual;
SELECT 'ALTER TABLESPACE ' || tablespace_name || ' BEGIN BACKUP;'
FROM dba_tablespaces;
SELECT 'ALTER DATABASE BACKUP CONTROLFILE TO ... | | More... 10/26/05 | | | | | | | | |
|
|
| | Set shell variables from SQLPLUS query results
Example script for getting sqlplus query results into environment variables using awk and ksh (I only use bash or ksh so don't even know how to set a variable in csh).
Replace USER with the actual username, PASS with user's password and DB with the tnsname for database you're connecting to. ... | |  More... 10/26/05 | | | | | | | | |
|
| | Using mod_rewrite to redirect from dom.com to www.dom.com
Normally you will want your users to browse to www.mydomain.com instead of mydomain.com. It is good for search engine optimization to have one destination. It's also useful when you use cookies to keep users logged on when they are accessing different subdomains i.e. www.mydomain.com, shop.mydomain.com, forum.mydomain.com etc. You can use ... | | More... 10/26/05 | | | | | | | | |
|
| | PHP HTML class / printing SELECT dropdown box
/*
Here's a very handy class function for printing HTML SELECT. I normally use it with dynamic arrays i.e. result set from an SQL query
*/
class html {
function print_select($select_name, $select_array, $selected_value="", $js="", $multiple="") {
//
// print a select box
// parameters:
// 1. name of the select box
// 2. array with keys and values
// ... | |  More... 10/26/05 | | | | | | | | |
|
|
<< 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Page 14 | 15 | 16 | 17 >> |