DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: SQL plus

  1. #1
    Join Date
    Mar 2004
    Posts
    26

    SQL plus

    if you want to run the file with a long path, what do you need to set before you run the file???

    for example:

    @C:\scripts\mytest_3.0.1\VERSION_100_1001\lease_affective_day\clean_up_old customers_as_require.sql

    thanks all

  2. #2
    Join Date
    Mar 2004
    Posts
    26
    Could someone help me to answer this question????

    thanks a bunch

  3. #3
    Join Date
    Mar 2002
    Location
    Manchester, England
    Posts
    202
    TBH i ont understand the question.
    didn't you answer it yourself with the example?

  4. #4
    Join Date
    Mar 2004
    Posts
    26
    no, when I can't run that scripts b/c I got some kind of errors and I copy and paste it in SQL*PLUS. I guess the path is too long.

  5. #5
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    what erros do you get

  6. #6
    Join Date
    Mar 2004
    Posts
    26
    string beginning "C:\scripts..." is too long. maximum size is 79 characters.

  7. #7
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    According to your script's path I assume you use Window's version of SQL*Plus. If so, you could implicitly set the current working directory by opening any file (it doesn't have to be "clean_up_old_customers_as_require.sql", any file from that directory will do). So in menu "File" click "Open" and then chhose any file from that directory. At the last line of opened file you enter dot (character ".") to close that file. Now your working directory is set and you can start your script by simply enetering it's name:

    @clean_up_old_customers_as_require.sql
    Last edited by jmodic; 04-15-2004 at 10:13 AM.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  8. #8
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    I just noticed you have a space in your file name:

    clean_up_old customers_as_require.sql

    I hope this is not a typo and your real file name is

    clean_up_old_customers_as_require.sql

    If not, you better enclose that filename in double quotes!
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  9. #9
    Join Date
    Mar 2004
    Posts
    26
    Jmodic,

    SOrry, it's typo and there should be underscore instead of the space between.

  10. #10
    Join Date
    Mar 2002
    Location
    Manchester, England
    Posts
    202
    ah.....I get you now.

    have you tried using env variables?

    actually that don't work either, I've just tried. I even managed to kill SQLplus

    windowsXP (my laptop) - oracle 8.1.7.0.
    1. create 2 directories - one with a long dir name and one short.
    2. log into SQLplus and verify that you can run a script in the short dir and that one in the long dir name fails.
    3. exit and set some environment variables with the pathnames for the 2 directories (eg %LONG% and %SHORT%).
    4. back into SQLplus and try running the same files but use the variables.
    i.e.
    >@\test\%SHORT%\test.sql and
    >@\test\%LONG%\test.sql

    the short one should work but the long doesn't even return the "maximum size is 79 characters." error but bombs SQLplus.

    completely pointless experiment but at least it distracted me for a while

    you could navigate upto the dir you what so the string is less that the 79 character limit (eg >$cd \bla\nearly_there\bla) . ugly but it'll work

Posting Permissions

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


Click Here to Expand Forum to Full Width