Site search

Recent Posts

Meta

Categories

Posts

September 2008
M T W T F S S
« Aug   Dec »
1234567
891011121314
15161718192021
22232425262728
2930  

Archive for September, 2008

Remastersys Notes

My latest project is to turn my favorite Linux desktop configurations into stand alone distributions that I can run as LiveCDs or install anywhere.
Here are some links so that I don’t forget.
http://www.ubuntugeek.com/creating-custom-ubuntu-live-cd-with-remastersys.html

UPDATE_ON column in MySQL with trigger

I needed to update a column with the date and time whenever a record changed in my database. So here is the recipe for the trigger in MySQL 5.0.
DELIMITER $$
CREATE    /*[DEFINER = { user | CURRENT_USER }]*/    TRIGGER `my_database`.`UpdatedOn` BEFORE UPDATE    ON `my_database`.`my_table`    FOR EACH ROW BEGINset NEW.update_on = now();    END$$
DELIMITER ;

Auto File transfer/copying with SCP

Here is a
Here is a script (below) you can use to copy dump files between machines using scp from an
automated script. Please see attached. The script usage is as
follows:
./auto_scp.sh  
local_file   user@host:remote_folder  
user_password
or
./auto_scp.sh  
user@host:remote_file   local_folder  
user_password
Example:
./auto_scp.sh   dump.dmp   oracle@hostname:/U01/oracle
  <oracle password>
and here is the script————————————————–
#!/usr/bin/expect -f
# connect via scpspawn scp “[lindex $argv 0]” “[lindex $argv 1]” #############################################expect {-re “.*es.*o.*” {exp_send “yes\r”exp_continue}-re [...]

Exporting and Importing in Oracle: A Quick Start

I do this about twice per year and every time I have to look back at my notes to remember how. Maybe you are in the same boat. So, to save us both some trouble I’m going to blog my notes on the subject here.
exp schemaname/password@instance FILE=d:\mydump.dmp [follow instructions]
Give the file a name after FILE, [...]