Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Automating SPROC execution

by Win (Novice)
on Jul 10, 2008 at 10:27 UTC ( [id://696666]=perlquestion: print w/replies, xml ) Need Help??

Win has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Automating SPROC execution
by wazoox (Prior) on Jul 10, 2008 at 11:15 UTC
    Well you don't need a perl script for that...
    perl -pi -e 's/ALTER SPROC/CREATE SPROC/g' *.sql
Re: Automating SPROC execution
by jdporter (Paladin) on Jul 10, 2008 at 14:23 UTC

    My understanding is that Perl is not quite as well suited to this kind of task as some other more modern languages, particularly PHP and Ruby. I'd suggest that you search resources related to those. (Unfortunately, I don't know the best places to point you for that. I'd probably start with wikipedia - PHP, Ruby - and see the "External links" at the bottom.)

    Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.
      Hmm, what features in particular do PHP and Ruby have that make them more suitable than Perl for the OP's task.
Re: Automating SPROC execution
by amarquis (Curate) on Jul 10, 2008 at 13:18 UTC

    In general, searching for a script that completes the whole task you want done isn't going return results. Instead, I'd plan it out and focus on particular parts of the problem, and search on those. In your case you want to:

    • Connect to your database
    • Find files in several directories
    • Open those files once found
    • Perform a substitution
    • And finally, execute the SQL statements found

    My suggestion would be to start trying to build these pieces (maybe after searching on them as prepwork), and ask here about your specific roadblock if you encounter one. Provide code! Or, if you don't know where to start on a particular piece, say so here and I'm sure somebody will give you a jumping off point.

      start to build the pieces? He already has been given the pieces, see he past posts on stored pro cedures/sprocs
Re: Automating SPROC execution
by Anonymous Monk on Jul 10, 2008 at 11:06 UTC
    Look at your posts history, people have given you code to do this before. Go read and stop wasting monks time to do your job for you

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://696666]
Approved by mhearse
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-24 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found