Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Posts
    18

    Unanswered: SQL Script on LINUX - URGENT

    Hello,

    I want to run a script from a prompt on LINUX. I used to work on windows and run it like:
    db2 - tvf xyz .sql

    The xyz.sql contains

    connect to ss_ user x using y;
    select * from emp;


    Theis script works on windows
    but it is not working on Linux

    I tried it ina following way:

    ./db2 -tvf xyz.sql

    Please help....

    Thanks in anticipation.
    Regards

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: SQL Script on LINUX - URGENT

    Can you post the error message you get ?

    Cheers

    Sathyaram

    Originally posted by techlearn
    Hello,

    I want to run a script from a prompt on LINUX. I used to work on windows and run it like:
    db2 - tvf xyz .sql

    The xyz.sql contains

    connect to ss_ user x using y;
    select * from emp;


    Theis script works on windows
    but it is not working on Linux

    I tried it ina following way:

    ./db2 -tvf xyz.sql

    Please help....

    Thanks in anticipation.
    Regards

  3. #3
    Join Date
    Apr 2002
    Posts
    188

    Re: SQL Script on LINUX - URGENT

    Originally posted by techlearn
    Hello,

    I want to run a script from a prompt on LINUX. I used to work on windows and run it like:
    db2 - tvf xyz .sql

    The xyz.sql contains

    connect to ss_ user x using y;
    select * from emp;


    Theis script works on windows
    but it is not working on Linux

    I tried it ina following way:

    ./db2 -tvf xyz.sql

    Please help....

    Thanks in anticipation.
    Regards
    try the following

    db2 -tvf ./xyz.sql

    and make sure that the sql file does not have any carr-returns on it
    in windows is ok on Unix is not very good.

    marcos oliva

  4. #4
    Join Date
    Oct 2002
    Posts
    18

    Re: SQL Script on LINUX - URGENT

    Hello,
    Thanks.

    I cracked the problem. The problem was as follows:
    The file was created on windows and it was copied to Linux. It was appening some characters on its own.
    Hence I saved the file on window in the UNIx format. And it worked.
    Thanks again.

    shriya

    Originally posted by Maor71
    try the following

    db2 -tvf ./xyz.sql

    and make sure that the sql file does not have any carr-returns on it
    in windows is ok on Unix is not very good.

    marcos oliva

Posting Permissions

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