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

Tags: Database

Similar Questions

  • 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

  • execution of stored procedure in sql developer/sql more with a table setting?

    Hello

    I create a package with a procedure which has a cursor ref as output and a type as an input parameter.  Here is my definition of the package

    PACKAGE 
    -------
    CREATE OR REPLACE PACKAGE TEST
    As
      TYPE RefCursorType IS REF CURSOR;
      type intTableType is table of varchar2(50) index by binary_integer;
      
      PROCEDURE GETDATA (
              P_RECORDS OUT RefCursorType,           
               YEAR_LIST IN intTableType
      );  
    END;
    
    
    PACKAGE BODY
    -----------------------
    
    SET DEFINE OFF
    CREATE OR REPLACE PACKAGE BODY TEST
    AS 
    PROCEDURE GETDATA
    (
      P_RECORDS OUT RefCursorType,  
      YEAR_LIST IN intTableType  
    )
    AS 
    iYearList  IDTableType;
    BEGIN 
      --GET ARRAY COUNT
      IYEARLIST := IDTABLETYPE();
      IYEARLIST.EXTEND(YEAR_LIST.COUNT);
      
      --LOOP THROUGH LISTS AND POPULATE ARRAY
      FOR I IN YEAR_LIST.FIRST .. YEAR_LIST.LAST
      LOOP
      IYEARLIST(I) := IDTYPE(TO_CHAR(YEAR_LIST(I)));
      END LOOP;
      
       OPEN P_RECORDS FOR 
       SELECT CITHTML AS FORMATTED
        FROM dbTest.FORMATTED_HTML
      WHERE YEAR IN (SELECT * FROM TABLE(IYEARLIST))
      ;
      END GETDATA ;
    END TEST ;
    /
    
    

    I want to perform this procedure from the sql or sql developer more to see if it works properly.   The year field dbTest.FORMATTED_HTML is defined as varchar2 (20 bytes).  He has many years as well as text.

    I've used this in the past with simple stored procedures, but not those with a table setting

    var r refcursor;

    exec GETOLDDATA(:r,40);

    print r;

    How can I modify this to allow him to run my stored procedure?

    Thank you

    Just declare SQL, not type of PL/SQL:

    CREATE OR REPLACE

    TYPE Str50TblType

    AS THE TABLE OF THE VARCHAR2 (50)

    /

    CREATE OR REPLACE

    THE TEST PACKAGE

    IS

    GETDATA PROCEDURE)

    P_RECORDS ON SYS_REFCURSOR,

    YEAR_LIST IN Str50TblType

    );

    END;

    /

    CREATE OR REPLACE

    TEST OF PACKAGE BODY

    IS

    GETDATA PROCEDURE)

    P_RECORDS ON SYS_REFCURSOR,

    YEAR_LIST IN Str50TblType

    )

    IS

    BEGIN

    OPEN P_RECORDS

    FOR

    SELECT CITHTML AS FORMATTED

    OF dbTest.FORMATTED_HTML

    WHERE YEAR IN)

    SELECT *.

    TABLE (YEAR_LIST)

    );

    GETDATA END;

    END TEST;

    /

    SY.

  • Configure SQL * more question

    People,

    Hello. My operating system is Oracle Linux 5. Database is DB Oracle 11 GR 1 material.

    I tried to configure SQL * Plus in the following way:

    My directory: / home/myOracle/OracleDB_Home/bin

    SYSTEM_PASS = SYSTEM/SYSTEM
    export SYSTEM_PASS
    . / sqlplus SYSTEM/SYSTEM

    But this message appears:

    Error Initializing SQL 6 * more
    Sql < lang > .msb file not found message
    SP2-0750: you may need to set ORACLE_HOME in your Oracle software directory.

    Where the message sql < lang > .msb file? What is Oracle software directory?
    Any folk can help solve this problem?

    user8860348 wrote:
    Folk,

    Hello. Thanks much for the reply.

    What is Oracle software directory?
    How to set ORACLE_HOME directory of Oracle software?

    Hello

    run

    $ > export ORACLE_HOME = / home/myOracle/OracleDB_Home

    See you soon

  • SQL MORE QUESTIONS

    According to the tables and the attributes below, I need solve 25 questions. I answered some of them and some of them I couldn't solve. I need your help please.

    School (sch_name, sch_phone, sch_code, sch_dean)
    Advisor (adv_code, adv_fname, adv_lname, adv_phone, sch_code)
    Major (maj_code, maj_desc, sch_code)
    maj_adv (maj_code, adv_code)
    student (std_code, std_lname, std_fname, std_gend, maj_code, std_dob)
    rank (std_code, gr_lname, gr_fname, gr_t1, gr_t2, gr_hw, gr_pr)


    create table school
    (sch_code varchar2 (8) school_sch_code_pk primary key constraint,)
    sch_name varchar2 (50).
    sch_phone varchar2 (12),
    sch_dean varchar2 (20));

    insert into the values of the school ('BUS', "School of Business", 281-283-3100', 'Ted Cummings');
    insert into the values of the school ("EDU", «School of Education», 281-283-3600', "Dennis Spuck");
    insert into the values of the school ("MSM", "School letters" and Human Sciences, ' 281-283-3333', "Bruce Palmer");
    insert into the values of the school ('DRY', 'school of Science and engineering', ' 281-283-3700', "Sadegh Davari");

    create table Advisor
    (adv_code varchar2 (08) advisor_adv_code_pk primary key constraint,)
    adv_lname varchar2 (15).
    adv_fname varchar2 (15).
    adv_phone varchar2 (12),
    sch_code varchar2 (8) constraint advisor_sch_code_fk references school (sch_code));

    insert into portfolioadvisor ('A1', 'Porter', 'Mattie', ' 281-283-3163', 'BUS');
    insert into portfolioadvisor ("A2", "Grady", "Lost", 281-283-3400', 'BUS');
    insert into portfolioadvisor ("A3", "Tran", "Van", 281-283-3203', 'BUS');
    insert into portfolioadvisor ('A4', 'Sale', 'Nili', 281-283-3202', 'BUS');
    insert into portfolioadvisor ("A5", "Kwok-good', 'Yue', 281-283-3864', 'SEC');
    insert into portfolioadvisor ("A6", "Jones", "Lisa", ' 281-283-3551', "EDU");
    insert into portfolioadvisor ("A7", "Palmer", "Bruce", 281-283-3445', "MSM");


    create major table
    (maj_code varchar2 (10) major_maj_code_pk primary key constraint,)
    maj_desc varchar2 (30),
    sch_code varchar2 (8) constraint major_sch_code_fk references school (sch_code));

    insert into large values ('ACCT', 'Accounting', 'BUS');
    insert into the great values ('Ministers', 'Finance', 'BUS');
    insert into large values ("ISAM", 'Management Information systems', 'BUS');
    insert into large values ('SMK', 'Computer Science', 'DRY');
    insert into large values ('HIST', 'History', "MSM");
    insert into large values ("INST", "Instructional Technology", "EDU");

    create the table maj_adv
    (maj_code varchar2 (10) constraint maj_adv_maj_code_fk main references (maj_code),)
    adv_code varchar2 (08) constraint maj_adv_adv_code_fk references Advisor (adv_code).
    constraint maj_adv_maj_code_adv_code_cpk primary key (maj_code, adv_code));

    insert into maj_adv values ('ACCT', 'A1');
    insert into maj_adv values ("ACCT", "A2");
    insert into maj_adv values ("Ministers", "A2");
    insert into maj_adv values ("ISAM", "A3");
    insert into maj_adv values ("ISAM", "A4");
    insert into maj_adv values ("CSCI", "A5");
    insert into maj_adv values ("INST", "A6");
    insert into maj_adv values ("HIST", "A7");


    create table students
    (std_code, varchar2 (9))
    std_lname varchar2 (15) constraint student_std_lname_nn not null,
    std_fname varchar2 (15) constraint student_std_fname_nn not null,
    std_gend varchar2 (8).
    maj_code varchar2 (10) constraint student_maj_code1_fk main references (maj_code).
    date of std_dob,
    constraint student_std_code_pk primary key (std_code));

    insert into student values ('S1', 'Jordan', 'Michael', 'F' 'Ministers', to_date (10 March 1962 ',' Mon-DD-YYYY ""));
    insert into student values ('S2', 'Barkley', 'Charles, m', null, to_date ('12-Sept-1964, ' Mon-DD-YYYY ""));
    insert into student values ('S3 ', 'Johnson', 'Magic', am ', 'ACCT', to_date ('13-Sep-1960, ' Mon-DD-YYYY ""));
    insert into values student ("S4", "Williams', 'Serena', 'F', 'ISAM', to_date (October 23, 1980 ',' Mon-DD-YYYY" "));
    insert into student values ('S5', 'Duncan', 'Tim', am', 'ISAM', to_date (August 7, 1972 ',' Mon-DD-YYYY'));
    insert into values student ("S6", "Graff", 'Steffi', 'F', 'SMK', to_date (30 April 1962 ',' Mon-DD-YYYY ""));
    insert into values student ("S7", "Navratilova", "Martina", 'F', 'ACCT', to_date (18 December 1972 ',' Mon-DD-YYYY ""));

    NOTE Insert student (std_lname, std_fname, std_code, std_dob)
    NOTE values ('S2', 'Barkley', 'Charles', to_date('12-Sep-1964','DD-Mon-YYYY'));

    create the table class
    (std_code varchar2 (9) grade_std_code_pk primary key constraint)
    constraint grade_std_code_fk references student (std_code).
    gr_lname varchar2 (15) constraint grade_gr_lname_nn not null,
    gr_fname varchar2 (15) constraint grade_gr_fname_nn not null,
    gr_t1 number (5), constraint grade_gr_t1_cc check (gr_t1 between 0 and 100).
    gr_t2 number (5),
    gr_hw number (5),
    gr_pr number (5));

    insert into rank values ('S1', 'Jordan', 'Michael', 90, 80, 98, 90);
    insert into rank values ('S2', 'Barkley', 'Charles', 60, 100, 100, 60);
    insert into rank values ('S3', 'Johnson', 'Magic', 88, 98, 96, 98);
    insert into rank values ("S4", "Williams", "Serena", 92, 92, 92, 92);
    insert into rank values ('S5', 'Duncan', 'Tim', 90, 94, 94, 96);
    insert into rank values ("S6", "Graffiti", "Steffi", 80, 83, 84, 72);
    insert into category values ("S7", "Navratilova", "Martina", 91, 88, 94, 95);

    the questions are:

    Give the following commands:

    1 the names of students who do not have a large.
    2 display the names of the students whose name has two "o" inside.
    3 the names of the students whose first name has an "e" in it.
    4 the names of the students whose name has exactly five characters in there.
    5 the names of students with higher test grade 2 test 1 grade.
    6 the names of pupils with grade of the project between trials 1 and 2 test classes.
    7. give the name of the student whose name begins with the character 'B' or who have never transformed into working from home.
    8. give the command that will appear two columns and one record. The first column will have the title "Major" and "ACCT" as value. The second column will have the title of 'MIS_Count' and will display the number of advisors of accounting.
    9 display the name of the student whose test 1 score is higher than the average on test 1.
    10. give the names and surname of the students who scored above average on test 1, as well as above average on the test # 2.
    11 show the date variable system using the double table.
    12. show the date variable system using the table of quality ensuring that the date is displayed only once.
    13. give the name of the student who is the oldest student and scored highest on the first try.
    14 list different majors and number of advisors for these majors.
    15 show the names of students who do not quality for any element.
    16 show the names of students who do not have at least one element.
    17 the names of students who have the same major as 'Michael Jordan'.
    18. give the names of the students whose average on test 1 and test 2 is higher than the average on the homework and project.
    19 display name and the average of the test 1 and 2 test for each student.
    20 display the number of students in the student table using three different methods.
    21. view student numbers in the table of student accountants.
    22 display the number of students of accounting and finance in the student table.
    23 show the average on the test 1 and 2 test for female students.
    24 show the number of students of accounting and finance including test 1 grades are above average on test 1.
    25 display the name of the major that has more than two students.

    I'm stuck with the following questions (1,12,13, 15,16,17,24) and the rest, I finished them but I'm not sure.
    Thank you and looking forward to hear your suggestions.

    Hi and welcome to the forum!

    This looks like a duty for me to be perfectly honest. When it's people are usually not willing to spoon feed answers because is not helping improve learning.

    I'll try to help if you can show me what you have tried for the issues that you are having problems with.

    Thank you!

  • SQL * more question

    Hello
    Could you help me with writing SQL script, please.
    I had 4 tables.
    1: offers: attributes: Hotel, car, id of the offer, day, place.
    2: clients: attributes: customer id, name, address, no.phone.
    3. travel: attributes: id of the offer, date of the excursion, the price.
    4: reservations; attributes: offer code, the date of the offer, customer id, date of reservation, no.people, prepayment.

    I do the script:
    Please provide the name of the customer, address, no.phone. who has chosen to offer for the Special Place. Should be dinamic script.

    Help, please.
    SQL> ACCEPT Place PROMPT "Please enter place: "
    Please enter place: Zakopane
    SQL> SELECT  K.NAZWA,
      2          K.ADRES,
      3          K.NR_TELEFONU
      4    FROM  KLIENCI K,
      5          REZERWACJE  R,
      6          OFERTY O
      7    WHERE O.MIEJSCE     = '&Place'
      8      AND R.KOD_OFERTY  = O.KOD_OFERTY
      9      AND K.KOD_KLIENTA = R.KOD_KLIENTA
     10  /
    old   7:   WHERE O.MIEJSCE     = '&Place'
    new   7:   WHERE O.MIEJSCE     = 'Zakopane'
    
    NAZWA           ADRES                NR_TELEFONU
    --------------- -------------------- -----------
    Andrzej Krzak   Ul.Wiosenna Lublin    7814562508
    
    SQL> ACCEPT Place PROMPT "Please enter place: "
    Please enter place: berlin
    SQL> SELECT  K.NAZWA,
      2          K.ADRES,
      3          K.NR_TELEFONU
      4    FROM  KLIENCI K,
      5          REZERWACJE  R,
      6          OFERTY O
      7    WHERE O.MIEJSCE     = '&Place'
      8      AND R.KOD_OFERTY  = O.KOD_OFERTY
      9      AND K.KOD_KLIENTA = R.KOD_KLIENTA
     10  /
    old   7:   WHERE O.MIEJSCE     = '&Place'
    new   7:   WHERE O.MIEJSCE     = 'berlin'
    
    NAZWA           ADRES                NR_TELEFONU
    --------------- -------------------- -----------
    Robert Dole     Ul.Lubelska Ciechan   7522885699
    
    SQL> 
    

    SY.

  • SQL * more substitution vs bind variable question

    Hi all, I am trying to automate some SQL within SQL codes * more script that is triggered by a script .bat, the only parts that change are Dates...

    example:

    create table blah as

    Select * from table

    WHERE DATE between start_date and END_DAY;

    the DATE is a numeric field, YYYYMMDD

    The script runs always at the beginning of a new week, so a Monday, unless a public holiday, then a Tuesday.

    The END_DAY is * always * last Friday and I realized that:

    variable L_FRIDAY char (15);

    Start

    Select to_char (next_day(sysdate-7,'FRIDAY'), 'YYYYMMDD') as Last_Friday in: double L_FRIDAY;

    end;

    /

    The thing is that I get an error when I try to use the binding variable?

    create table blah as

    Select * from table

    WHERE DATE between start_date and: L_FRIDAY;

    Then once I found the end date, I was going to use add_months(L_FRIDAY,-12) for previous 12 months for the start_date...

    When I tried to use a variable Substitution I could just hard code the date, but I can not or do not know how to set the value of this exec to the variable?

    Help!

    :-)

    Basically my research reveals that - Bind variables are not allowed for operations of data definition, use substutions instead of bind variables

    I need an automated way to find the END_DAY which is last Friday and START_DATE that is 12 months before Friday and refer to those in the SQL without errors.

    Hello

    Kodiak_Seattle wrote:

    Hi all, I am trying to automate some SQL within SQL codes * more script that is triggered by a script .bat, the only parts that change are Dates...

    example:

    create table blah as

    Select * from table

    WHERE DATE between start_date and END_DAY;

    the DATE is a numeric field, YYYYMMDD

    The script runs always at the beginning of a new week, so a Monday, unless a public holiday, then a Tuesday.

    The END_DAY is * always * last Friday and I realized that:

    variable L_FRIDAY char (15);

    Start

    Select to_char (next_day(sysdate-7,'FRIDAY'), 'YYYYMMDD') as Last_Friday in: double L_FRIDAY;

    end;

    /

    The thing is that I get an error when I try to use the binding variable?

    create table blah as

    Select * from table

    WHERE DATE between start_date and: L_FRIDAY;

    Then once I found the end date, I was going to use add_months(L_FRIDAY,-12) for previous 12 months for the start_date...

    When I tried to use a variable Substitution I could just hard code the date, but I can not or do not know how to set the value of this exec to the variable?

    Help!

    :-)

    Basically my research reveals that - Bind variables are not allowed for operations of data definition, use substutions instead of bind variables

    I need an automated way to find the END_DAY which is last Friday and START_DATE that is 12 months before Friday and refer to those in the SQL without errors.

    Or SQL * more bind variable or variable substitution can be DATEs.  The best you can do is set a different type, as a string, representing a date.  A string as June 19, 2015"represents a date, but so strings like 'SYSDATE' and ' SYSDATE - 7', so you can do something like this:

    SET l_friday = ' NEXT_DAY ((SYSDATE-7), 'FRIDAY').

    DEFINE start_date = "ADD_MONTHS (& l_friday, - 12)"

    SELECT & start_date AS t_n

    , & l_friday AS l_f

    OF the double

    ;

    Output (when executed on 25 June 2015):

    L_F T_N

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

    June 19, 2014 19 June 2015

  • Question on the definition of the width of column in SQL * more with information recovered w SQL

    Hello

    Is there a way to tell SQL * more to set the width of a column with the largest width of the items in the column? (as opposed to the default which is declared in the DDL width)

    In other words, I would like to do something functionally equivalent to this:

    COL < columname > format [select max (length (< columnname >)) < thetablethatcontainscolumname >]

    I do above manually in two steps

    1. select max (length (columnname)) of...

    2 col columnname format a [resultofstep1]

    Is it possible to do in one step?

    Thank you for your help,

    John.

    Hi John

    I don't think that there is a way to do this, because this information is not known at run time (as you proved it, you must run a separate SQL query first to calculate that information - also, what happens if there are predicates, this could affect the defined result so the request will actually be performed twice). You may decide an arbitrary width for each column and set it as being wrapped/word_wrapped/truncated.

    Other that that, you should consider whther you are using the right tool for the job, SQLplus is not exactly ideal for the presentation layer stuff. Something like APEX would give you much more control over the layout and formatting.

    See you soon

    Ben

  • SP2-0642: SQL * more internal error of State 2165

    Hello

    I was faced with the question with sqlplus suddenly in 11.2.0.3 throw version on solaris 10 OS, it was working fine until today. No changes made on this (11.2.0.3.Q3) oracle home, but new ORACLE HOME installed by Server DBA (shared server) with the Q4 patch.

    -bash-3, $2 sqlplus / as sysdba

    SP2-0642: SQL * more internal error state 2165, context 4294967295:0:0

    Impossible to continue

    As explained in metalink note: 396154.1, I set NLS_DATE_FORMAT, but it doesn't seem to work

    also, I've checked the timezone as explained in the blog file, but the file timezone.dat does not exist in 11.2.0.3 version and all the files in $ORACLE_HOME/oracore/zoneinfo/have permissions of reading to the dba group

    http://arjudba.blogspot.com/2010/07/non-Oracle-user-hits-SP2-0642-or-SP2.html

    -bash - $3.2 ls - ltr

    30942 total

    -rw - r - r - 1 oracle dba readme.txt 6068 7 June 2010

    -rw - r - r - 1 oracle dba 31525 June 7, 2010 timezdif.csv

    -rw - r - r - 1 oracle dba 351525 Aug 21, 2011 timezone_9.dat

    -rw - r - r - 1 oracle dba 302100 August 21, 2011 timezone_8.dat

    -rw - r - r - 1 oracle dba 286815 Aug 21, 2011 timezone_7.dat

    -rw - r - r - 1 oracle dba 286217 Aug 21, 2011 timezone_6.dat

    -rw - r - r - 1 oracle dba 286310 Aug 21, 2011 timezone_5.dat

    -rw - r - r - 1 oracle dba 286264 Aug 21, 2011 timezone_4.dat

    -rw - r - r - 1 oracle dba 286651 Aug 21, 2011 timezone_3.dat

    -rw - r - r - 1 oracle dba 274900 August 21, 2011 timezone_2.dat

    -rw - r - r - 1 oracle dba 344448 Aug 21, 2011 timezone_14.dat

    -rw - r - r - 1 oracle dba 344425 Aug 21, 2011 timezone_13.dat

    -rw - r - r - 1 oracle dba 345024 Aug 21, 2011 timezone_12.dat

    -rw - r - r - 1 oracle dba 345356 Aug 21, 2011 timezone_11.dat

    -rw - r - r - 1 oracle dba 345637 Aug 21, 2011 timezone_10.dat

    -rw - r - r - 1 oracle dba 274427 Aug 21, 2011 timezone_1.dat

    -rw - r - r - 1 oracle dba 801410 Aug 21, 2011 timezlrg_9.dat

    -rw - r - r - 1 oracle dba 616723 Aug 21, 2011 timezlrg_8.dat

    -rw - r - r - 1 oracle dba 601242 Aug 21, 2011 timezlrg_7.dat

    -rw - r - r - 1 oracle dba 586750 Aug 21, 2011 timezlrg_6.dat

    -rw - r - r - 1 oracle dba 587487 Aug 21, 2011 timezlrg_5.dat

    -rw - r - r - 1 oracle dba 531137 Aug 21, 2011 timezlrg_4.dat

    -rw - r - r - 1 oracle dba 527717 Aug 21, 2011 timezlrg_3.dat

    -rw - r - r - 1 oracle dba 507957 Aug 21, 2011 timezlrg_2.dat

    -rw - r - r - 1 oracle dba 791430 Aug 21, 2011 timezlrg_14.dat

    -rw - r - r - 1 oracle dba 782475 Aug 21, 2011 timezlrg_13.dat

    -rw - r - r - 1 oracle dba 785621 Aug 21, 2011 timezlrg_12.dat

    -rw - r - r - 1 oracle dba 787272 Aug 21, 2011 timezlrg_11.dat

    -rw - r - r - 1 oracle dba 792894 Aug 21, 2011 timezlrg_10.dat

    -rw - r - r - 1 oracle dba 493675 Aug 21, 2011 timezlrg_1.dat

    drwxr-xr-x 2 oracle dba 30 Sep 8 05:03 big

    drwxr-xr-x 2 oracle dba 30 Sep 8 05:03 little

    Please suggest alternatives to troubleshoot

    Thank you

    Sol.beach thanks for the reply, I'm able to correct the problem. In fact the PATH variable has put in .profile of export PATH = $PATH: $ORACLE_HOME/bin and the value is lower.

    -bash-3, $ 2 echo $PATH

    /Apps/Oracle/product/9.2.0.8.2009Q4/bin:/usr/ccs/bin:/usr/sbin:/usr/bin:/bin:.:/ bin:/opt/bin:usr/CSS/bin:/usr/ucb:/usr/local/bin:/apps/Oracle/product/11.2.0.3.2014Q3/bin

    I changed as export PATH = $ORACLE_HOME/bin: $PATH and now it works fine. It seems to be a problem with the old Oracle Home, also present in the PATH variable before the bin to the current address of Oracle Home Directory.

    -bash-3, $ 2 echo $PATH

    /Apps/Oracle/product/11.2.0.3.2014Q3/bin:/apps/Oracle/product/9.2.0.8.2009Q4/bin:/usr/ccs/bin:/usr/sbin:/usr/bin:/bin:.:/ bin: / opt/bin: css/usr/bin: / usr/ucb: / usr/local/bin

    Concerning

  • 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

  • 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

  • Special characters could not load DB via SQL * MORE

    Hi, I have a pl as .accidentally sets sql script which will insert data in database. The question is there are some records are missing and these missing records contains a special character: Sansao and Strasse. The strange was if I run the script via F5 (Toad), all data can be inserted successfully but run through SQL * MORE (Toad), all records that contain special characters are not inserted.

    Anyone here know why it didn't load these special characters via SQL * MORE?

    Probably because you have given unicode (multi byte charsets) you read with a customer of standard single-byte character set.

    It's SILLY to loading data using SQL * more. It's the wrong tool used for loading the data. It does not support the bind variable. It doesn't support liaison in bulk. It does not support direct path inserts. It is not SQL * Loader.

  • 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

  • SQL * more wild returned data String - spaces (required) are abandoned in character data

    Does anyone know how to preserve the credibility of a string returned by using SQL * more variable substitution for use in a title column.

    I am under SQL * more script and the output of the securities. I need to find out the name of the company (in the text name of the legal entity). However, the substitution variable returns / outputs the data to the correct record, but corrupts the content of the returned string by spaces dropping (necessary)?

    In the script below, I tried several combinations to include using a technique of faking the output as a formula in Excel. It is very effective with the attack anywhere to Oracle/Microsoft problem at the output to Excel. For some varieties in solution, there are two methods to fill the Legal_Entity_Name which each produce the same corrupt result. I use method 2 because it's a little more friendly.

    The output is directed to a local directory C:... If you try to run this script... note the output in the script path is c:\Ora_scripts\Corrupt_Example.xls coil;

    In the database, EBS R12, the correct output should be: Industrias Selkirk of Mexico S de RL de CV . (IN THE SCRIPT, THE SAME SELECT STATEMENT IS USED AS THE MAIN QUERY - IT PRODUCES A CORRECT RESULT).

    However, data is corrupted to: IndustriasSelkirkdeMexico.

    Here's a testable script:

    --@C:\Ora_Scripts\Corrupt_String_Script.SQL

    trigger the echo

    went to CHECK

    moved the markup html off the coast of the coil

    Leave your COMMENTS

    Set trimspool on

    delete columns

    clear breaks

    clear the buffer

    Disable CALCULATED

    TOPIC on the value

    set PAGESIZE 50000

    Set LINESIZE 500

    NewPage 0 value

    set TERMOUT off

    -The variable definitions Section.

    Undefine g_Registration_Id

    Set g_Registration_Id = 12033;

    Cancel the Instance definition;

    Set the Instance = "XXXXXX";

    Undefine Time_Stamp;

    Define Time_Stamp = "DD-Mon-YYYY hh ';

    Undefine sv_Legal_Entity_Name

    Bnd_Legal_Entity_Name variable Char (75)

    Variable bnd_Registration_Id number

    --

    -Fill in the title and the title of the data items.

    -Company name get - method 1

    / * Start

    Select xrg. Alternate_Registered_Name in: bnd_Legal_Entity_Name

    of apps.xle_registrations xrg

    where xrg. Source_Table = "XLE_ENTITY_PROFILES."

    and xrg. Registration_Id = & g_Registration_Id;

    End;

    /

    -Transfer the value of the variable binding to the variable substitution

    Column sv_Var_1 sv_Legal_Entity_Name noprint new_value

    Select: bnd_Legal_Entity_Name double sv_Var_1;

    */

    --

    -Company name method retrieves 2

    Run: bnd_Registration_Id: = & g_Registration_Id;

    Column sv_Legal_Entity_Name sv_Legal_Entity_Name FORMAT A75 noprint new_value

    -Try in the form of Excel formula - no luck!

    -Select ' = ' ' | xRG. Alternate_Registered_Name | «"«as sv_Legal_Entity_Name»»»

    Select xrg. Alternate_Registered_Name as sv_Legal_Entity_Name

    of apps.xle_registrations xrg

    where xrg. Source_Table = "XLE_ENTITY_PROFILES."

    and xrg. Registration_Id =: bnd_Registration_Id;

    --

    Column Instance_Col by Instance NOPRINT new_value

    Select the name as Instance_COL in apps. Fnd_Apps_System;

    --

    Column Time_Stamp_Col new_value Time_Stamp NOPRINT

    Select to_char (sysdate, "Mon-DD-YYYY HH24:MI:SS) as Time_Stamp_Col

    From Dual;

    --

    the forage value off markup html on spool

    coil c:\Ora_scripts\Corrupt_Example.xls;

    TTITLE-

    Skip - 0

    'Arguments' left... »-

    Jump - 1

    Center & sv_Legal_Entity_Name-

    Jump - 1

    Right ' run: ' Time_Stamp-

    Center "it is a centered string constant;

    Jump - 2

    -Various declaration of Variables.

    the forage value off markup html on spool.

    HEAD ' < title > example string of corrupt < /title >.

    < style type = "text/css" >-

    table {background: white; do-size: 80% ;}} -

    Th {background: #ccc ;}} -

    TD {padding: 0px ;}} -

    < / style > '

    --                        Mainline query                                      --

    -REPLICATE THE SELECT USED TO DERIVE THE LEGAL_ENTITY_NAME TO THE TITLE

    Select xrg. Alternate_Registered_Name

    of apps.xle_registrations xrg

    where xrg. Source_Table = "XLE_ENTITY_PROFILES."

    and xrg. Registration_Id = & g_Registration_Id;

    -Liquidation of script.

    spool off;

    moved the html markup;

    Here is output (open in Excel):

    Arguments...
    IndustriasSelkirkdeMexico
    It is a centered string
    constant
    Run: 14 October 2014 10:10:45
    ALTERNATE_REGISTERED_NAME
    Industrias Selkirk of Mexico S of CV RL

    Hello

    Just use double quotes... First test: with x.sql container

    trigger the echo

    delete columns

    TOPIC on the value

    set PAGESIZE 50000

    Set LINESIZE 500

    NewPage 0 value

    set TERMOUT off

    -The variable definitions Section.

    Undefine sv_Legal_Entity_Name

    Column sv_Legal_Entity_Name sv_Legal_Entity_Name FORMAT A75 noprint new_value

    TTITLE-

    Skip - 0

    'Arguments' left... »-

    Jump - 1

    Centre '& sv_Legal_Entity_Name ' -.

    Skip 1

    SELECT 'test ttitle' FROM dual;

    running the script, providing a ttitle (slightly different from yours ;-), I have):

                                                                                                       Industrias Belgica ;-) Selkirk

    ' TESTINGTTITLE

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

    test ttitle

    Best regards

    Bruno Vroman.

  • 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

Maybe you are looking for