Run (or re-run) orders in the SQL * more buffer

I'm confused about sql / command. by defination, it run (or re-run) orders in the SQL * more buffer. How do I know if it execete or re - run a command?
for example, I run a select statement, seems that I have to type / for the result. When I run a create table statement, it seems to run twice with / and table I is error.

Someone could clearify when must - be used and when not to use it.

As suggested Aman, that's the difference between a pl/sql block and a SQL statement (DDL or DML).

The semicolon is therefore not a part of SQL when you enter a statement SQL, SQL * Plus knows and will execute the statement as soon as she sees a point comma (which ends with the statement), or slash (run the buffer).

But a semicolon is a pl/sql statement terminator. So when you enter a pl/sql block, SQL * Plus keeps accepting lines of code until you have finished and then send the entire block to the database when you type a slash. This is also true when you enter CREATE PROCEDURE etc.

Tags: Database

Similar Questions

  • order of the sql operation

    Hi experts,

    I want to erase my basics here.

    I want to know the order of the sql operation.

    in fact the problem with me I've read websites and different blog

    on the order of operation of sqkl requests, so I'm confused here.

    I think that the order of operation iis

    -MY assumptuion-

    Of

    |

    where

    |

    Group

    |

    having

    |

    Select

    |

    order by

    ---------------------------

    My assupmtion is correct?

    If so, then if suppose there is clause rownum in my selection criteria, when

    It will apply?

    on some sites I've seen criteria below

    --------------------------------------------

    1. FROM/WHERE clause goes first.

    2 ROWNUM is assigned and incremented for each line of output FROM/WHERE clause.

    3. SELECT is applied.

    4 GROUP BY is applied.

    5 WHO is applied.

    6 ORDER BY is applied.

    -------------------------------------

    is that correct or my assumption is correct?

    Thank you very much in advance... !!

    Kind regards

    Prashant

    Hello

    969262 wrote:

    Hello

    I'm more confused now that everyone has to give a different answer...:)

    Blushadow said something that can really help you:

    Queries are not always run in a linear fashion

    Once you see a step by step ordered arrangement, it is (at best) how things looked from a point of view, and it can be useful to understand some aspects of the work of the database, but not all.

    If you must have a single ordered list, so what you posted first is, according to me, the more accurate for the majority of cases:

    1. Of
    2. where
    3. Group
    4. having
    5. Select
    6. order by

    This can help you understand logically how to write SQL statements and predict their outcome.  For example, think that, when it happens before that GROUP BY allows to remember that you can not use an aggregate function, such as COUNT in a WHERE clause, because the aggregate functions are calculated as part of the process GROUP.

    How to write a SQL statement and how the optimizer decides to pay in fact, are two different things.  The optimizer do not follow the sequence posted above, or any other sequence of steps.  To see how a particular statement is made, given some data in particular, there is no substitute for watching the execution plan.

  • Problem with the new line when you manually run a procedure in SQL * more

    The procedure below works fine in SQL * more when all EXEC < procedure_name > (parameter1, parameter 2,...); is placed on a single line
    SQL > exec cust_admin_util.create_schema (P_SCHEMA_NAME => 'SCOTT_01', P_SCHEMA_PWD => 'scott123', P_TBS_NAME => 'TRAG_TBS', p_temptbs_name => 'TEMP' );
    
    PL/SQL procedure successfully completed.
    I wanted to perform the same procedure with readability. So, I put each parameter on a separate line and try to run. But it's the slightest mistake out.
    SQL > exec cust_admin_util.create_schema
    (
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );BEGIN cust_admin_util.create_schema; END;
    
          *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'CREATE_SCHEMA'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    
    
    SQL >   2    3    4    5    6    7
    P_SCHEMA_NAME => 'TESTUSR_01',
    *
    ERROR at line 2:
    ORA-00928: missing SELECT keyword
    No work around for this?

    Tom wrote:

    No work around for this?

    BEGIN
    cust_admin_util.create_schema
    (
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );
    END;
    /
    

    SY.

  • Same code running in SQL * more edit the sql buffer vs = different results file

    Hello

    For the last few minutes I was scratching my head trying to understand why my little piece of code was not working.
    As a result, a sample:
    create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
    /
    declare
      booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');  
    begin
      for i in booklist.FIRST .. booklist.LAST LOOP
        dbms_output.put_line('Book number ' || i || ':' || booklist(i));
      end loop;
    end;
    /
    When run interactively, I get the following results:
      1  create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
      2  /
      3  declare
      4    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
      5  begin
      6    for i in booklist.FIRST .. booklist.LAST LOOP
      7      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
      8    end loop;
      9* end;
    SCOTT@ORCL> /
    
    Warning: Type created with compilation errors.
    
    SCOTT@ORCL> show errors
    Errors for TYPE BOOKTITLES_NT:
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    2/1      PLS-00103: Encountered the symbol "/"
    So I try without the slash and get nowhere:
      1  create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
      2  declare
      3    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
      4  begin
      5    for i in booklist.FIRST .. booklist.LAST LOOP
      6      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
      7    end loop;
      8* end;
      9  /
    
    Warning: Type created with compilation errors.
    
    SCOTT@ORCL> show errors
    Errors for TYPE BOOKTITLES_NT:
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    2/1      PLS-00103: Encountered the symbol "DECLARE"
    8/4      PLS-00103: Encountered the symbol "end-of-file" when expecting
             one of the following:
             ( begin case declare end exception exit for goto if loop mod
             null pragma raise return select update while with
             <an identifier> <a double-quoted delimited-identifier>
             <a bind variable> << continue close current delete fetch lock
             insert open rollback savepoint set sql execute commit forall
             merge pipe purge
    So I think, maybe I'll try it in a .sql file. So I put the first fragment of code in a file, test4.sql:
    SCOTT@ORCL> get C:\Users\J\Documents\SQL\test4.sql
      1  create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
      2  /
      3  declare
      4    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
      5  begin
      6    for i in booklist.FIRST .. booklist.LAST LOOP
      7      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
      8    end loop;
      9* end;
    SCOTT@ORCL>
    and run it, and it works:
    SCOTT@ORCL> @C:\Users\J\Documents\SQL\test4.sql
    
    Type created.
    
    Book number 1:Great Expectations
    Book number 2:Ulysses
    Book number 3:1984
    
    PL/SQL procedure successfully completed.
    Can someone tell me why the behavior is different when it is run from a file when it is run, well, interactive? There seems to be some limits on what you can interactively run vs. what you can run from a script.

    Thank you very much
    Jason

    SQL * more buffer cannot contain more than one return, even if you have two - create type and anonymous PL/SQL block. Thus it-error:

    Wrote file afiedt.buf
    
      1  create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
      2  /
      3  declare
      4    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
      5  begin
      6    for i in booklist.FIRST .. booklist.LAST LOOP
      7      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
      8    end loop;
      9* end;
    SQL> /
    
    Warning: Type created with compilation errors.
    
    SQL> create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
      2  /
    
    Type created.
    
    SQL> declare
      2    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
      3  begin
      4    for i in booklist.FIRST .. booklist.LAST LOOP
      5      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
      6    end loop;
      7  end;
      8  /
    Book number 1:Great Expectations
    Book number 2:Ulysses
    Book number 3:1984
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    SY.

  • continuously run a query in sql prompt

    Hello

    We want to run a query that shows the current sessions connected, the application must run continuously from the sql prompt.

    Select INST_ID select NŒUD, count (*) Current_sessions of GV$ SESSION where username IN ('XxX', 'XXX') group by order INST_ID select 1;

    Can it be implemented with a kind of stored procedure that runs in a loop with a time interval?

    Any help would be much appreciated.

    Thanks in advance!

    user-1221 wrote:
    I wonder if do you the same thing with your PHB :)

    in any case, I created a small batch file and scheduled it with the Windows Task Scheduler, hope this will give him satisfaction.

    Thank you for you answer.

    But that does not make him have to pick up the results? And who does not lack the "requirement" for "continuous"?

    Maybe something like this will satisfy the e-Director of Information and Office Automation

    --- cmd file
    :query
    sqlplus scott/tiger@orcl @run_query
    goto query
    
    --- sqlfile:  run_query.sql
    set echo off
    select inst_id NODE,
           count(*) Current_sessions
    from GV$SESSION
    where username IN ('XxX','XXX')
    group by inst_id
    order by 1;
    select to_char(sysdate,'dd-Mon-yyyy hh24:mi:ss') CurrentTime from dual;
    prompt Are we there yet?
    exit
    

    Edited by: EdStevens may 25, 2013 08:30

    Edited by: EdStevens may 25, 2013 08:32

    Edited by: EdStevens may 25, 2013 13:35

  • How can I run beginddl in PL/SQL Developer

    Here is my script:

    Start
    execute dbms_wm.beginddl ('MyTable');
    ALTER TABLE MyTable ADD NewColumn1 VARCHAR2 (200)
    execute dbms_wm.commitddl ('MyTable');
    end;

    I got the following error:


    ORA-06550: line 2, column 11:
    PLS-00103: encountered the symbol "DBMS_WM" during the expected in the following way:

    := . (@ %; immediate)
    The symbol ': = ' was replaced by "DBMS_WM" continue.
    ORA-06550: line 3, column 3:
    PLS-00103: encountered the symbol "ALTER" when expecting one of the following conditions:

    (begin case declare exit end exception for goto if loop mod)
    pragma raise return null select update while with
    < an ID > < a limit between double quotes


    What should I do next?

    Thank you.

    in the PL/SQL scripts, you simply omit the 'run '. and for the SQL code, you must put a run before.
    so your script:

    begin
      dbms_wm.beginddl('MyTable');
      execute immediate 'ALTER TABLE MyTable ADD NewColumn1 VARCHAR2(200)';
      dbms_wm.commitddl('MyTable');
    end;
    

    Apart from that, you should edit MyTable_LTS in your session DDL.

    Kind regards

    Andreas

  • PLS-00201 error occurs when the batch a stored procedure in SQL * more

    I have a batch file to run a stored procedure and the coil results in file. When I enter orders manually in sql * plus the output works very well and my results are spooling in the output file. But when I run the same commands in the script I get an error batch.


    Any ideas?

    Stored procedure:

    create or replace procedure MMP (p_cursor in the SYS_REFCURSOR)

    as

    Start

    Open p_cursorfor select name, id from table;

    end;

    batch file 1:

    sqlplus-s user/pw@REPORTDV @sp_output_spooled.sql

    sp_output_spooled.SQL script file

    Paste these commands directly on the SQL * more guest wraps the result as expected the value leader.

    the colsep value ' |'

    trigger the echo

    Set feedback off

    termout off Set

    set the position

    set linesize 9000

    set pagesize 0

    Set trimspool on

    headsep off Set

    output of the coil. TXT

    var refcursor rc

    run MMP(:rc)

    print the rc

    spool off

    output

    Errors printed to the output. TXT file after the batch is executed and error occurs:

    BEGIN MMP(:rc); END;

    *
    ERROR on line 1:
    ORA-06550: line 1, column 8:
    PLS-00201: identifier 'MMP' must be declared.
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored


    ERROR:
    ORA-24338: statement handle not executed


    SP2-0625: variable printing error "rc".

    Hello

    Your code worked fine for me.

    Procedure MMP is owned by the same user that runs the batch file or does it means and appropriate privileges?

    VR,

    Sudhakar

  • Using the SQL workshop APEX_INSTANCE_ADMIN

    I'm on 5 APEX. I need to leave my user access to system change electronic/SMTP mail settings in my workspace without giving them access to the admin area pages work. I see there are the built APEX_INSTANCE_ADMIN.set_parameter, but I needed to let them run it from the SQL builder APEX (not in SQLplus under sys) workshop. I gave APEX_ADMIN_ROLE to my analysis schema. Is this possible? I tried and could not make it work.


    Start

    run immediately "ALTER SESSION SET CURRENT_SCHEMA = APEX_050000';"

    APEX_INSTANCE_ADMIN. SET_PARAMETER('SMTP_HOST_ADDRESS','localhost');

    end;

    ORA-06550: line 3, column 1: PLS-00201: identifier 'APEX_INSTANCE_ADMIN' must be declared ORA-06550: line 3, column 1: PL/SQL: statement ignored


    Thank you

    I tested it on my case, that's what I did:

    (1) as SYS:

    grant APEX_ADMINISTRATOR_ROLE to demo;
    

    2) log in as demo schema and run an APEX_INSTANCE_ADMIN:

    BEGIN
        APEX_INSTANCE_ADMIN.ADD_WORKSPACE (
            p_workspace_id       => 12121212,
            p_workspace          => 'DEMO_WORKSPACE',
            p_primary_schema     => 'DEMO',
            p_additional_schemas => 'DEMO' );
    END;
    

    A successful!

    When I revoke the grant with: revoke APEX_ADMINISTRATOR_ROLE of demonstration;

    The statement was not successful:

    BEGIN
        APEX_INSTANCE_ADMIN.ADD_WORKSPACE (
            p_workspace_id       => 12121212,
            p_workspace          => 'DEMO_WORKSPACE',
            p_primary_schema     => 'DEMO',
            p_additional_schemas => 'DEMO' );
    END;
    ORA-06550: line 2, column 5:
    PLS-00201: identifier 'APEX_INSTANCE_ADMIN' must be declared
    ORA-06550: line 2, column 5:
    PL/SQL: Statement ignored
    

    Did you completely remove your line of code "immediate execution"?

    Concerning

    Daniel

  • How to see the result in sql * more

    Hello
    IAM running a procedure to sql * more...
    I put quite a few DBMS .put line-out inside the proc for purporse debugging
    before running, I said set serveroutput on;
    the procedure is done correctly, but I don't see any output

    It just displays the procedure completed successfully

    How can I see the output

    concerning
    REDA

    Hello reda,.

    You are absolutely sure that the procedure actually runs one of these DBMS_OUTPUTs, that is, you are sure that alternate paths through your procedure are not taken?

    To confirm, put a DBMS_OUTPUT at the very beginning of your procedure, to see if that print, which should be if you set serveroutput on it.

  • SQL more how to stop script after the exception of the DDL

    Hello

    I have script .sql, which I managed by SQL * more.

    Some migration of data and database structure changes were made in the script.

    So, I use a lot of distinct calls:

    @script_name.sql

    @script_name_1.sql

    @script_name_2.sql

    ...

    Some of the scripts contains DDL as create table or column.

    contains some declare blocks (DML).

    Is it possible to stop the script after an exception has occurred?

    Thank you, Olga.

    Hi, Olga.

    You can use the SQL * more order

    WHENEVER SQLERROR EXIT

    to tell SQL * more to stop the execution of orders and immediately disconnect after any exception SQL is triggered.

    I don't know of anyway to stay connected, but to stop script execution, after an error.

  • Connection to the 11g on Oracle_Developer_Days.ova with sql + more

    I downloaded the Oracle_Developer_Days.ova and have confirmed with connectivity

    C:\Users\robm > ping ServeurOracle

    ServeurOracle ping [192.168.11.18] with 32 bytes of data:

    Reply from 192.168.11.18: bytes = 32 time < 1 ms TTL = 64

    Reply from 192.168.11.18: bytes = 32 time < 1 ms TTL = 64

    Reply from 192.168.11.18: bytes = 32 time < 1 ms TTL = 64

    Reply from 192.168.11.18: bytes = 32 time < 1 ms TTL = 64

    Ping statistics for 192.168.11.18:

    Packets: Sent = 4, received = 4, lost = 0 (0% loss),

    Time approximate round trip in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, average = 0ms

    C:\Users\robm >

    I have advanced and installed the client instant and also installed the sql + more

    C:\Users\robm > sqlplus scott/tiger@orcl

    SQL * more: Production of the 12.1.0.1.0 on sat Nov 30 00:27:44 version 2013

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

    ERROR:

    ORA-12514: TNS:listener is not currently of service requested in connect

    descriptor of

    Enter the user name:

    Here the tnsnames.ora can, I did you see errors?

    XRACQ_MYSERVICE_TAF =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = oracleserver) (PORT = 1521))

    (LOAD_BALANCE = yes)

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = orcl)

    (FAILOVER_MODE =

    (TYPE = SELECT)

    (METHOD = BASIC)

    (RETRIES = 180)

    (DELAY = 5)

    )

    )

    )

    any ideas on how to make it work?

    I now get

    ORA-01017: name of user and password invalid. connection refused

    using tsnames.ora

    WEIRD =.

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADRESSE = (PROTOCOL = TCP) (HOST = 192.168.11.18)(PORT = 1521)))

    (CONNECT_DATA =

    (SERVICE_NAME = orcl)

    )

    )

    so I seem to connect now... . How can scott Tiger be wrong isn't the default?

  • Connection with SQL * more is not possible

    Hello together,

    I have a problem with my database and SQL Plus.

    I can't connect to my DB via SQL Plus, I get the error message: > > ORA_12546: TNS: detonation verweigert (Permission denied) < <.

    I tried it with several users. When I try to log in to enterprise manager or connecting to the DB through SQL Developer works very well with the user > > sys < <, only the SQL more connection does not work.

    It works until yesterday that there are some problems with the DB and the processor and RAM were almost 100% occupied each.


    We use the Version 11 g Enterprise Edition Release 11.2.0.1.0 64 bit Production on a Windows Server 2008 R2 Enterprise Server.

    I am running SQL Plus, Enterprise Manager and SQL Developer directly on the DB server.

    When I start SQL Plus he asks me my username > > enter user name: < < and after that my password: > > password: < <.

    A connection as seen in many forums or document on the internet like > > scott/tiger@ORCL < < never worked on my system, which is also confused me.


    We have no listener.ora file in the folder: ORACLE_HOME/NETWORK/ADMIN only a sqlnet.ora with line > > SQLNET. AUTHENTICATION_SERVICES = (NTS) < < in it.



    Status of the listener:

    ---------------------------------------------------------------------------------------------------------------------------------------------------------

    C:\Windows\System32 > lsnrctl status

    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 18 February 2014 12:14:32

    Copyright (c) 1991, 2010, Oracle.  All rights reserved.

    Connection to (ADDRESS = (PROTOCOL = tcp)(HOST=) (PORT = 1521))

    STATUS of the LISTENER

    ------------------------

    Alias LISTENER

    TNSLSNR for Windows 64-bit version: Version 11.2.0.1.0 - Production

    Start date February 18, 2014 10:15:54

    Uptime 0 days 1 hour 58 minutes 42 seconds

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    O:\app\administrator\diag\tnslsnr\QualisysDbNbg\listener\alert\log.XML log listener

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=QualisysDbNbg) (PORT = 1521)))

    Summary of services...

    Service "orcl" has 1 instance (s).

    Instance "orcl", State LOAN, has 1 operation for this service...

    The command completed successfully

    C:\Windows\System32 >

    ---------------------------------------------------------------------------------------------------------------------------------------------------------


    I hope someone can help me with this problem.


    Thank you you very much in forward for your answerand greetings

    Matthias


    The sys user must connect as sysdba

    have you tried

    sqlplus 'sys@ORCL as sysdba'

    or

    sqlplus 'sys/yoursyspwd@ORCL as sysdba'

    the first command should work without password for all users group ORA_DBA.

    Scott, the user cannot also exists in your database.

  • SQL * more question: unprinted despite SET ECHO ON command

    RDBMS Version: 11.2.0.4

    OS: Oracle Linux 6.4 (bash shell)

    I'm kinda a newbie to SQL * more.

    Here's a SQL * Plus script embedded in bash script that scales multiple data files. This script has been run on the DB server side.

    #! / bin/bash

    export ORACLE_SID = ORCL1

    echo "resize Datafile began to" 'date '.

    sqlplus "/ as sysdba" < < EOF

    set echo on

    Set of feedback on

    ALTER DATABASE DATAFILE '+ DATA/brfcsprd/datafile/manh_audit_lob.338.834340223' resize 25g;

    ALTER DATABASE DATAFILE '+ DATA/brfcsprd/datafile/manh_audit_lob.337.834340223' resize 25g;

    ALTER DATABASE DATAFILE '+ DATA/brfcsprd/datafile/manh_audit_lob.336.834340225' resize 25g;

    ALTER DATABASE DATAFILE '+ DATA/brfcsprd/datafile/manh_audit_lob.335.834340225' resize 25g;

    ALTER DATABASE DATAFILE '+ DATA/brfcsprd/datafile/manh_audit_lob.334.834340225' resize 25g;

    ALTER DATABASE DATAFILE '+ DATA/brfcsprd/datafile/manh_audit_lob.333.834340225' resize 25g;

    ALTER DATABASE DATAFILE '+ DATA/brfcsprd/datafile/manh_audit_lob.332.834340227' resize 25g;

    quit smoking

    EXPRESSIONS OF FOLKLORE

    echo "resize Datafile ended in" 'date '.

    As you can see, the SQL * more script contains ON SET ECHO ON and PUT your COMMENTS.

    But in the logfile (see below), I don't see every ALTER DATABASE DATAFILE... command printing. I see that ' altered database.'  printing messages.

    I executed the script to nohup as

    nohup resize.sh > MyResize2.log &

    $ cat MyResize2.log

    DataFile resize started at Sun Dec 29 00:09:45 MYT 2013

    SQL * more: Production of the 11.2.0.4.0 on Sun Dec 29 00:09:45 version 2013

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    With partitioning, Real Application Clusters, Automatic Storage Management, OLAP,.

    Options of Data Mining and Real Application Testing

    SQL > SQL > SQL > SQL > SQL >

    Database altered.

    SQL >

    Database altered.

    SQL >

    Database altered.

    SQL >

    Database altered.

    SQL >

    Database altered.

    SQL >

    Database altered.

    SQL >

    Database altered.

    Hello

    ECHO applies only to the SQL commands * Plus reads through the @ or the STARTUP command, no statements you type directly in the SQL > prompt or read the bash script statements.

    Try to create a separate file, containing only the command ALTER DATABASE in a separate file (let's call it alter_database.sql for now) and call it from your script bash, like this:

    #! / bin/bash

    export ORACLE_SID = ORCL1

    echo "resize Datafile began to" 'date '.

    sqlplus "/ as sysdba".<>

    set echo on

    Set of feedback on

    @whatever/alter_database

    quit smoking

    EXPRESSIONS OF FOLKLORE

    echo "resize Datafile ended in" 'date '.

  • Compilation with SQL * more

    Hello world

    I am sure it is a simple and can someone help me:

    In other projects, I've always used TOAD or similar tools to compile my PL/SQL code, but with this project I have only SQL * more then when I run 'CREATE PROCEDURE '.... "I just get the message ' Warning: function created with compilation errors.

    I'm sure that compiling information are written in a table somewhere or maybe can be displayed directly in the SQL * more window (maybe there an option or the indicator "Compile"?) and so I hope someone can point me to a good HOWTO or give me one or two keywords that I can google under?

    Thank you very much
    Alan Searle

    Use

    display errors

    or user_errors

    SQL> create or replace procedure p1 is
      2  begin
      3   null
      4  end;
      5  /
    
    Warning: Procedure created with compilation errors.
    
    SQL> show errors
    Errors for PROCEDURE P1:
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    4/1      PLS-00103: Encountered the symbol "END" when expecting one of the
             following:
             ;
             The symbol ";" was substituted for "END" to continue.
    
    SQL> select text from user_errors
      2  where name = 'P1';
    
    TEXT
    --------------------------------------------------------------------------------
    PLS-00103: Encountered the symbol "END" when expecting one of the following:
    
       ;
    The symbol ";" was substituted for "END" to continue.
    
  • SP2-0103: nothing in the SQL buffer to run.

    HI I have a simple procedure in my oracle 11g database which is like follows.i call this procedure from a shell script and I'm trying to redirect this dbmsoutput to a log file in the unix shell script.
    but after that the script runs when I chat log file, it says SP2-0103: nothing in the SQL buffer to run. What is the dbmsoutput not redirected to the log file?

    procedure
    CREATE OR REPLACE procedure display_line as 
    begin 
    dbms_output.put_line(' this is displayed in output file');
    end;
    /
    Unix script
    sqlplus -s scott/tiger@ORCL<<!>>$PWD/abc.log
    set server output on
    spool $PWD/abc.log
    exec display_line
    /
    spool off
    
    !
    Concerning
    REDA

    exec display_line; itself turns into

    BEGIN
       display_line;
    END;
    /
    

    You don't need a ' / ' at the end again.

    In addition, it seems that sqlplus does not record the history of previous orders, when you use the keyword EXEC.
    If you use the start... Keywords of the end, the previous block/statement executed is saved and run when we do a ' / '. Check this session below. I don't know why that is.

    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> set serveroutput on;
    SQL> exec dbms_output.put_line('hello...');
    hello...
    
    PL/SQL procedure successfully completed.
    
    SQL> /
    SP2-0103: Nothing in SQL buffer to run.
    SQL> begin
      2    dbms_output.put_line('hello...');
      3  end;
      4  /
    hello...
    
    PL/SQL procedure successfully completed.
    
    SQL> /
    hello...
    
    PL/SQL procedure successfully completed.
    
    SQL> exec dbms_output.put_line('Hello..How are you? ');
    Hello..How are you?
    
    PL/SQL procedure successfully completed.
    
    SQL> /
    hello...
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

Maybe you are looking for

  • Keyboard Satellite M70 239 did what he wants

    Hello again, I have a new problem with my laptop. Let´s discribe it: After a short period of time after I started my device and it gets to temperature (about 45-50 ° C) my keyboard does what he wants. It s like the SHIFT key is pressed all the time,

  • 3D touch does not work

    Hello I have iphone 6s, tactile 3d does not work then please give a solution, how to solve this problem... I checked in touch 3d is activate sensitivity same test also does not work...

  • Satellite 2410: Question about the different ways to use BlueTooth

    Hello I can't find a place to buy a bluetooth module for my Toshiba Satellite 2410 - the manual says I can, and I know that there is space on the underside of the laptop to insert it. I can't seem to find one to buy - anyone know if they actually exi

  • Mac while a desktop computer

    I have OS X 10.5.8 how upgraded or I can? to 10.6. Processor clocked at 2.66 GHz intel Core 2 duo 1076 MHz 2 GB DDR3 memory

  • Analysis and sorting table

    Hello In the attached VI, I would like to extract the first 50 points, then 50 next and so on (from the attachment) and build a table as shown in the image file. Any help will be greatly appreciated. Thank you hiNi.