User Profile

Collapse

Profile Sidebar

Collapse
APP1MVF
APP1MVF
Last Activity: Mar 31 '08, 12:51 PM
Joined: Feb 5 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • DB2 UDB Recovery after Total Media Failure or Server Loss due to Extreme Disaster

    First let me start by saying I am not a DBA nor do I claim to be one, ok with that out of the way I am looking for some help understanding DB2 UDB Recovery after Total Media Failure or Server Loss due to Extreme Disaster.

    Currently on my system hot backups are being run on a daily basis with cold backups being executed during a down window on the weekend. The backup data is sent to tape which is then sent off site for safety. Hypothetically,...
    See more | Go to post

  • APP1MVF
    started a topic sed and awk Question

    sed and awk Question

    Questions:

    1) Using sed, how would you do a pattern replacement if the pattern contains slashes?

    Example:

    Input Pattern is /w585/odbi/BCPWK/DOCGET/
    Output Pattern is blank

    sed -i 's//w585/odbi/BCPWK/DOCGET///' filename

    When I use the above command I get the following error:
    sed: -e expression #1, char 9: unknown option to `s'

    2) Can you...
    See more | Go to post

  • Solution found



    I will answer my own question:

    Code:
    sqlcode=`db2 -ec +o "Enter your db2 statement here"`
    The –ec switch is interpreted as display sqlcode; to display sqlstate use –es.

    I hope this helps other people out there....
    See more | Go to post
    Last edited by docdiesel; Feb 6 '08, 05:03 PM. Reason: Better readability

    Leave a comment:


  • APP1MVF
    started a topic How do you display the Current SQLSTATE or SQLCODE
    in DB2

    How do you display the Current SQLSTATE or SQLCODE

    Question:
    I come from a COBOL/DB2 environment so I am use to being able to display the current SQLSTATE or SQLCODE following the issuing of a DB2 command, now I have move over to a LINUX/DB2 shell scripting environment and I am looking to see if it is possible for me to do the same in a shell script.

    So is it possible to display the current sqlcode or sqlstate and only the sqlcode or sqlstate?
    Could someone please give...
    See more | Go to post
No activity results to display
Show More
Working...