What is DOC comm in sql * more

Hello

I have connected the database as user scott and when I run the command 'DOC', it changed my sql * more environmental.

What is the use of the command of the DOC. In the sql * plus help its not available.

Any help from you.

Concerning
Balaji.M

Hello

SQl * more documentation, http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/apc.htm#sthref3393

DOC [MSP] (obsolete)
Begins a block of documentation in a script.

For more information about the method being inserted comments in a script, see the section "placing comments in Scripts" and the REMARK command.

After typing DOCUMENT and enter [return], SQL * Plus, the command prompt displays DOC > instead of SQL > until the end of the documentation. The ' ' pound (#) on a line by itself end the documentation.

If you have set the DOCUMENT to OFF, SQL * Plus suppresses the display of the block of documentation created by the DOCUMENT command. (See "SET DOC [MSP] {ON |}") {OFF} (obsolete) ")".

Concerning
Peter

Tags: Database

Similar Questions

  • 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.

  • InstantClient SQL * more and glogin.sql

    SQL * more the default behavior is to
    (a) loading login.sql in the current directory
    (b) if there is no, put glogin.sql in the + $ORACLE_HOME/sqlplus/admin / + directory

    Note of support described the same behavior InstantClient (10g) in + Glogin.sql is not used with Instant Client [946528.1 ID] + too.

    The solution to InstantClient 10g is simple. Define + $ORACLE_HOME + variable, it points to your instantclient directory and create the path and the file "+... / sqlplus/admin/glogin.» SQL +'.

    However, this now seems to have changed with InstantClient 11 g. This is what the client:
    stat64("login.sql", 0xbf9f2c14)         = -1 ENOENT (No such file or directory)
    brk(0x856e000)                          = 0x856e000
    stat64("glogin.sql", 0xbf9f2c14)        = -1 ENOENT (No such file or directory)
    He seeks login.sql in the current directory - as expected. But now, it seems also to glogin.sql in the current directory - and not in a common/shared as directory + $ORACLE_HOME/sqlplus/admin / +.

    Which is just silly IMO - like why do glogin.sql now behave like login.sql ? Wait until it is in the current working directory? What is 'global' subject and forced to have a glogin.sql in every single directory you have on your client, where you run SQL * more?

    The correct behavior should be to determine the directory of the module (i.e. instantclient dir where sqlplus was executed) and then look for the glogin.sql in there.

    Am I missing something here? The old behavior can be executed somehow? Or is there a workaround that can be used?

    Hi, for me

    [http://docs.oracle.com/cd/B19306_01/server.102/b14357/ape.htm]

    especialy:

    The directory containing glogin.sql SQLPATH value. For example:

    +SQLPath=/usr/lib/Oracle/10.2.0.1/client/lib:${SQLPath}+
    Export SQLPATH

    works great!

  • SQL * more to wrap the set command - doubt

    Hello

    I have a stupid question on the set "WRAP" command in SQL * more. I put A500 for column F2, linesize 100 and wrap is disabled.
    The result is clear, it truncates exactly the 100th character. When I put the envelope, for the header of column F2, I couldn't see
    the '-' character the hyphen for 500 times, but only for 100 characters. With the release, with few characters of column F2, how do I
    confirm that it printed 499 seats for 2 ranks and 495 white space for the last line.

    Please provide details on the envelope and TRIMOUT/TRIMSPOOL in this context.

    Also, when I increase the linesize 1000 and desc T1, it goes for a draw, it is documented in Oracle, but why is it?
    It is possbile to get the result without changing the linesize. Thank you.

    SQL > column f1
    F1 COLUMN WE
    FORMAT OF 999.99
    SQL > column f2
    COLUMN f2 WE
    FORMAT a500

    SQL > show linesize
    linesize 100

    SQL > set wrap off

    SQL > select f1, f2 from t1;

    F1 F2
    ------- --------------------------------------------------------------------------------------------
    1.00 IS
    2.00 Y
    3.00 three

    SQL > wrap value on

    SQL > show wrap
    Wrap: lines will be wrapped

    SQL > SELECT F1, F2 FROM TEST1;

    F1
    -------
    F2
    ----------------------------------------------------------------------------------------------------
    1.00
    THERE

    2.00
    THERE

    3.00
    Three

    Hello

    845956 wrote:
    Hello

    I have a stupid question on the set "WRAP" command in SQL * more. I put A500 for column F2, linesize 100 and wrap is disabled.
    The result is clear, it truncates exactly the 100th character. When I put the envelope, for the header of column F2, I couldn't see
    the '-' character the hyphen for 500 times, but only for 100 characters.

    Exactly. If LINESIZE is 100, the maximum display width of any column is 100, even if the column is actually longer, and/or you have an explicit order of the COLUMN in this way it will be longer. Nothing after that 100 characters will be encapsulated, if the package is enabled.

    With the release, with few characters of column F2, how do I
    confirm that it printed 499 seats for 2 ranks and 495 white space for the last line.

    Save the output in a HOLD file and change the file to see exactly what it contains. If TRIMSPOOL is activated, it does not contain the final spaces.
    >

    Please provide details on the envelope and TRIMOUT/TRIMSPOOL in this context.

    See the SQL * Plus Manual:
    http://docs.Oracle.com/CD/B28359_01/server.111/b31189/ch12040.htm#i2683480

    Also, when I increase the linesize 1000 and desc T1, it goes for a draw, it is documented in Oracle, but why is it?
    It is possbile to get the result without changing the linesize. Thank you.

    Describe automatically adjusts the width of each column to use all the space available with the LINESIZE current. I don't think there is a way to change this. If you cannot change LINESIZE, then write your own query on all_tab_columns and use it instead of sql * over order DESC.

    Published by: Frank Kulash, 5 March 2012 10:20

  • Unable to connect to the database using SQL * more

    Hi, I have Oracle 10 g XE installed in my labtop, and I can't connect using SQL * more.
    I can connect using the User Interface of navig however, I could do after the following procedure to change the password for the sys account:
    -Open a command prompt
    -type sqlplus
    -On the line "Enter user name", enter the sysdba virtue
    -On the SQL > prompt, type alter user sys identified by NewPassword;

    But the thing is that even if I am able to connect using sys/NewPassword from my browser UI, I don't get the same result when do this using the SQL prompt.

    What I try to do is the following:
    SQL > connect sys/NewPassword
    Can I get first a warming of the planet by saying I should use sysdba or sysoper to connect to the system account, but none of those who work.

    Can anyone advice me on this subject?

    Thanks in advance

    Does make sense at all?

    You really need to Read The Fine Manual
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e16508/TOC.htm

    When you log in as USER "SYS" DB must be described as 'AS SYSDBA'

    sqlplus
    / as sysdba
    SHOW USER;
    -line above indicates that you are now connected to the DB as "SYS"!

    SQL > CONNECT SYS / AS SYSDBA

  • SQL * MORE using command START - please help me understand

    Hello dear friends,

    I encountered a problem that I don't understand. Could you please explain to me what wrong with my logic.

    I created the file called DUMMY.sql sql
    the file context is:

    SELECT a model
    OF dummy_tbl
    WHERE dummy_col = & dummy_var;

    I'm going to SQL * Plus DB version (10.2.0.4.0).

    I command promt: MODEL of STARTING 1
    and waits * & dummy_var * must be replaced by * 1 * and query executed as described in Oracle SQL * MORE reference ([http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/ch6.htm#sthref1058 | http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/ch6.htm#sthref1058]).

    But instead, I'm getting enter the value for dummy_var:

    Please help me understand

    Thanks in advance.

    You must use 1 & instead of & dummy_var.

    The number refers to the position of the parameter to use; 1 is the first parameter & 2 would be a second parameter and so on.

    SELECT dummy
    FROM dummy_tbl
    WHERE dummy_col=&1;
    
  • SQL * more the 'timing' in SQL Developer command

    I installed SQL Developer version 4.1.1.19. In the sql worksheet, how can I use SQL * more order 'timing' in a script to see a time elapsed SQL? The "Timing" on 'set' did not return any info after running SQL, and 'calendar beginning mon_timer' back 'command Timing is obsolete. Help, please.

    Thank you

    • As you can see, there is no calendar information in the script output log.
    • Then I tried on the discussion forum, found it can be enabled in "tool > preference > Database > startup script" and set as startup script:

    Set serveroutput on

    set timing on

    • However, 2 questions are:
    1. the calendar that he returned is NOT the elapsed time of my stored procedure to run. He simply choose the 2 time points its time, before and not after MS point run. Set timing on is therefore not a solution for me.
    2. He did not follow the instructions in the startup script. After that I put the calendar in the startup script, stop & restart SQL Developer, same laptop charging, timing still on. The only way to turn off now is to configure it to NOT use

    any startup script.

    • Then I developed my own coding as a solution:

    3. control of the COIL

    VAR bv_start_ts VARCHAR2 (30)

    VAR bv_end_ts VARCHAR2 (30)

    VAR bv_elps_ts VARCHAR2 (30)

    DECLARE

    v_start_ts VARCHAR2 (30);

    BEGIN

    SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_start_ts FROM DUAL;

    : bv_start_ts: = v_start_ts;

    END;

    /

    IMPRESSION bv_start_ts

    EXEC pmsmmi.rpt.rpt_ethncty_race_smry (15);

    DECLARE

    v_end_ts VARCHAR2 (30);

    BEGIN

    SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_end_ts FROM DUAL;

    : bv_end_ts: = v_end_ts;

    END;

    /

    IMPRESSION bv_end_ts

    EXEC: bv_elps_ts: = TO_CHAR (TO_TIMESTAMP (: bv_end_ts, 'yyyymmddfxDyhh24miss.ff6')-TO_TIMESTAMP (: bv_start_ts, 'yyyymmddfxDyhh24miss.ff6'), 'hh:mi:ss.ff6');

    IMPRESSION bv_elps_ts

    SPOOL OFF

    • Then I got what I want, the answer is in the 'PRINT ': bv_elps_ts

    SQL > VAR bv_start_ts VARCHAR2 (30)

    SQL > VAR bv_end_ts VARCHAR2 (30)

    SQL > VAR bv_elps_ts VARCHAR2 (30)

    SQL > DECLARE

    v_start_ts VARCHAR2 (30);

    BEGIN

    SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_start_ts FROM DUAL;

    : bv_start_ts: = v_start_ts;

    END;

    /

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:00.031

    SQL > PRINT bv_start_ts

    BV_START_TS

    -----------

    20150702Thu112617.775545

    SQL > EXEC pmsmmi.rpt.rpt_ethncty_race_smry (15)

    PL/SQL procedure successfully completed.

    SQL > DECLARE

    v_end_ts VARCHAR2 (30);

    BEGIN

    SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_end_ts FROM DUAL;

    : bv_end_ts: = v_end_ts;

    END;

    /

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:00.062

    SQL > PRINT bv_end_ts

    BV_END_TS

    ---------

    20150702Thu112630.805786

    SQL > EXEC: bv_elps_ts: = TO_CHAR (TO_TIMESTAMP (: bv_end_ts, 'yyyymmddfxDyhh24miss.ff6')-TO_TIMESTAMP (: bv_start_ts, 'yyyymmddfxDyhh24miss.ff6'), 'hh:mi:ss.ff6')

    PL/SQL procedure successfully completed.

    SQL > PRINT bv_elps_ts

    BV_ELPS_TS

    ----------

    + 00:00:13.030241000 000000

    SQL > SPOOL OFF

  • Database demo of vision: how to access the database through SQL * more?

    I'm totally new in this space, so forgive my beginner questions.

    What I want to do, is to integrate EBS with APEX. To get there I downloaded (of delivery) and installed the Vision database unique node in a VirtualBox. To do this, I followed this video on YouTube: https://www.youtube.com/watch?v=8JgxMDPsd6s

    Now I want to install APEX and for this I need to access my database as SYS. Now for my questions:

    1. How can I use SQL * more in the VirtualBox?

    2. What is the default password for SYS with this demo database?

    Thanks, Alex

    File under $ORACLE_HOME and the owner is the user 'oracle '.

    You will need to source the file VISION_ebs.env , and then deliver "env | fate"and you should see the set env variables. You can connect as sysdba.

    Thank you

    Hussein

  • Cannot access SQL more from other than the Oracle users

    Hello

    I installed Oracle 11 g R2 on Red Hat 6. My problem is that I can't access sqlplus from other than the oracle users.

    I put the PATH, the ORACLE_HOME and ORACLE_SID to the correct values.

    Session1

    Connect as: oracle

    [email protected] password:

    Last login: Sun Aug 24 01:24:46 192.168.202.1 2014

    [oracle@localhost ~] $ echo $PATH

    /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/Home/Oracle/bin:/Home/Oracle/app/Oracle/product/11.2.0/dbhome_1/bin

    [oracle@localhost ~] $ echo $ORACLE_HOME

    /Home/Oracle/app/Oracle/product/11.2.0/dbhome_1

    [oracle@localhost ~] $ echo $ORACLE_SID

    ORCL

    [oracle@localhost ~] $ sqlplus

    SQL * more: Production release 11.2.0.1.0 Sun Aug 24 03:17:32 2014

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

    Enter the user name:

    Session2

    Connect as: nada

    [email protected] password:

    Last login: Sun Aug 24 02:31:49 192.168.202.1 2014

    [prithwish@localhost ~] $ export PATH=$PATH:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin

    [prithwish@localhost ~] $ export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1

    [prithwish@localhost ~] $ export ORACLE_SID = orcl

    [prithwish@localhost ~] $ echo $ORACLE_HOME

    /Home/Oracle/app/Oracle/product/11.2.0/dbhome_1

    [prithwish@localhost ~] $ echo $ORACLE_SID

    ORCL

    [prithwish@localhost ~] $ echo $PATH

    /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/Home/Prithwish/bin:/Home/Oracle/app/Oracle/product/11.2.0/dbhome_1/bin

    [prithwish@localhost ~] $ sqlplus

    -bash: sqlplus: command not found

    I guess that I could not access sqlplus as the Nada the user has no access to X11R6

    [prithwish@localhost ~] $ cd...

    [Host prithwish@localhost] $ ls - ltr

    Total 8

    drwx-. 30 oracle oinstall 4096 23 August 23:51 oracle

    drwx-. Nada Nada 4096 24 August to 02:33 27 Mathieu

    [Host prithwish@localhost] $

    My question is, although quite stupid, that double

    (1) I have to change the permissions of the directory oracle of 755 for any other user to access the sqlplus?

    (2) why is the user directory under the folder created with permissions of 700, even when the umask is set to 002? Change the permissions of the directory under/Home oracle will cause security problems?

    My apologies for being naïve. It's the first time I installed Oracle under UNIX

    Kind regards

    Prithwsh

    Actually, the default procedure is NOT to install oracle to X11R6, but in/opt/oracle. or maybe/usr/local/oracle.

    This is what you're going to be recommended in the installation documentation, and in doing so, don't forget to run rootpre.sh and root.sh, I never had security problems and could run Oracle from any account.

    Sybrand Bakker

    Senior Oracle DBA

  • Can I connect to SQL * more as SYS after connecting as a user and then run a GRANT?

    Oracle 11 g 2

    Linux RHEL 6.3

    SQL * Plus 11.2.0.2 on Windows 7

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

    I am running a script SQL through SQL * more connected as "DOE, JOHN".

    In the SQL script, I need to connect as SYS to make a GRANT EXECUTE on a SYS package (e.g. GRANT EXECUTE ON DBMS_CRYPTO to JOHN;).

    But it fails with the following error:


    GRANT EXECUTE ON TO JOHN DBMS_CRYPTO
    *
    ERROR on line 1:
    ORA-01917: user or role 'JOHN' does not exist

    But of course, 'JOHN' are.  The rest of the SQL script is running "DOE, JOHN" without any problem.

    The code segment of SQL script in question is:

    connect sys/password as sysdba
    GRANT EXECUTE ON DBMS_CRYPTO TO ROYSECITYDATA;  <-fails here
    to connect/DOE

    Please advise on what my being the issue.

    tx103108 wrote:

    I connect to a remote database.  All dbs distance have the same instance name as they are all images.  I see where you're going (I think).  Should I try

    I'll try to connect sys/password@MYDB

    Sounds like a plan... (the instance_name returned with what you expected? or something else?)

  • Connect to the database with SQL * more: is TNSNAMES. ORA used?

    Hello

    We have a local database called DEV01 and a copy of this database in a data center. To be able to connect to both databases, the TNSNAMES file. ORA

    on the local database server (not the one in the data center) has the following entries:

    / * Entry for the local database * /.

    DEV01_local, DEV01_local. WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server01) (PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SID = DEV01)
    )
    )

    / * Entry for the database in the data center * /.

    DEV01, DEV01. WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server02) (PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SID = DEV01)
    )
    )

    When I connect to the local database server, I set the Oracle environment as follows:

    export ORACLE_SID = DEV01

    export PATH=/opt/oracle/app/oracle/product/9.2.0/bin:$PATH

    export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2.0

    Now I start SQL * more as follows:

    Oracle # > sqlplus user/user

    SQL > select instance_name, host_name from v$ instance;

    INSTANCE_NAME HOST_NAME

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

    SERVER01 DEV01

    As the SID is on two databases of the same (DEV01) I really don't understand how Oracle decides which of the SQL databases * more connects to.

    Is it the entry in the TNSNAMES file. ORA?

    But when I start SQL * more as follows:

    Oracle # > sqlplus user/user@DEV01_local

    SQL > select instance_name, host_name from v$ instance;

    INSTANCE_NAME HOST_NAME

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

    SERVER01 DEV01

    or

    Oracle # > sqlplus user/user@DEV01

    SQL > select instance_name, host_name from v$ instance;

    INSTANCE_NAME HOST_NAME

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

    DEV01 server02

    everything is as expected.

    Does anyone know who is the chosen database when just to connect with 'sqlplus user/user' (without the @DEV01 or @DEV01_local)?

    Any help will be appreciated!

    Rgds

    Jan

    When you connect to the local database that is connected to the server01, you need only specify the sid in the environment, in this case, Oracle tnsnames file to connect, actually uses, it uses any of the listener.  It uses what is called a connection needed.  It is purely a side connection server, and as long as the sid is located in the environment resolves to a database running on that server, you will be get connected.

    When you connect using the @connect_descriptor, like you second case, then Oracle will use the configured naming, including tnsnames, methods to solve the 'real' database  In this case, the auditor is required to create the connection to the database.

    John

  • BECAUSE a node: when to stop through SQL * more...


    Hello

    I installed a CCR node for the first time and playing with it to get better knowledge. The underlying cluster has two nodes, call them the Node_A and node_b.

    The cluster database itself is called upon to DEVELOP, DEVELOP_1 instance is running on the node Node_A, instance DEVELOP_2 is supposed to work on node_b. The preferred node is

    NŒUD_A.

    When testing database online relcation everything works as expected: DEVELOP_1 instance Gets the stop on Node_A node - instance DEVELOP_2 is started on node_b.

    But what closing instance DEVELOP_1 on Node_A with SQL * more I was surprised of the result:

    -C' is not instance DEVELOP_2 which began on node_b - it was DEVELOP_1 for instance!  (Because of this my control sews has changed - but is not the issue of this discussion).

    Now my questions are:

    -is the clusterware responsible for the DEVELOP_1 instance on node_b startup behavior when I stop instance DEVELOP_1 down on Node_A via SQL * more?

    - and if this behavior is documented? I went through the RAC documentation node, but could not find something useful

    Any help will be appreciated.

    Rgds

    Jan

    Hi Jan,

    Yes, its expected behavior in a node of the FCAC, please consult the document below.

    "Oracle Real Application Clusters one node Overview" (Page 1) (relocation of the database online)

    http://www.Oracle.com/technetwork/products/Clustering/overview/TWP-rac1nodev1-1-130698.PDF

  • SQL * more report: hide accept the value in the report

    Hi all

    I created a SQL for APEX-Application report. The output is stored in an HTML file.

    Everything works great but think I want to hide in the HTML report.

    I try to describe what is the problem.

    I invite the user to put in the demand of the apex application_id:

    accept v_application_Id char prompt ' ID application:'

    In the HTML file, you receive the following output:

    Report tabled the:
    June 25, 2013, 10:06:04

    ALT 8: where application_id = & & v_application_id
    Neu 8: where application_id = 680

    Workspace
    Workspace APPLICATION_ID Application_name ALIAS OWNER
    Q0Q0AUFTRAGSVERWALTUNG680Q0Q0AUFTRAGSVERWALTUNGF680317Q0Q0AUFTRAGSVERWALTUNG_ADMIN

    How to hide the two lines

    ALT 8: where application_id = & & v_application_id

    Neu 8: where application_id = 680

    According to the report?

    I searched this forum and toke a glance in the documentation, but I found nothing.

    Could someone help me please?

    Oracle 11g R2

    This is the SQL script I run in SQL * more.


    -launch script

    accept v_application_Id char prompt ' ID application:'

    coil C:\a\APEX.html


    termout off Set
    SET of HTML MARKUP WE REEL WE HEAD ' < TITLE > SQL * more APEX report < /title >--
    "< STYLE TYPE =" TEXT/CSS"> <!-BODY {bgcolor: background ffffaa: ffffc6}-> < / STYLE >.
    Clear jump
    clear the buffer
    Claire calculate
    clear the column
    Disable the sql
    Set feedback off
    Set serveroutput on


    --
    -Report header
    --
    TTITLE left ' ' jump 1
    Select TO_CHAR (sysdate, 'dd-Mon-yyyy, hh24:mm:ss') ' report created on:
    Double;


    --
    -Workspace
    --
    TTITLE left col 15 ' < police = "Arial" size = "+ 2" color = "#0000FF" > workspace < / police > ' jump 1

    set linesize 300
    set pagesize 500
    Set serveroutput on


    column format a35 workspace
    application_id 99999999 column format
    column format a35 application_name
    column alias format a35
    column owner format a35

    Select

    WORKSPACE,
    APPLICATION_ID,
    APPLICATION NAME,
    ALIAS,
    OWNER
    of apex_applications
    where application_id = & & v_application_id;

    off Ttitle

    Select
    APPLICATION_GROUP,
    APPLICATION_GROUP_ID,
    HOME_LINK,
    PAGE_TEMPLATE,
    ERROR_PAGE_TEMPLATE
    of apex_applications
    where application_id = & & v_application_id;


    Set termout on
    moved the markup html off the coast of the "body" entmap wide head reel off pre
    Set of feedback on
    set linesize 80
    set pagesize 50
    off Ttitle
    Set termout on
    Set serveroutput off
    spool off
    set echo on

    -End Script


    Best regards

    Ben

    Oracle 11g R2

    Hi, Ben.

    The SQL * Plus command to stop these messages is

    SET VERIFY OFF

    Put this command anywhere before the first use of a substitution variable, for example before the order of the COIL.

    These 'OLD' and 'NEW' messages will remain deleted until you finish the SQL * most the session or cause a SET VERIFY ON command.

    If you use SQL * more often, then, when you have a few minutes, look for the SET command in SQL * more manual,.

    System of SETTING Variable summary

    and read a little about each option.  You probably don't remember everything, but you'll probably remember what kind of things can be controlled by the SET command and get a better idea of where to start to look in the future when you have a different problem.

  • How to add timestamp to log file in SQL * more?

    Version: 11.2.0.3
    Platform: RHEL 5.8 (but I'm looking for a solution that is independent of the platform)


    I want to add the timestamp file name of the log queued in SQL * more.
    The name of the queued log file should look like
    WMS_APP_23-March-2013.log
    I tried the 3 following methods found in the google. But none of them worked!


    I tried this
    col sysdt noprint new_value sysdt_var
    SELECT TO_CHAR(SYSDATE, 'yyyymmdd_hh24miss') sysdt FROM DUAL;
    spool run_filename_&sysdt_var.Log
    as suggested in
    http://power2build.WordPress.com/2011/03/11/sqlplus-spool-name-with-embedded-timestamp/

    and this
    spool filename with timestamp
    col sysdt noprint new_value sysdt
    SELECT TO_CHAR(SYSDATE, 'yyyymmdd_hh24miss') sysdt FROM DUAL;
    spool run_filename_&sysdt..Log
    as suggested in

    http://powerbuildev.WordPress.com/2011/03/11/sqlplus-spool-name-with-embedded-timestamp/


    and this
    column tm new_value file_time noprint
    select to_char(sysdate, 'YYYYMMDD') tm from dual ;
    prompt &file_time
    spool logfile_id&file_time..log
    as suggested in
    Creating a queue with date/time added file name



    None of these worked in RHEL or MS DOS. No work around?

    You are explicitly turned off the replacement of the variables of substitution with the statement "all set."
    http://docs.Oracle.com/CD/E11882_01/server.112/e16604/ch_eight.htm
    "SET DEFINE OFF disables the analysis of orders to replace variables with their values substitution."

  • Reg: "#" output of data (SQL * more)

    Hi Experts,

    I am facing a strange problem in SQL * more.
    When you try to run the piece of code below, I get "#" for only a few lines while the ranks gives the appropriate data.
    ranit@XE11GR2>> with t as (select 1 as id from dual union all
      2                 select 2 from dual)
      3      --
      4      select id, level
      5            ,prior id
      6            ,sys_connect_by_path(id,'=>') as cpath
      7      from   t
      8     connect by level <= 2;
     
            ID      LEVEL    PRIORID CPATH
    ---------- ---------- ---------- ----------
    ########## ##########            =>1
    ########## ########## ########## =>1=>1
    ########## ########## ########## =>1=>2
    ########## ##########            =>2
    ########## ########## ########## =>2=>1
    ########## ########## ########## =>2=>2
     
    6 rows selected.
    Please can someone help what can be the problem?

    Duplicate the thread by me (in SQL * Plus section)-https://forums.oracle.com/forums/thread.jspa?threadID=2524813 & tstart = 0
    (Did not reply here since yesterday. MOD please delete this thread)

    Thank you
    Nordine
    SQL> column col1 format a6
    SQL> select 12345678 col1 from dual;
    
          COL1
    ----------
    ##########
    
    SQL> column col1 format a10
    SQL> select 12345678 col1 from dual;
    
          COL1
    ----------
    ##########
    
    SQL> column col1 format a15
    SQL> select 12345678 col1 from dual;
    
          COL1
    ----------
    ##########
    
    SQL> column col1 clear
    SQL> select 12345678 col1 from dual;
    
          COL1
    ----------
      12345678
    
    SQL> column col1 format 999999999
    SQL> select 12345678 col1 from dual;
    
          COL1
    ----------
      12345678
    

Maybe you are looking for