Running an SQL script file in QSH

Posted on 2006-05-26
Last Modified: 2006-11-18
Hi there,

I'm trying to create a database in DB2 from within QShell using an sql script in a file. The command I'm using is:

db2 -Svtf mysqcript.sql

However, I get an error: UNABLE TO OPEN FILE: mysqcript.sql RC=3025

I guess this means it can't find my file.

Where in the IFS should I be storing the script file?

Question by:stevebeech
    LVL 13

    Accepted Solution

    I created an SQL script  mysql.sql in an IFS folder called bh.

    In qshell, the command is
    db2 -Svtf /bh/mysql.sql

    So you should be able to put the script in the IFS and qualify the file name with a path.


    Author Comment

    Thanks Barry!
    LVL 13

    Expert Comment

    You're welcome!
    Check out this link for a manual on Qshell:
    There is a section on path names that qshell uses to search for files.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now