IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New well hmm
have 2 oracle tables, one identifying an ID and a second table that identifies where files owned by the ID reside on the disk. (ID's may have data but not be residents of this system) The second table has an entry which indicates the last time the file was opened. I want to identify which files have not been opened in the last 60 days, move them to a new location to slower storage disks then update oracle on the new location so the Application that uses this info will be able to locate the new location.

I was supplied a perl script written by someone who is no longer here and was in a hurry to finish it before he left. The parts/queries work individually but the logic that merges the two and does the date logic stops at the <STDIN>. I have an email to the author asking that question. He is the decent sort that will answer.
thanx,
bill
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 50 years. meep
New That someone sucks
In the time that Barry and I have spent on this problem already, either of us could have written that script.

Besides his variable names suck.

What you need to do is get a list of old files (in one query), then loop over the set of files. For each file decide the new name, move the file, then update the database. You'll need to know how to figure out the new name (business knowledge, you probably have it), how to move a file (Perl's system command may help you here), and how to issue an update (my $sth = $dbh->prepare("update FOO set x = ? where y = ?") or die "Cannot prepare: $!"; then later $sth->execute("new filename", $file_id);)

If the application was sanely built there is some locking needed before you move the file out from under the application. Odds are that you aren't so lucky, so I'd suggest running your script when the application is not in use.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New ICLRPD (new thread)
Created as new thread #242594 titled [link|/forums/render/content/show?contentid=242594|ICLRPD]
--
Steve
[link|http://www.ubuntulinux.org|Ubuntu]
New the application has a utility to do the actual move
I just need to generate a list of what needs to be moved and who owns it. Thanks to both you and Barry for your help but the variable names here were changed by me to protect the innocent :-)
thanx,
bill
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 50 years. meep
     perl DBI question - (boxley) - (11)
         I don't understand your question - (ben_tilly) - (4)
             Thank you sir - (boxley) - (3)
                 Those 2 are identical. - (broomberg) - (2)
                     why does the one without parense print and not the other? - (boxley) - (1)
                         Barry is right - (ben_tilly)
         found why no data shows up - (boxley) - (5)
             What EXACTLY (in clear concise terms) are you trying to do. - (broomberg) - (4)
                 well hmm - (boxley) - (3)
                     That someone sucks - (ben_tilly) - (2)
                         ICLRPD (new thread) - (Steve Lowe)
                         the application has a utility to do the actual move - (boxley)

I've fished dese ol' archives before and I'll fish em' again!
59 ms