Results 1 to 4 of 4

Thread: Sql*plus ???

  1. #1
    Join Date
    Nov 2003
    Posts
    6

    Question Unanswered: Sql*plus ???

    HOW TO RUN FROM SQL*PLUS THAT INPUT A SCRIPT FILE TO INSERT RECORD INTO A TABLE ????

  2. #2
    Join Date
    Nov 2003
    Posts
    87
    you mean how to run a script file?
    If so

    SQL>@filename

  3. #3
    Join Date
    Sep 2003
    Posts
    156

    Re: Sql*plus ???

    Originally posted by 1234567890
    HOW TO RUN FROM SQL*PLUS THAT INPUT A SCRIPT FILE TO INSERT RECORD INTO A TABLE ????
    the default directory that sql*plus opens from is the /bin directory. you can save your .sql scripts anywhere you want. to run the scripts, you can either point sql*plus to the directory of the script files (from the main menu File -> Open) - once sql*plus has been pointed to the directory of the scripts you wish to run, it will remain pointed to that directory for the remainder of the session or until pointed to a different location.

    to run a script that has sql*plus pointing to the location of the script, use @ at the prompt i.e.

    SQL> @script_name.sql

    if you have not pointed sql*plus to the location of the script files, you can add this in at the prompt i.e.

    SQL> @c:\oracle_scripts\script_name.sql
    rgs,

    Ghostman

  4. #4
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151

    Re: Sql*plus ???

    Another option is this one:

    SQL> start c:\joel_scripts\script_joel.sql

    SQL> help index

    Enter Help [topic] for help.

    @ COPY PAUSE SHUTDOWN
    @@ DEFINE PRINT SPOOL
    / DEL PROMPT SQLPLUS
    ACCEPT DESCRIBE QUIT START
    APPEND DISCONNECT RECOVER STARTUP
    ARCHIVE LOG EDIT REMARK STORE
    ATTRIBUTE EXECUTE REPFOOTER TIMING
    BREAK EXIT REPHEADER TTITLE
    BTITLE GET RESERVED WORDS (SQL) UNDEFINE
    CHANGE HELP RESERVED WORDS (PL/SQL) VARIABLE
    CLEAR HOST RUN WHENEVER OSERROR
    COLUMN INPUT SAVE WHENEVER SQLERROR
    COMPUTE LIST SET
    CONNECT PASSWORD SHOW


    SQL> help start

    START
    -----

    Runs the SQL*Plus statements in the specified script. The script can be
    called from the local file system or a web server.
    In iSQL*Plus the script can only be called from a web server.

    STA[RT] {url|file_name[.ext]} [arg ...]

    where url supports HTTP and FTP protocols in the form:

    http://host.domain/script.sql


    STARTUP
    -------

    Starts an Oracle instance with several options, including mounting,
    and opening a database.

    STARTUP options | migrate_options

    where options has the following syntax:
    [FORCE] [RESTRICT] [PFILE=filename] [QUIET] [ MOUNT [dbname] |
    [ OPEN [open_options] [dbname] ] |
    NOMOUNT ]

    where open_options has the following syntax:
    READ {ONLY | WRITE [RECOVER]} | RECOVER

    and where migrate_options has the following syntax:
    [PFILE=filename] MIGRATE [QUIET]


    SQL> help @

    @ ("at" sign)
    -------------
    Runs the SQL*Plus statements in the specified script. The script can be
    called from the local file system or a web server.
    In iSQL*Plus the script can only be called from a web server.

    @ {url|file_name[.ext]} [arg ...]

    where url supports HTTP and FTP protocols in the form:

    http://host.domain/script.sql


    @@ (double "at" sign)
    ---------------------

    Runs the specified script. This command is almost identical to
    the @ command. It is useful for running nested scripts because it
    has the additional functionality of looking for the nested script
    in the same url or path as the calling script. Only the url form
    is supported in iSQL*Plus.

    @@ {url|file_name[.ext]} [arg ...]


    SQL>
    Joel Pérez

Posting Permissions

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