Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15
thanks a lot, guy but now how can u help me solve this problem. i need your help. it's very urgent i have a file containing a lot of records, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Nov 2009
    Posts
    20

    urgent


    thanks a lot, guy
    but now how can u help me solve this problem.
    i need your help. it's very urgent

    i have a file containing a lot of records, a loader is loading all lines and inserting them in a database.
    i want to write a script in linux that counts if the number of records in the files is the same as in the database oracle.

    i can not the command for connecting with the database oracle in the script.

    please

  2. #12
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,345
    No sorry, as I am a little afraid.
    The bash hint was pretty basic, oracle is more complicated and I have no idea in what condition that oracle server is.

    That said, I give you some rough pointers:
    Basically, you would call sqlplus to connect with the right user,
    then have it execute a SELECT COUNT(<tablename_of_your_choice>)
    The result would be stripped to have only the number and saved by the shell script and evaluated against the number in th text file.

    But:
    You do realize, that this would work only once?
    Next time something got imported incrementally to DB, the numbers of DB and file *will* be different. So you would need a timestamp or uniq identifier to compare and therefore a more complex shell script and textfile and DB.

    What about error conditions?
    File invalid, DB down, import was only partially done,....?


    Maybe it's better to tune the import process.
    Check and validate the source according to your needs.
    Use a sql transaction for import.
    If the import fails, rollback
    If the import succeeds, trust that the numbers are correct.

    The validation + the transaction should be enough to ensure that.

  3. #13
    Just Joined!
    Join Date
    Nov 2009
    Posts
    20

    hi

    i want to received a sms n my mobil phone
    but i want to use the command WGET IN UNIX.

    I WRITE THIS COMMAND:
    wget 'http://192.168.40.70:

    .WHAT'S WRONG WITH THAT?

  4. #14
    Just Joined!
    Join Date
    Nov 2009
    Posts
    20

    thanks

    i get the sms now
    it's ok

  5. #15
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,104
    Please start a new thread for new problems in the future

    Thanks

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •