Using sysdatabases one can create script various scripts one of the useful is to create script to backup all databases.… READ MORE
By executing the store procedure sp_spaceused ‘<table>’ one can find the space used by a table. The store procedure returns… READ MORE
Using procedures in DBMS_STATS package one can backup statistics and restore them. Assumes the user scott already has access to… READ MORE
Using ALTER SYSTEM RESET one can delete parameter from spfile if the parameter is in the spfile. Example: — shows… READ MORE
In 10g using dbms_flashback one can flashback using timestamp or SCN. If a user accidentally deletes rows or updates rows… READ MORE
|
To turn on trace for a specific event. exec dbms_system.set_ev(<SID>, <serial#>, <event>, 8, ''); Example: Enable trace at level 8… READ MORE
|
Using dbms_system.set_int_param_in_session, one can set max_dump_file_size of a running session. In the example it sets trace file to 100MB exec… READ MORE
One can use the regular expressions to match in vi, grep, sed and awk. [a-d] – Match one character with… READ MORE
# how to create a array and assign a list of values set -A fruit apples pears oranges banana #… READ MORE
In ksh shell – case statement case variable_name in pattern1) statements1 ;; pattern2) statements2 ;; # default (catch all remaining)… READ MORE
# Sample script that shows how ERR signal works, when a command returns a non-zero status it triggers to calls… READ MORE
Using the following steps one can create database from command line. Place the following pfile in $ORACLE_HOME/dbs directory and set… READ MORE
SQL> set lines 100 pages 999 SQL> select snap_id, snap_level, to_char(begin_interval_time, ‘dd/mm/yy hh24:mi:ss’) starting 2 from dba_hist_snapshot 3 order by… READ MORE
When doing a incomplete recovery (i.e. database is open with resetlogs) and when running RMAN to backup that database after… READ MORE
Here are some of the options that can be passed to runInstaller -slient – Slient mode -debug – To get… READ MORE
There was an issue we ran into where one of the users ran out temporary tablespace (TEMP) we had message… READ MORE
sed ‘1,10d’ file – doesn’t print the top 10 lines from the file sed ‘5d’ myfile – delete 5th line… READ MORE
I use this script to clean up all the log and trace file from each host.. You can schedule a… READ MORE
One of the scenario we ran into when one of the data file reported there was block corruption as RMAN… READ MORE
Ksh/Borne/Bash shell $ ls /usr/bin …. # when success value is 0 $ echo $? 0 $ ls /usr/bin/blah ls:… READ MORE
To change the logical name of the SQL Server databse one can follow the steps below to change the logical… READ MORE
“Control what I can control”
~ Alex Lima