Author Topic: database question  (Read 713 times)

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,813
database question
« on: February 16, 2012, 09:37:35 PM »
At work we have an Oracle database. I can query it with whatever windows-based sql development program provided by corporate IT. But I don't know what the program does 'behind the scenes'.

I would like to be able to submit queries to the database from my own perl scripts and cgi stuff, mostly from Linux. But I don't know how to interface with the DB. I understand that databases don't have a standard, open interface; it's not like ftp or anything. It would be great if I could just pipe my SQL file into some program on the database server but I think I need a special Oracle utility. I looked through the repos but lots of stuff comes up when I search Oracle.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: database question
« Reply #1 on: February 16, 2012, 10:17:04 PM »
Sqlplus is the standard way to do this with Oracle kit.  There are plenty of Oracle drivers for just about every programming language  as well.  I use JDBC often.

GigaBuist

  • friends
  • Senior Member
  • ***
  • Posts: 4,345
    • http://www.justinbuist.org/blog/
Re: database question
« Reply #2 on: February 16, 2012, 11:00:43 PM »
There's actually quite a few standard ways of getting into databases.  None are prefect, but they work well for basic stuff.

For Perl and Oracle look toward the DBI/DBD::Oracle module.

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: database question
« Reply #3 on: February 17, 2012, 10:53:04 AM »
Also: wireshark works well to see what commands are going over the network to DB.  ;)

GigaBuist

  • friends
  • Senior Member
  • ***
  • Posts: 4,345
    • http://www.justinbuist.org/blog/
Re: database question
« Reply #4 on: February 17, 2012, 09:27:01 PM »
Also: wireshark works well to see what commands are going over the network to DB.  ;)

I'm not sure why you would ever... oh.  Yeah, that.

Did a security audit once (and only once, it's not my thing, but I was the only guy the consulting company knew the call) where the client didn't think I was doing anything because they didn't see massive traffic during my testing.

I gave some general suggestions on security, places where the web-app could be given invalid data that busted some things.  And then I told them the Oracle password to their DB.  Not sure why anybody would put that in a cookie, but they did.