Misaligned output of SQLPlus

Hello
Yes, I know that this has to go in the forum of SQLPlus (tumbleweed), but someone there asked exactly the same question more than a month and he has yet to receive even an attempt to answer!

So simple question; Why the next exit is misaligned? Specifically, the 14 for SAMPLE_SIZE value is placed in the middle of his column and therefore LAST_ANALYZED (February 21, 13) is pushed into the SAMPLE_SIZE column:
  1  select column_name, data_type, avg_col_len, density, num_distinct NDV, histogram, num_buckets buckets, sample_
size, last_analyzed,data_type
  2  from dba_tab_cols
  3  where owner  = 'SCOTT'
  4  and table_name = 'EMP'
  5  and column_name = 'EMPNO'
  6* order by internal_column_id
SYS@ORCL> /

COLUMN_NAME               DATA_TYPE  AVG_COL_LEN     DENSITY          NDV HISTOGRAM       BUCKETS SAMPLE_SIZE LAST_
ANAL DATA_TYPE
------------------------- ---------- ----------- ----------- ------------ --------------- ------- ----------- -----
---- ----------
EMPNO                     NUMBER               4  .071428571           14 NONE                  1       14 21-FEB-1
3 NUMBER

SYS@ORCL>
BTW, the * above should read A N E L (without the spaces) like LAST_ANALYZED, but a rather enthusiastic filter seems to be at work.


Second question - I was wondering if I had entered a COLUMN... FORMAT command that had messed up things... but as far as I know, there is no way of recovering SQLPlus column formats list currently - or is it?

Edit - ignore the second question - I just discovered that you can simply type
COLUMN
for a list of all the updated column shaped instructions in use. I checked to see if SAMPLE_SIZE has any formatting applied to him and he does not.




Thank you very much
Jason

Published by: Jason_942375 on March 25, 2013 21:53

Published by: Jason_942375 on March 25, 2013 21:55

I mentioned in my other answer SET TAB OFF. You should see:

SQL> select lpad('Z',100,'Z') dummy , X from T;

DUMMY                                                                                                           X
---------------------------------------------------------------------------------------------------- --------------------
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ           14

SQL> set tab off
SQL> select lpad('Z',100,'Z') dummy , X from T;

DUMMY                                                                                                                   X
---------------------------------------------------------------------------------------------------- --------------------
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ                   14

Tags: Database

Similar Questions

  • Csv output SQLCL differs from output csv SQLPLUS

    Hello

    I try to replace my script sqlplus generating a csv file.

    with a new one generated by sqlcl because sqlcl seem to handle it "natively".

    However, I have several problems, it's not so easy... (it is not possible, in fact, as a replacement for sqlplus by sqlcl to generate a csv file)

    There are several differences with the release made with my script in sqlplus. Let me explain

    NB: Please note I'm french therefore:

    * default csv separator is; (but I could accept this separator is)

    * decimal separator is ",".

    Script from SQLplus

    trigger the echo

    Set feedback off

    fixed term off

    set point

    Go head

    the Embedded value on

    set pagesize 0

    break off Set

    NEWP NONE Set

    set SPACE 0

    TAB SET OFF

    recsep off Set

    left the underline

    COLUMN of resource_type FORMAT A10 COLUMN TYPEE

    ALTER session set nls_date_format = "dd/mm/yyyy";

    ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ",";

    set LINESIZE 30000

    Set trimspool on

    Coil test.csv

    SELECT "'sysdate';'" COL1 "; "" COL2 "; "" LENGTH "' double.

    SELECT

    '"' || SYSDATE | « « ; » »

    '"' || trunc (sysdate) | « « ; » »

    || To_char (sysdate, ' DD/MM/YYYY HH24:MI:SS'). « « ; » »

    || RM. LENGTH | '"'

    Of

    TABLE RM

    WHERE

    RM. CODE = "ABCD";

    spool off

    output

    SQLCL script

    trigger the echo

    Set feedback off

    fixed term off

    set point

    break off Set

    Set trimspool on

    Set sqlformat csv

    Coil test2.csv

    SELECT

    SYSDATE,

    trunc (sysdate),

    To_char (sysdate, ' DD/MM/YYYY HH24:MI:SS'),

    RM. LENGTH

    Of

    TABLE RM

    WHERE

    RM. COL = 'ABCD '.

    ;

    spool off

    output

    SQLplus output CSV (and the result is correct)

    "sysdate"; "' COL1 '; "" COL2 "; "" LENGTH ".

    "11/05/2015"; 11/05/2015; "11/05/2015-11:11:27 '; "6.07"

    SQLCL CSV output

    < blank line >

    "SYSDATE", "TRUNC (SYSDATE)", "TO_CHAR (SYSDATE," DD/MM/YYYY HH24:MI:SS) ',' LENGTH' "

    05/11/15 11:12:12, 000000000, 05/11/15 00:00:00000000000, ' 11/05/2015 11:12:12 ', 6,07

    --------

    You can see in the output of SQL CL

    * an empty line first (?)

    * the fields sysdate is followed, 0000000, which breaks the structure of the csv file. Don't know why this is displayed.

    * value sysdate is fine (date + hour) in sqlcl, trunc (sysdate) should not display the time (minor)

    * in sqlplus then I've not used instructions ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ",".

    digital data are 6.07 (whereas it should be 6.07, and default sqlplus output. (In sqlplus to 6.07, I need to put the NLS_NUMERIC statement above))

    * in sqlplus, only char data are placed in square brackets. In my case it would be necessary to have each data attached to make sure that imposing CSV is safe.

    If too many problems, I can't currently use sqlcl to generate a csv result...

    Don (don't know if this is the place to talk about SQL imporvement, , but it would be great if the sqlcl could be improved: )

    * the date of issue (000000) would be fixed (unless there is a solution?)

    * Digital output default must be with '.'. And after having the opportunity to change the decimal separator, as in SQLPLUS

    * We wouldn't abilty to choose whether the data should be included or not in the media (even for digital data / date)

    * We would be able to change the csv separator

    * no first blank line ould generated (minor)

    Thanks for any suggestions you could provide, because at the moment, I can't use sqlcl to the output in csv format, although it has very promising output features

    > We are working on support for that now.

    What I wanted, it was, it does not work in the latest version available, but work soon.

  • Output of sqlplus

    Hello

    I use Oracle 10 g, and I want to know how can I enlarge the output in SQLPLUS:

    for example if I execute select * employee to get all of the data, for now I get just a few lines

    Thanks in advance

    Ahh, then use:

    set long 
    

    Once again check the current value with show in a long time.

  • How do I increasing width output of sqlplus?

    I use sqlplus on windows;

    SQL > select * from employees where rownum < 2;

    EMPLOYEE_ID FIRST NAME LAST NAME

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

    E-MAIL PHONE_NUMBER HIRE_DATE JOB_ID SALARY

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

    COMMISSION_PCT MANAGER_ID DEPARTMENT_ID

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

    Donald Ollivier 198

    DOCONNEL 650.507.9833 21-GIU-07 SH_CLERK 2600

    50 of 124

    After a selection, I have this output

    It is possible the increase in width?

    SQL > set linesize 200

    Here are all the things that you can define in sql like:

    System of SETTING Variable summary

  • How wrap us the output with sqlplus tab delimiter?

    Is there a way I can be rolled out via sqlplus?

    Just for example, here is my query. I want this reel with the tab delimiter.

    c:/test coil
    Select * from emp;
    spool off

    Try this:

    coil output_file.txt
    Select Column1 | Chr (9) | Column2 | Chr (9) | ....|| Chr (9) | columnX
    from my_table;
    spool off

    HTH,
    Brian

  • output of sqlplus while in an if

    I'm running it with sqlplus udser/pass @[email protected]
    I want to leave sqlplus do nothing if my account is 0
    but outside the BEGIN/END things still work...


    example:

    Begin
    declare
    number of v_count by DEFAULT '0';
    Start
    Select count (*) in the rwp.bil_core_receipt v_count where f_processed_for_core = 'Y ';
    If v_count <>'0' then
    -Do stuff inside BEGIN/END
    on the other
    -HOW CAN I GET OUT HERE
    end if;
    end;
    end;
    -Do things outside BEGIN/END (only if the number is not 0)

    Well, you might raise an exception in your PL/SQL block in which case there is no treatment to do and
    builds a SQLERROR EXIT every time your SQL SCRIPT.

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14357/ch12052.htm#SQPUG134

    But still: you may want to reconsider this approach in the first place.

  • Output of sqlplus formatting

    Oracle 11.1.0.7:

    I followed SQL. But when I run it it gives me all the SQL statements and other things. How can I get just the result of select?
    sqlplus stream_mon/stream_mon << EOF!
     set head off
     set pagesize 0
     set feed off
     set echo off
     spool ${MON_FILE} append
    
     SELECT APPLY_NAME || '|NoOfErrors=' || COUNT(*) FROM DBA_APPLY_ERROR group by APPLY_NAME;
    
     select APPLY_NAME || '|Latency=' ||
         (apply_time-applied_message_create_time)*86400
      from dba_apply_progress;
    
     select QUEUE_NAME || '|SrcSpillMsgs=' || spill_msgs || chr(10) || 'SrcInMemoryMsgs=' ||  (NUM_MSGS - SPILL_MSGS)
    from V\$BUFFERED_QUEUES;
    
    SELECT APPLY_NAME || '|DestSpilledTransactions=' || MESSAGE_COUNT
      FROM DBA_APPLY_SPILL_TXN;
    
    select APPLY_NAME || '|DestTotalMessagesSpilled=' || TOTAL_MESSAGES_SPILLED from V\$STREAMS_APPLY_READER;
    
    select case when status = 'ENABLED' then CAPTURE_NAME || '|CaptureProcess=1'
               else CAPTURE_NAME || '|CaptureProcess=0'
               end
          from dba_capture;
    
    select case when status = 'ENABLED' then PROPAGATION_NAME || '|PropProcess=1'
               else PROPAGATION_NAME || '|PropProcess=0'
               end
          from dba_propagation;
    
    select case when status = 'ENABLED' then APPLY_NAME || '|AppProcess=1'
               else APPLY_NAME || '|AppProcess=0'
               end
          from dba_apply;
    
     select CAPTURE_NAME || '|CaptureErrMsg=' || replace(error_message, ' ', '_') from dba_capture;
     select PROPAGATION_NAME || '|PropErrMsg='    || replace(error_message, ' ', '_') from dba_propagation;
     select APPLY_NAME || '|ApplyErrorMsg=' || replace(error_message, ' ', '_') from dba_apply;
    
     spool off
    
    EOF!
    Out something like this
    SQL>  select QUEUE_NAME || '|SrcSpillMsgs=' || spill_msgs || chr(10) || 'SrcInMemoryMsgs=' ||  (NUM_MSGS - SPILL_MSGS)
      2  from V$BUFFERED_QUEUES;
    CAP_QUEUE|SrcSpillMsgs=0 

    sqlplus stream_mon/stream_mon<>

    not above but below
    sqlplus-s stream_mon/stream_mon<>

  • get the output in sqlplus

    When I m trying to get the result in a procedure dbms_output.put_line, I m getting the followin error

    I've included set serveroutput on so

    ERROR:
    ORA-06550: line 1, column 29:
    PLS-00553: the character set name is not recognized
    ORA-06550: line 0, column 0:
    PL/SQL: Analysis of completed Compilation unit

    PL/SQL procedure successfully completed.

    I m not getting results in the sqlplus

    Please help me

    Thank you very much

    What you have here is not a procedure but an anonymous (= named and stored) pl/sql block.
    No problem with that, just to correct to name the things you use.
    But what do you in here is selecting and select loop on the other. This can be solved with a lot more elegance in a single select statement. And you would have the additional advantage that you don't have to worry about how to do to get the result on the screen, since sql * plus (or any other client tool) made this automatically for you.

    The two sliders can be attached. Or can be used via a (select in the clause of a select another from) line of sight. The if condition can be expressed by a case or decode.

  • print one line of output to two lines - Possible or not?

    Hi all

    Could you please tell me is below possible approach or not?

    Requirement: -.

    I want to display the result in two rows, with the data in a row.

    Example:

    Select l_output1, double l_output2;

    Then my output should appear as:

    l_output1

    l_output2

    (Not as l_output1 l_output2)

    I tried like below, but it does not.

    Select l_output1. Chr (10) | the double l_output2

    but it is still printing on the same line. (Chr (10) for the new power line)

    Thanks in advance.

    Kind regards

    UVA

    Simply replace the spaces with a jump of line as:

    SQL > select REPLACE ('abc def GHI ',' ', 10 double;)

    REPLACE('AB)

    -----------

    ABC

    def

    IGS

    The above output is sqlplus in Unix, other tools may appear differently, but line breaks will be there.

    John

  • How to convert char Spanish AL32UTF8 to ISO-8859-1 with sqlplus in linux?

    I have the server 11g with NLS_CHARACTERSET with AL32UTF8.  I need to have a varchar2 column, which contains the Spanish character, converted to ISO-8859-1 the output of sqlplus.

    So, I put in the bash shell script

    'export NLS_LANG = AMERICAN_AMERICA. UTF8'

    or

    'export NLS_LANG = AMERICAN_AMERICA. AL32UTF8'

    And then, I don't

    iconv-f UTF-8--t TRANSLIT ISO_8859-1 / / infile.txt > outfile.txt

    Two NLS_LANG settings have the problem.

    For the two parameters of lang, if I

    file - bi infile.txt

    It gives text/plain; CharacterSet = utf-8

    However

    iconv translated

    Who Gomez in Gomez who.

    Why the e and o and others not translated correctly?

    How I translated the Spanish character correctly from the output of sqlplus?

    Thank you.

    The problem is that your data is stored in the form of decomposed Unicode, which is legal but rarely used for Western European languages.  'e' is stored as 'e' (0 x 65 = U + 0065) more combining acute accent (0xcc, 0 x 81 = U + 0301).  Most of simple conversion, including the conversion of standard Oracle client/server tools, do not take into account this and does not convert the characters broke into a character previously composed of ISO 8859-1. They are trying to convert each of the two codes regardless, 'e' performance as well as a replacement for the character of emphasis, that does not exist in ISO 8859-1. You see the result correctly in SQL Developer, because there is no conversion involved and the rendering of SQL Developer code is able to combine the two codes into a single character, as expected.

    As the 'e' and 'o' made up forms in Unicode and ISO 8859-1, the work around is to add the COMPOSITION function in your query. Thus, set NLS_LANG as I've mentioned previously and add new MESSAGE around the expressions of columns to your query.

    SELECT COMPOUND (title) OF...

    Thank you

    Sergiusz

  • Upgrade to Oracle 11.2.0.4.6

    Hello

    I am fairly new to the upgrade and patching of Oracle database and Oracle Grid.

    I managed to update my database test and grid (stand alone / oracle restart) since version 11.2.0.3.0 to 11.2.0.4.0 successfully.

    But now I want to upgrade / Patch even as a result of moving the 11.2.0.4.6 version number (as I see that there is such a version) so I installed the latest version, but this is where the confusion comes in.

    I can't seem to find the appropriate fix than the progress of the version to 11.2.0.4.6. I tried to install CPU (April 2015) Patch # 20299013, but it installs only the security updates, what of the rest of the stability of bugs 11.2.0.4.6 etc?

    The hope that someone could explain to me the mechanics autour patches, patch sets and also the critical patch updates?

    How can I know who is the 'main' patch to install for the advancement of the version?

    Concerning

    Stephan

    Hello

    the power supply for the network infrastructure includes the patch of the database. If you used automatic opatch to apply the hotfix, then home grid and home of the database have already been fixed. You need not apply the Patch 20299013 separately.

    The number 5 you see as output of sqlplus or instance $ v is increased by applying a power supply to an oracle home. To check your power supply applied, use the controls of abhinivesh.jain.

    Concerning

    Thomas

  • NEST-00600: internal error - [28] [1013] [0] [0] - when changing the DBID

    Hi all;


    I'm changing the dbid of the database, but not able to change it.


    SQL > select dbid from v database $;

    DBID

    1356943142

    SQL > shutdown immediate;

    The database is closed.

    The database is dismounted.

    ORACLE instance stops.


    SQL > bootable media.

    ORACLE instance started.

    Total System Global Area 608174080 bytes

    Bytes of size 1268920 fixed

    188744520 variable size bytes

    415236096 of database buffers bytes

    Redo buffers 2924544 bytes

    Mounted database.


    SQL >!

    [oracle@oel5 ~] $ which nest

    /U01/app/Oracle/product/10.2.0/Db_1/bin/NID


    [oracle@oel5 ~] nest target $ = /.


    DBNEWID: Release 10.2.0.4.0 - Production on Thu Oct 24 07:41:35 2013

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

    Connected to the database CLONE (DBID = 1356943142)

    Connected to the server version 10.2.0

    Control of database files:

    / u01/app/oracle/oradata/clone/control01. CTL

    / u01/app/oracle/oradata/clone/control02. CTL

    / u01/app/oracle/oradata/clone/control03. CTL

    Change the ID of database CLONE database? (Y / [N]) = > Y

    Proceed with the operation

    Change the ID of 1356943142 to 1028450799 database

    Control file /u01/app/oracle/oradata/clone/control01.ctl - modified

    Control file /u01/app/oracle/oradata/clone/control02.ctl - modified

    Control file /u01/app/oracle/oradata/clone/control03.ctl - modified

    DataFile /u01/app/oracle/oradata/clone/system01.dbf - dbid changed

    DataFile /u01/app/oracle/oradata/clone/undotbs01.dbf - dbid changed

    DataFile /u01/app/oracle/oradata/clone/sysaux01.dbf - dbid changed

    DataFile /u01/app/oracle/oradata/clone/users01.dbf - dbid changed

    DataFile /u01/app/oracle/oradata/clone/example01.dbf - dbid changed

    DataFile /u01/app/oracle/oradata/clone/temp01.dbf - dbid changed

    Control file /u01/app/oracle/oradata/clone/control01.ctl - dbid changed

    Control file /u01/app/oracle/oradata/clone/control02.ctl - dbid changed

    Control file /u01/app/oracle/oradata/clone/control03.ctl - dbid changed

    at least I'm waiting for 20 minutes... then I hit ctrl + c

    NEST-00600: internal error - [28] [1013] [0] [0]

    Change the database ID failed during validation - database is intact.

    DBNEWID - complete with validation errors.

    Once you issue the STARTUP SQLPlus MOUNT, OUTPUT of SQLPlus instead open a shell comand using the «!» (the host command) option, then run the command of nest. Your current SQLPlus session probably prevents closing of the database completed.

    Kind regards

    Bob

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

    Hi all

    I need your help.

    I have installed Oracle Audit Vault Server Release 10.2.3.2 in agent collection and Linux system in Windows system. Adding and start collecting DBAUD went fine however adding AGAIN collector back return errors when executing command avorcldb add_collector as follows

    [oracle@avsrv ~] $

    [oracle@avsrv ~] $ avorcldb add_collector - SrcName orcl nom_agent - avagent01 - colltype REDO - av Lugaopc:1521:orcl

    collector REDO_Collector for orcl source already exists

    the initialization of the REDO Collector

    ERROR: could not get by using jdbc connection AV source user:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))

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

    [oracle@avsrv ~] $

    Here are the contents of the avorcldb.log file

    09/09/13 16:58:44 [INFO] command add_collector treatment

    09/09/13 16:58:44 [INFO] treatment arg - FromName = orcl

    09/09/13 16:58:44 [INFO] treatment arg - nom_agent = avagent01

    09/09/13 16:58:44 [INFO] treatment arg - colltype = REDO

    09/09/13 16:58:44 [INFO] treatment arg - av = Lugaopc:1521:orcl

    09/09/13 16:58:44 [INFO] connect information: Lugaopc:1521:orcl

    09/09/13 16:58:45 [INFO] connecting administration AV got using jdbc:oracle:oci:@AVDB

    09/09/13 16:58:45 [INFO] execution SQL like [ADM@AV] select s.host |': ' | A1.num_value |': ' | avsys.av A2.char_value $attrvalue a1, a2 avsys.av$ attrvalue, avsys.av$ s source, avsys.av$ attrdef ad1, ad2 avsys.av$ attrdef where source_name =: 1 and a1.inst_id = s.source_id and a2.inst_id = s.source_id and a1.attr_id = ad1.attr_id and ad1.attr_name = 'PORT' and a2.attr_id = ad2.attr_id and ad2.attr_name = 'DB_SERVICE. '

    09/09/13 16:58:45 [INFO] using bind value orcl

    09/09/13 16:58:45 [INFO] Return value = Lugaopc:1521:orcl

    09/09/13 16:58:45 [INFO] connect information: Lugaopc:1521:orcl

    09/09/13 16:58:45 [INFO] execution SQL like [ADM@AV] select to_char (source_id) in the avsys.av$ source where source_name =: 1

    09/09/13 16:58:45 [INFO] using bind value orcl

    09/09/13 16:58:45 [INFO] return value = 1

    09/09/13 16:58:46 [INFO] got the source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))

    09/09/13 16:58:46 [INFO] executing SQL in [ADM@AV] select decode (c.status, 1, 'active', 0, 'fallen', null) of avsys.av$ collector c, avsys.av$ s source where source_name =: 1 and collector_name =: 2 and c.source_id = s.source_id

    09/09/13 16:58:46 [INFO] using bind value orcl

    09/09/13 16:58:46 [INFO] bind Using REDO_Collector value

    09/09/13 16:58:46 [INFO] Return value = active

    09/09/13 16:58:46 [MESG] collector REDO_Collector for orcl source already exists

    09/09/13 16:58:46 [INFO] executing SQL in [ADM@AV] select decode (c.status, 1, 'active', 0, 'fallen', null) of avsys.av$ collector c, avsys.av$ s source where source_name =: 1 and collector_name =: 2 and c.source_id = s.source_id

    09/09/13 16:58:46 [INFO] using bind value orcl

    09/09/13 16:58:46 [INFO] bind Using REDO_Collector value

    09/09/13 16:58:46 [INFO] Return value = active

    09/09/13 16:58:46 [MESG] initialization REDO Collector

    09/09/13 16:58:46 [INFO] execution SQL like [ADM@AV] select the username of avsys.av$ source where source_name =: 1

    09/09/13 16:58:46 [INFO] using bind value orcl

    09/09/13 16:58:46 [INFO] Return value = AVSRCUSR1

    09/09/13 16:58:46 [INFO] as [ADM@AV] SQL execution {? = call avsys.dbms_audit_vault.reset_source_user (?)}

    09/09/13 16:58:46 [INFO] adding user password mask

    09/09/13 16:58:46 [INFO] execution SQL like [USR@SRC] select table_name from user_tables where upper (table_name) = upper(:1)

    09/09/13 16:58:46 [INFO] bind Using STREAMS_HEARTBEAT value

    09/09/13 16:58:46 [INFO] Return value = STREAMS_HEARTBEAT

    09/09/13 16:58:46 [INFO] execution as [USR@SRC] SQL drop table streams_heartbeat

    09/09/13 16:58:46 [INFO] execution as [USR@SRC] SQL create table streams_heartbeat (src_dbname varchar2 (4000), job_number number, heartbeat_time timestamp)

    09/09/13 16:58:46 [INFO] execution SQL like [USR@SRC] declare dbs_name varchar2 (4000); start selecting rename in dbs_name from global_name; insert into streams_heartbeat values (dbs_name, 0, SYSTIMESTAMP); end;

    09/09/13 16:58:46 [INFO] SQL execution as [USR@SRC] create or replace procedure update_heartbeat IS start update streams_heartbeat set heartbeat_time = (select systimestamp from double); commit; end;

    09/09/13 16:58:46 [INFO] execution SQL like [USR@SRC] select table_name from user_tables where upper (table_name) = upper(:1)

    09/09/13 16:58:46 [INFO] bind Using CAPTURE_RULES value

    09/09/13 16:58:46 [INFO] Return value = CAPTURE_RULES

    09/09/13 16:58:46 [INFO] execution as [USR@SRC] SQL drop table capture_rules

    09/09/13 16:58:46 [INFO] execution as [USR@SRC] SQL create table capture_rules (nom_regle varchar2 (50), rule_scope varchar2 (6), rule_type VARCHAR2 (3), obj_name varchar2 (100))

    09/09/13 16:58:46 [INFO] execution SQL like [ADM@AV] select Rename global_name

    09/09/13 16:58:46 [INFO] Return value is AVDB. AVSRV

    09/09/13 16:58:46 [INFO] execution SQL like [USR@SRC] select db_link in user_db_links where db_link =: 1

    09/09/13 16:58:46 [INFO] Using AVDB bind value. AVSRV

    09/09/13 16:58:46 [INFO] Return value is AVDB. AVSRV

    09/09/13 16:58:46 [INFO] the Execute SQL as database link [USR@SRC] drop "AVDB. AVSRV ".

    09/09/13 16:58:46 [INFO] execution SQL like [USR@SRC] select the version of v$ instance

    09/09/13 16:58:46 [INFO] Return value = 11.2.0.1.0

    09/09/13 16:58:46 [INFO] creating DB link using AVDB. AVSRV, AVSRCUSR1, {avsrcusr_pwd}, Lugaopc, 1521, orcl

    09/09/13 16:58:46 [INFO] login as srcuser_ora01 to @(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=Lugaopc) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = orcl)))

    09/09/13 16:58:46 [INFO] output of SQLPlus

    09/09/13 16:58:46 [INFO]

    09/09/13 16:58:46 [INFO] Package created.

    09/09/13 16:58:46 [INFO]

    09/09/13 16:58:46 [INFO] no error.

    09/09/13 16:58:47 [INFO]

    09/09/13 16:58:47 [INFO] package body created.

    09/09/13 16:58:47 [INFO]

    09/09/13 16:58:47 [INFO] no error.

    09/09/13 16:58:47 [INFO]

    09/09/13 16:58:47 [INFO] Package created.

    09/09/13 16:58:47 [INFO]

    09/09/13 16:58:47 [INFO] no error.

    09/09/13 16:58:47 [INFO]

    09/09/13 16:58:47 [INFO] package body created.

    09/09/13 16:58:47 [INFO]

    09/09/13 16:58:47 [INFO] no error.

    09/09/13 16:58:47 [INFO] execution SQL like [USR@SRC] select distinct name of user_errors, whose name =: 1

    09/09/13 16:58:47 [INFO] bind Using DBMS_SRC_STREAMS_COLLECTOR value

    09/09/13 16:58:47 [INFO] Return value = null

    09/09/13 16:58:47 [ERROR] could not get by using jdbc connection AV source user:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))

    09/09/13 16:58:47 [ERROR] ORA-01017: name of user and password invalid. connection refused

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

    at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:765)

    at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:414)

    to oracle.jdbc.driver.PhysicalConnection. < init > (PhysicalConnection.java:546)

    to oracle.jdbc.driver.T2CConnection. < init > (T2CConnection.java:162)

    at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)

    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)

    at java.sql.DriverManager.getConnection(DriverManager.java:525)

    at java.sql.DriverManager.getConnection(DriverManager.java:140)

    to oracle.av.avca.jdbc.JdbcConnection. < init > (JdbcConnection.java:87)

    at oracle.av.orcldb.DAO.initConnection(DAO.java:79)

    to oracle.av.orcldb.DAO. < init > (DAO.java:64)

    at oracle.av.orcldb.commands.AddCollector.setupCollector(AddCollector.java:746)

    at oracle.av.orcldb.commands.AddCollector.execute(AddCollector.java:230)

    at oracle.av.orcldb.Command.process(Command.java:89)

    at oracle.av.orcldb.Main.process(Main.java:118)

    at oracle.av.orcldb.Main.main(Main.java:132)

    I searched the forum at my best level without clear solution

    Concerning

    Sadik

    avorcldb add_collector - REDO SrcName orcl nom_agent - avagent01 - colltype - av Lugaopc:1521:orcl

    Specify the connection string to the Vault check server not in the source database



  • Doubt RMAN backup

    I took a full backup of our TEST database using command in a different way because of problems of space below.

    Backup database archivelog format ' / u01/ora_rman_bkups/%d_%u_%s';

    When I go to RMAN and LIST BACKUP can't backup set above. When I go to OS I see two files created in this directory

    [oracle@enash ora_rman_bkups] $ ls-l
    Total 1428312
    -rw - r - 1 oracle oinstall 1460956160 Apr 2 13:36 AMAZTST_0oo62q17_24 * (I think it is the backup to the base) it is a correct element of different backup? *
    -rw - r - 1 oracle oinstall 189952 Apr 2 13:37 AMAZTST_0ro62qlf_27 * (I think they are archiving logs) - it is different element of proper backup? *


    I want to clone my AMAZPRD with above backup AMAZTST...

    Please suggest me if I can use the above backup items for duplication of data.

    Please look in my post...

    Yes, you can...

    1. produce a pfile to the new database
    assume that the source database uses a spfile. If this is not the case, simply make a copy the file pfile existing.

    Connect to the database as sysdba source and run the following:

    create pfile = "init.ora' of spfile;"

    This will create a new pfile directory of $ORACLE_HOME/dbs.

    The new pfile will have to be changed immediately. If the cloned database must have a different name from the source, this should be changed, as well as paths. Look at the contents of the file and make changes if necessary.

    Suppose that the cloned database will reside on the same machine that the source, Oracle must be told how to convert file names during the operation of double RMAN. This is achieved by adding the following lines in the newly created pfile file:

    db_file_name_convert = (,)
    log_file_name_convert = (,)

    2. create the bdump, udump and cdump directories
    Create directories as specified in the file pfile bdump, udump and cdump from the previous step.

    3. Add a new entry to oratab and source of the environment
    Edit the/etc/oratab (or/opt/oracle/oratab) and add an entry for the new database.

    Source the new environment with "." oraenv' and check that it worked by running the following command:

    echo $ORACLE_SID

    If it doesn't come out of the new sid database go back and examine why not.

    4. create a password file
    Use the following command to create a password file (add a password right at the end):

    orapwd file = $(ORACLE_HOME) / dbs/orapw$ {ORACLE_SID} password =

    5 duplicate the database
    From sqlplus, start the instance in nomount mode:

    startup nomount

    Output of sqlplus, start RMAN and then duplicate the database. As in step 1, it is assumed that no recovery catalog is available. If it is available, simply change the RMAN command to include it.

    RMAN target sys @ nocatalog auxiliary.

    duplicate target database to ;

    This will restore the database and apply some archiving logs. It may appear to hang at the end sometimes. Just give him the time - I think that it's because RMAN makes a stop 'normal '.

    If you see the following error message, it's probably due to the settings of file_name_convert, err. Return to step 2 and check the settings.

    RMAN-05001: auxiliary filename '%s' is in conflict with a file used by the target database

    Once the copy is complete, RMAN will display a message similar to the following:

    open database
    Finished the duplicate Db to 26 February 05

    RMAN >

    RMAN output.

    6. create a spfile
    From sqlplus:

    Create spfile from pfile;

    immediate stop
    startup

    Now that the clone is built, we need more file_name_convert settings:

    change the system reset db_file_name_convert scope = spfile sid ='* '
    /

    change the system reset log_file_name_convert scope = spfile sid ='* '
    /

    7. possibly take the clone off journal mode database archive
    RMAN will leave the database cloned in log mode archive. If the log mode archive is not necessary, run the following sqlplus commands:

    immediate stop
    Startup mount
    ALTER database noarchivelog;
    ALTER database open;

    8 Configuring the TNS
    Add entries for the new database in the listener.ora and tnsnames.ora as needed.

  • Procedure / dbms_output.put_line

    Hello


    In a procedure, I have a few dbms_output.put_line at each stage. Now the console output of sqlplus we show directly in the user interface. But the problem is all the messages are projected at the end of the procedure. This means that if we treat for 30 days and each day is to take a minute, we all messages after 30 minutes.

    Can in any case we can show the message as it passes?

    Mr. Leroy wrote:
    Ok.. He got now.
    What happens if I create a stand-alone transaction, the message and show inside? Or again, it will show at the end of the main procedure?

    If you ask this question you still don't understand. You are confused client, server and transactions. SQL * more (client) application server database to run the stored procedure. Regardless of the number of transactions stored procedure runs - SQL * Plus will have fine control of the stored procedure.

    SY.

Maybe you are looking for

  • iCloud duplicates

    Hello This is a fundamental question, but humor to please me. I currently have iCloud library enabled on my iPhoneSE and it syncs well... Well, iCloud. My iPhone itself fills up quite quickly, however, and I would like to erase the space by removing

  • NB100 - no sound on Windows XP

    The sound does not work for this of NB100. Silence is boring, please help me. I tried:-Set the volume in "Realtek HD Audio Manager".-Disabling start-up mute I want to try:-New drivers, but I don't know where to find them.N ' anything

  • move el capitan photo library app on external hard drive

    Question: How to move to El Capitan new library of the 'Photo' app on an external drive? The picture of El Capitan App behaves like a virus - it takes my computer whenever I plug a phone, etc. There seems to be no preference to choose which applicati

  • Second computer connection

    Hello; You just bought a new HP Photosmart 5520.  I use a Toshiba computer, 32 bit, running Windows 7.  I followed the (sometimes confusing) installation instructions, printer is connected to my computer and wireless network. Great!  When I tried to

  • System runs slowly, and my CPU usage is very high.

    High CPU usage My cpu is in every sense. from 12 to 100 and slow