CVX exec table - nostringval - in distilling

I'm not sure what the question would be, but here's what I'm trying to do. I have very large paintings of integers I need to include in a PostScript program. To reduce the size of the files, I'm doing more compact tables. I'm not sure of the best approach, but what I thought to do was to take the code for the table, let's say like [16545 8612 641 25142...] and run through the FlateEncode and ASCII85Encode filters. So I just coded only table then put in my program "currentfile /ASCII85Decode filter /FlateDecode filter cvx exec" followed by the code table. When I run it through Distiller I get "error: ioerror:-nostringval-- However, if I encode the next "1024 table dup [16545 8612 641 25142... 0. ...] putinterval' and which encodes with filters and put it in my program it through distiller without error. So my question is why is that if I just take a picture and read to and cvx exec make I get an error, - nostringval - but if I include the code to build a table I do not get the error?

My instinct would be an encoding problem, maybe a boundary condition. Try to replace the CLC exec with a call to a procedure to empty the file on standard output and look at what you get (if any).

Tags: Adobe PostScript

Similar Questions

  • .PS to GIF conversion - truncates the image

    Hi all

    I have an image file in .ps format. When I try to convert it to GIF or JPEG or PDF, I could see that the image is truncated on the right. But when I change the .ps file to be in landscape mode image conversion is correct.

    But I want the image to be converted to Portrait without truncation of the image mode.

    Can any help me to solve this problem in the .ps file.

    Can do something chnaging the .ps file so that I can get a complete picture

    Seen the content of postsript below:

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

    % ! PS
    %% Version: 3.15
    %% Presents: (atend)
    %% Pages: (atend)
    %% EndComments
    Ident % ' @(#)lp:filter/postscript/postscript/dpost.ps 1.1 ".
    %
    Prologue to version 3.16% for troff files.
    %

    /#copies store 1
    1 def /aspectRatio
    1 def /formsperpage
    / landscapes false def
    Def lineWidth.3
    1 def /magnification
    /Margin 0 def
    /orientation 0 def
    def /Resolution 720
    /xoffset 0 def
    /YOFFSET 0 def

    /roundpage true def
    /useclippath true def
    /pagebbox [0 0 612 792] def

    /R/Times-Roman def
    /I/Times-Italic def
    Def/Times-Bold/b
    Def/Times-BoldItalic /bi
    Def /Helvetica/h
    /Hi/Helvetica-Oblique def
    Manual/Helvetica-Bold def
    /HX/Helvetica-BoldOblique def
    /Convoyeur def /CW
    / Co /convoyeur def
    In/Courier-Oblique def
    /BG/Courier-Bold def
    /CX/Courier-BoldOblique def
    /PA/Palatino-Roman def
    /ER/Palatino Italic def
    /PB/Palatino Bold def
    /PX/Palatino-BoldItalic def
    Def/Helvetica-Narrow/h
    /Hi /Helvetica - Narrow - Oblique def
    Manual/Helvetica-Narrow-Bold def
    /HX/Helvetica-Narrow-BoldOblique def
    / Bookman-Light def /KR
    /Ki/Bookman-LightItalic def
    / Bookman-half def /Ko
    /KX/Bookman-def DemiItalic
    /AR/AvantGarde-Book def
    /AI/AvantGarde-BookOblique def
    Def/AvantGarde-half/AB
    /AX/AvantGarde-DemiOblique def
    /Nr/NewCenturySchlbk-Roman def
    Which/NewCenturySchlbk-Italic def
    /NB/NewCenturySchlbk-Bold def
    /NX/NewCenturySchlbk-BoldItalic def
    Def/ZapfDingbats/ZD
    Def/ZapfChancery-MediumItalic/Zi
    /VR Varitimes #Roman def
    / VI Varitimes #Italic def
    /VB /Varitimes def #Bold
    /VX Varitimes #BoldItalic def
    Def/s/s
    / Def /S1 S1
    Def/Symbol/gr

    /inch {72 mul} bind def
    / min {copy 2 gt {exch} if pop} bind def

    / Setup {}
    counttomark 2 idiv {def} repeat pop

    landscape {/ orientation orientation 90 add def} if
    / 72 resolution div def scaling
    LineWidth setlinewidth
    1 setlinecap

    pagedimensions
    definition of Massilia overview
    Rotate orientation neg
    definition of width 2 neg 2 div height div
    definition of x_offset inches decalage_y
    2 div DUP. neg. margin definition
    scale of magnification dup aspectratio mul
    scale scale scale

    / Symbol/s Sdefs FC
    / CF S1defs S1 times-Roman
    0 0 moveto
    } def

    {/pagedimensions}
    useclippath /gotpagebbox userdict doesn't know not and {}
    /pagebbox [pathbbox newpath clippath] def
    roundpage currentdict known /roundpagebbox and {roundpagebbox} if
    } If
    pagebbox pop aload
    4. 1 roll 4 1 roll 4 exch copy
    landscape {4 2 roll} if
    void /width exch def
    void /height exch def
    Add 2 div /xcenter exch def
    Add 2 div /ycenter exch def
    UserDict real /gotpagebbox put
    } def

    {/PageSetup}
    / page exch def
    currentdict /pagedict known currentdict known page and {}
    Page load pagedict exch get cvx exec
    } If
    } def

    [/decodingdefs
    {repeat it counttomark idiv 2 {y moveto show}}
    {repeat it neg/y exch def counttomark 2 idiv {y moveto show}}
    {repeat it neg moveto {index 2 sub stringwidth pop exch 0 32 4 div - 1 roll widthshow}}
    {repeat it neg moveto {void 0.0 spacewidth 32 4 - 1 roll widthshow}}
    {repeat it counttomark idiv 2 {y moveto show}}
    {setfunnytext neg}
    ] def

    /setdecoding {/ t decodingdefs 3-1 roll get bind def} bind def

    bind/w def {neg moveto show}
    /m {neg dup/y exch def moveto} bind def
    / fact {/ lastpage where {pop lastpage} if} def

    /f {}
    DUP / make exch findfont exch def
    DUP /ptsize exch def scaling of div dup/Size exch scalefont setfont def
    width of stripe ptsize mul scaling 10 setlinewidth div mul
    /spacewidth () stringwidth pop def
    } bind def

    {/changefont}
    /FontHeight exch def
    /fontslant exch def
    [CurrentFont
    1 0
    FontHeight ptsize div fontslant sin fontslant cos div mul
    FontHeight ptsize div
    0 0
    ] makefont setfont
    } bind def

    /SF {f} bind def

    {/ cf}
    DUP length 2 idiv
    /Entries exch def
    /chtab exch def
    /NewFont exch def

    findfont length 1 Add dict dup
    /newdict exch def
    ForAll {1 index /FID {newdict 3 1 roll could not} {pop pop} ifelse}

    newdict entries /Metrics dict set
    newdict /Metrics get
    Start
    chtab pop aload
    1 entries 1 {pop def}
    newdict pop definefont NewFont
    end
    } bind def

    %
    % Some tables used to adjust the points of reference and widths in some of the characters
    % of the printer resident fonts. Try changing if the square roots are too high
    % the lines describing the /radical and /radicalex,
    %
    % /radical [0-75 550 0]
    % /radicalex [-50-75 500 0]
    %

    / [Sdefs
    /bracketlefttp [220 500]
    /bracketleftbt [220 500]
    /bracketrighttp [-70 380]
    /bracketrightbt [-70 380]
    /braceleftbt [220 490]
    /bracketrightex [220-125 500 0]
    / radical [0 0 550 0]
    Newsprint %------(br is too low to compensate for
    statusdict /product get {eq (NeWS server)
    /radicalex [-50 100 500 0]
    /parenleftex [-20 100 0 0]

    } {
    /radicalex [0-50 500 0]
    /parenleftex [-20-170 0 0]
    } ifelse
    / integral [100-50 500 0]
    /Infinity [-10 75 730 0]
    ] def

    / [S1defs
    / underline [0 0 80 500]
    /endash [7 90 650 0]
    ] def
    %% EndProlog
    %% BeginSetup
    brand
    %% FormsPerPage: 2
    /formsperpage 2 def
    Setup
    2 setdecoding
    % EndSetup
    %% Page: 1 of 1
    Save
    brand
    1 pagesetup
    14 I have f
    (Sp) 1220 882 w
    11 S f
    (-) 1378 924 w
    14 I have f
    (A) 1439 882 w
    14 S f
    (\354)1547 799 w)
    (\356)1547 939 w)
    14 I have f
    W (UtranCell) 1616 882
    14 S f
    (\374)2208 799 w)
    (\376)2208 939 w)
    (=) 2277 882 w
    14 R f
    (100) 882 2354 w
    14 S f
    (\351)2587 799 w)
    (\353)2587 939 w)
    14 R f
    (%) 2657 882 w
    14 S f
    (\371)2796 799 w)
    (\373)2796 939 w)
    (\264)2849 882 w)
    14 I have f
    w 1387 1467 (pmTotNoRrcConnectReqCs)
    14 S f
    (\354)2967 1384 w)
    (\356)2967 1524 w)
    14 I have f
    W 3036 1467 (UtranCell)
    14 S f
    (\374)3628 1384 w)
    (\376)3628 1524 w)
    14 I have f
    w (pmTotNoRrcConnectReqCsSucc) 1255 1146
    14 S f
    (\354)3099 1063 w)
    (\356)3099 1203 w)
    14 I have f
    W (UtranCell) 3168 1146
    14 S f
    (\374)3760 1063 w)
    (\376)3760 1203 w)
    14 f S1
    t 1 2616 1 1234 1257 (_ _)
    14 S f
    (\264)3864 1299 w)
    14 I have f
    w 1255 2052 (pmNoNormalNasSignReleaseCs)
    14 S f
    (w \354)3094 1969
    (\356)3094 2109 w)
    14 I have f
    W 3163 2052 (UtranCell)
    14 S f
    (w \374)3755 1969
    (\376)3755 2109 w)
    (+) 3824 2052 w
    14 I have f
    w 3901 2052 (pmNoSystemNasSignReleaseCs)
    14 S f
    (w \354)5700 1969
    (\356)5700 2109 w)
    14 I have f
    W 5769 2052 (UtranCell)
    14 S f
    (w \374)6361 1969
    (\376)6361 2109 w)
    14 I have f
    w (pmNoNormalNasSignReleaseCs) 2558 1731
    14 S f
    (\354)4397 1648 w)
    (\356)4397 1788 w)
    14 I have f
    W (UtranCell) 4466 1731
    14 S f
    (\374)5058 1648 w)
    (\376)5058 1788 w)
    14 f S1
    (_ __________________________________________________________________________)1 5217 1 1234 1842 t
    14 S f
    (\264)6465 1884 w)
    14 I have f
    w (pmNoRabEstablishAttemptSpeech) 1255 2637
    14 S f
    (2554 \354)3191 w)
    (2694 \356)3191 w)
    14 I have f
    W (UtranCell) 3260 2637
    14 S f
    (2554 \374)3852 w)
    (2694 \376)3852 w)
    14 I have f
    w (pmNoRabEstablishSuccessSpeech) 1255 2316
    14 S f
    (\354)3192 2233 w)
    (\356)3192 2373 w)
    14 I have f
    W (UtranCell) 3261 2316
    14 S f
    (\374)3853 2233 w)
    (\376)3853 2373 w)
    14 f S1
    t 1 2709 1 1234 2427 (_ _)
    cleartomark
    showPage
    restoration
    %% EndPage: 1 1
    %% Trailer
    fact
    % Present: Times-italic Times-Roman symbol
    %% Pages: 1

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

    Thanks in advance.

    Kind regards

    Jawahar

    Your file PS does not contain the parameters of size or page orientation, so the PostScript interpreter you use

    simply defines the configured default page size.

    As the file defines something as a page covering (the name pagebbox is used), take the fiven values it

    to build a State of page size. For example insert

    < agesize="" [792="" 612]="">> setpagedevice

    right after the comment lines (lines starting with two percent signs). Forcing your PS interpreter

    (condition he speaks at least the language level 2, that I take in silence) to make the formula for a

    Letter size page orientation is landscape.

    If you really want a portrait orientyation, you need to swap two numbers in the

    Statement above and enter the code to scale down the formula.

    Helge

  • How to insert an image .png in the postscript file that with /ASCII85Decode, filters /LZWDecode.

    Under linux, I want to develop a calibrated printer driver.

    where to print a document, I get sending file postscript postscript printer driver, the content of the file is shown below:

    %! PS-Adobe - 3.0

    %% BoundingBox: 0 0 612 792

    %% HiResBoundingBox: 0 0 612,00 792.00

    %% Creator: GPL Ghostscript 910 (ps2write)

    %% LanguageLevel: 2

    %% CreationDate: D:20151103175615 + 08 '00'

    %% Pages: 1

    %% EndComments

    % BeginProlog

    CurrentFile /ASCII85Decode filter /LZWDecode filter cvx exec

    "(J.'GP1) YJ2: a-L/6rF = & 5] f ', $9VMV4PfsINPg $lJV; < [.@O%03.smQ('PQ#V^%=ggiP:i9P6m1

    (& e, #6QsIUEP1 ^ W4j % > VfmLeP21i ['0XteJ5' - rMBI73qYi] MqRS: _____) [:!] GtMG0% ^! tgdCBfAL)

    [[FIC *'* + _5Lbn > 92]] a #cSAZ & > A@c2Y\jd2S! P$:g'tTf,7oM*o%:D37/I$S.] \mgscphMRIG413

    (Z = Q; ") 5F8) ' Qr"(=NfCOoQ) ibUD "" CCLE1_ #S2 = * J! 5rCj3Lri1 "f$ rI5 + n6R8\ * imVK6JF'6bb

    ...

    In this file, contains a string in /ASCII85Decode /LZWDecode filter, what is the meaning of this chain, this content it contained? And how to generate this string.

    And now I want to edit this postscript file, and add a .png image to print content. How can I do?

    Thank you very much for your help!

    This indicates that the data is compressed with LZW compression, then this is a compact representation of ASCII-oriented. LZW is used in GIF, but this does not mean that someone dumped a GIF file.

    PNG files using Flate compression, but you can't empty a PNG into PostScript file. Your steps

    1. understand the PostScript imaging model.

    2. understand the PostScript image format.

    3 understand how filters are specified in PostScript format.

    4 completely parse and decompress the PNG. I hope that there can be no alpha channel!

    5 convert the PNG data you analyzed in PostScript.

    6. Add the appropriate image transformations.

    7. Add in PostScript. Discover the point of law cannot be simple.

    Working with formats JPEG is a little simpler, as most of the JPEG files are directly compatible with the DCTDecode filter.

    If you do not have the PostScript language reference manual, you need, and you will need to spend a few weeks or months immersed in it...

  • PostScript stack overflow problem

    Hello world

    I am looking for detailed information one

    postsript battery works, what commands are implemented

    on the stack and how you can control the size of the stack

    When creating postscript files. We write a postscript

    driver and our PostScript shows often stack overflow

    Mistakes, but did not find us sufficient information on

    How to avoid this problem nor books ps.

    A stack size is dependent on a particular PS interpreter

    or are there standards? What is a typical stack size?

    What is the best way for the developer to the size of the battery, follow

    so it does not get overwhelmed?

    Thank you very much in advance for any help.

    Yuliana

    I had a look at your sample file. My impression is that these huge blocks of

    PS code of procedures is not quite adequate. Provided the printers that you want to use

    level 3 printers and have enough memory or - even better - a hard

    disk, I suggest using the filter ReusableStreamDecode place such as outlined below:

    To set up:

    CurrentFile <0 (%endofchunk)="">> > ReusableStreamDecode filter

    Insert here the % your huge chunk of code PS

    % EndOfChunk

    /name_of_chunk exch def

    To use:

    name_of_chunk dup resetfile cvx exec

    Of course, like Dov post earlier, the details of storage management are highly

    dependent development implemented, but I think reusable data flow data are probably

    managed outside the memory 'normal' namagement, e.g. saed on a hard drive,

    If present, or a virtual or similar disc.

  • Remove the entry from the ARP table

    I need to create a program to remove an entry in the ARP table in Windows 7 with LabVIEW and TestStand.  The test that I develop contacts ESA via Ethernet.  Each HAD has the same IP address at the beginning but different MAC addresses.  I note that there may be long delays in test is running when you try to connect and remove the previous entry in the ARP table seems to help.  But now I have to do it manually through the command line.  The command 'arp d' requires elevated privileges.  I had a hard time getting LabVIEW to raise the system exec.  Does anyone have an ideas? Is there a .NET access to the ARP table?

    Thank you

    Paul

    I'll try to look into ARP sync settings setting in Windows.

    We have suffered from various problems of connection-performance TCP a few years ago and our solution was to change the default number of TCP sockets and delays (we knew port exhaustion). The tweeks eliminated most of our problems, no changes to code LV/TS not required.

    I tried to find info on ARP parameters for Windows 7, but it seems that there is much less info available that ther is for XP.

    Key words of the most common registry for older versions of Windows have been 'ArpCacheLife' and 'ArpCacheMinReferencedLife.

    EDIT:

    These parameters were apparently kidnapped in Vista. I found this on the site of $ M; they can apply to later versions, as well as M$ is a request for change to the management of the ARP...

    http://support.Microsoft.com/kb/949589

  • Limiting the tables and using lindex in commands regexp

    Hello

    Here's my second and extremely crap question/post in what concerns the EEM/TCL.  I did some research on Google and have not really been able to find an answer to these questions.  Probably more due to my lack of agility with the search bar of the information being just is not there.  Hope you'll forgive me if.

    1. my first question is this.  Say I want to get an output of a command.  I would like to see all the interfaces in the 'ip vrf command show interface' for example.  Not knowing how many interfaces there may be, there could be 10, or there might be 200, what is the best way to limit a loop function after that I gave the following commands?

    Set _vrf_int [exec show ip vrf interface]
    Set _array_vrf_int [split $_vrf_int '\n']

    set $i 0

    then {$i< 200}="">
    RegExp {([A-Z]+[a-z]+[0-9]+). *} [lindex $_array_vrf_int $i] _complete_string _int
    Inc. $i 1

    }

    Not 100% sure that the syntax is correct, sorry.  If I don't have that 10 interfaces so it won't be necessary to issue this loop 200 times to "$_array_vrf_int".  Also wouldn't be great if I went through the 200 interfaces.  Is there a way I can limit this loop based on the number of lines that were captured after the split function?

    2. the value of the regular expression above is output in the var $_int.  Is there a way I can output the regular expression in a table? a ' :-

    RegExp {([A-Z]+[a-z]+[0-9]+). *} [lindex $_array_vrf_int $i] _complete_string [lindex $ $i _int]

    Syntax is certainly not correct, but I guess there could be a way to do this.  Any thoughts?

    3. I did some comparisons on an outing to see if an access list is present on an interface.  I can get a regexp to pull back the name of the access on a given interface list, but if there are any access-list to an if statement on anything?

    Set _acl_name 0

    RegExp {. * ip access-group (. *) in} $_running_int _complete_string _acl_name

    If {$_acl_name! = 0} {puts ' there is an access-list on $_int "} else {puts ' there is no acl on _int $ :-("} "}

    In the above output I'm defining the value of ' $_acl_name ' to zero so that I can compare it to the fi statement.  This seems to be a newbie to shit how do however.  Is it a kind of generic I put in place of the '0' to match an empty variable. has ' {null}.

    4 I'm sorry last question.  I also reset the variable {null} using a similar wildcard.  Once again I can reset the variable to 0, but it seems just that I do not understand that the syntax well enough and it is without doubt a better method.

    5. I have read several tutorials that cover a lot of bases.  Is there a good reference that anyone can suggest so I don't waste your time with these silly questions?  I'm afraid that the scripts I've studied on this forum are always way above my head.

    Thanks in advance

    Alex

    Assume that the limit of the loop.  Which will never end well.  Instead, use a foreach loop to iterate over the number of lines in the output:

    set vrf_int [exec "show ip vrf interface"]

    foreach line [split $vrf_int "\n"] {
      if { [regexp {([A-Za-z0-9]+).*} $line -> int_name] } {

    puts "Interface name is $int_name"

    }

    }

    In addition, do not use the variables that start with "_".  Those that are reserved for the Cisco or overall use.  In addition, 'exec' is a single command tclsh.  If you use the EEM Tcl, you will need to interact with the CLI library.  You can watch our best practices guide at https://supportforums.cisco.com/docs/DOC-12757 for some tips and tricks with the use of EEM.

    You can use - all and--inline for regexp all return in a list.  However, given the idea of the loop above, you can also use lappend to each pass:

    set intlst [regexp -all -inline {([A-Za-z0-9]+).*} $output]

    set vrf_int [exec "show ip vrf interface"]

    set intlst [list]

    foreach line [split $vrf_int "\n"] {
      if { [regexp {([A-Za-z0-9]+).*} $line -> int_name] } {

    lappend intlst $int_name

    }

    }


    You can use "info exist" or simply to check the result of your regexp command to see if a match took place.  See the example above the latter.

    regexp {.*ip access-group (.*) in} $_running_int _complete_string _acl_name

    if {[info exists $_acl_name]} {puts "there is a access-list on $_int"} else {puts "there's no acl on $_int :-("}

    You can 'reset' a variable by using the command 'deactivated '.

    One of the best general Tcl references is the "book of the pen:

    http://www.Amazon.com/practical-programming-Tcl-4th-Edition/DP/0130385603/ref=sr_1_2?ie=UTF8&QID=1333817448&SR=8-2

  • upgrade to 12 c - problem with AQ tables

    Hi all

    I'm trying to upgrade a 11.2.0.3 database to 12.1.0.2 (PSU 5) on Solaris-64.

    Upgrade throws an error as follows:

    Oracle Server

    ORA-24005: inappropriate utilities used to perform the DDL about table AQ

    SYSTEM. DEF$ _AQCALL

    ORA-06512: at line 30

    ORA-24002: QUEUE_TABLE SYSTEM. DEF$ _AQCALL does not exist

    ORA-06512: at line 19

    ORA-00942: table or view does not exist

    ORA-24005: inappropriate utilities used to perform the DDL about table AQ

    SYSTEM. DEF$ _AQERROR

    ORA-06512: at line 30

    ORA-24002: QUEUE_TABLE SYSTEM. DEF$ _AQERROR does not exist

    ORA-06512: at line 19

    I tried to run the statements manually in the database with the same result.

    Any helpful ideas?

    Thank you

    Michael

    Try to force these objects and then re-create them.

    sqlplus system/passwd

    dbms_aqadm.drop_queue_table exec ("' DEF$ _AQCALL", true);

    dbms_aqadm.drop_queue_table exec ("' DEF$ _AQERROR", true);

    If you MOS access check notice

    Invalid DEF $_AQCALL and _AQERROR $ DEF after Patch or upgrade (Doc ID 961104.1)

  • table col name get the details of the table column and inserting of values depending on the data type of the column

    Hello

    I am train to write a procedure where I would spend the table as a parameter name and then the code would determine it is column names, and then he would insert records in each column depending on the data type. could someone help me with this.

    Thank you

    SM

    Hello

    Perhaps you need to dummy data just for the table.

    Here is my exercise

    create or replace
    procedure generate_rows(p_table_name varchar2, p_count number)
    is
      --
      function insert_statement(p_table_name varchar2) return clob
      is
        l_columns clob;
        l_expressions clob;
        l_sql clob default
          'insert into p_table_name (l_columns) select l_expressions from dual connect by level <= :p_count';
      begin
        select
          -- l_columns
          listagg(lower(column_name), ',') within group (order by column_id),
          -- l_expressions
          listagg(
            case
            when data_type = 'DATE'
              then  'sysdate'
            when data_type like 'TIMESTAMP%'
              then  'systimestamp'
            when data_type = 'NUMBER'
              then  replace('dbms_random.value(1,max)',
                      'max', nvl(data_precision - data_scale, data_length)
                    )
            when data_type = 'VARCHAR2'
              then  replace(q'|dbms_random.string('a',data_length)|',
                      'data_length', data_length
                    )
            else
                    'NULL'
            end, ',') within group (order by column_id)
        into
          l_columns,
          l_expressions
        from user_tab_columns
        where table_name = upper(p_table_name);
        --
        l_sql := replace(replace(replace(l_sql,
          'p_table_name', p_table_name),
          'l_columns', l_columns),
          'l_expressions', l_expressions);
        -- debug
        dbms_output.put_line(l_sql);
        --
        return l_sql;
      end;
    begin
      execute immediate insert_statement(p_table_name) using p_count;
    end;
    /
    
    -- test
    create table mytable(
      id number(4,0),
      txt varchar2(10),
      tstz timestamp with time zone,
      dt date,
      xml clob
    )
    ;
    set serveroutput on
    exec generate_rows('mytable', 10);
    select id, txt from mytable
    ;
    drop procedure generate_rows
    ;
    drop table mytable purge
    ;
    
    Procedure GENERATE_ROWS compiled
    Table MYTABLE created.
    PL/SQL procedure successfully completed.
    
    insert into mytable (id,txt,tstz,dt,xml) select dbms_random.value(1,4),dbms_random.string('a',10),systimestamp,sysdate,NULL from dual connect by level <= :p_count
            ID TXT
    ---------- ----------
             3 WnSbyiZRkC
             2 UddzkhktLf
             1 zwfWigHxUp
             2 VlUMPHHotN
             3 adGCKDeokj
             3 CKAHGfuHAY
             2 pqsHrVeHwF
             3 FypZMVshxs
             3 WtbsJPHMDC
             3 TlxYoKbuWp
    
    10 rows selected
    
    Procedure GENERATE_ROWS dropped.
    Table MYTABLE dropped.
    

    and here is the vision of Tom Kyte for the same https://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2151576678914

    Edit: to improve my code, it must use p_count as bind as Tom.

  • Accelerate the selection * of a table

    Hi all

    OS: RHEL

    DB: 11 gR 2

    Is it possible that we can accelerate the selection * of a table?

    Kind regards

    $phinx19 wrote:

    Hi all

    OS: RHEL

    DB: 11 gR 2

    Is it possible that we can accelerate the selection * of a table?

    Kind regards

    # If it is everything you write, you get a full table scan independently of all the indexes that exist on this table:

    SQL > create table (yazflutt)

    snorm number 2.

    3 gleezle varchar2 (40),

    date of Halloween 4,

    Number 5 art);

    Table created.

    SQL >

    SQL > start

    2 for i in 1.10000 loop

    3. insert into yazflutt

    4 values (i, 'pourles yinko' |) I |'! (', sysdate - I, i);

    5 end of loop;

    6

    7 validation;

    8 end;

    9.

    PL/SQL procedure successfully completed.

    SQL >

    SQL > set autotrace on

    SQL >

    SQL > select * from yazflutt;

    SNORM GLEEZLE HALLOWEEN ART

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

    yinko 567 567 pourles!                        15 APRIL 14 567

    yinko 568 568 pourles!                        14 APRIL 14 568

    ...

    9982 yinko 9982 pourles!                       5 JULY 88 9982

    9983 pourles yinko 9983!                       4 JULY 88 9983

    9984 yinko 9984 pourles!                       3 JULY 88 9984

    9985 pourles yinko 9985!                       2 JULY 88 9985

    9986 yinko 9986 pourles!                       1 JULY 88 9986

    9987 yinko 9987 pourles!                       30 JUNE 88 9987

    9988 yinko 9988 pourles!                       29 JUNE 88 9988

    SNORM GLEEZLE HALLOWEEN ART

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

    9989 yinko 9989 pourles!                       9989 JUNE 28, 88

    yinko 9990 9990 pourles!                       JUNE 27 88 9990

    9991 yinko 9991 pourles!                       9991 26 JUNE 88

    9992 yinko 9992 pourles!                       25 JUNE 88 9992

    9993 yinko 9993 pourles!                       9993 JUNE 24, 88

    9994 yinko 9994 pourles!                       23 JUNE 88 9994

    9995 pourles yinko 9995!                       9995 22 JUNE 88

    yinko 9996 9996 pourles!                       JUNE 21 88 9996

    9997 yinko 9997 pourles!                       20 JUNE 88 9997

    9998 pourles yinko 9998!                       9998 19 JUNE 88

    yinko 9999 9999 pourles!                       18 JUNE 88 9999

    SNORM GLEEZLE HALLOWEEN ART

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

    10000 pourles 10000 yinko!                      JUNE 17, 88 10000

    10000 selected lines.

    Execution plan

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

    Hash value of plan: 2573332187

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

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

    |   0 | SELECT STATEMENT |          | 10000 |   556K |    10 (10) | 00:00:01 |

    |   1.  TABLE ACCESS FULL | YAZFLUTT | 10000 |   556K |    10 (10) | 00:00:01 |

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

    Note

    -----

    -the dynamic statistics used: dynamic sampling (level = 2)

    Statistics

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

    9 recursive calls

    0 db block Gets

    795 consistent gets

    0 physical reads

    0 redo size

    488545 bytes sent via SQL * Net to client

    7877 bytes received via SQL * Net from client

    668 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    10000 rows processed

    SQL >

    SQL > set autotrace off

    SQL >

    SQL > create index yazflutt_idx1 on yazflutt (snorm);

    The index is created.

    SQL >

    SQL > create index yazflutt_idx2 on yazflutt (gleezle);

    The index is created.

    SQL >

    SQL > create index yazflutt_idx3 on yazflutt (hopple);

    The index is created.

    SQL >

    SQL > create index yazflutt_idx4 on yazflutt (art);

    The index is created.

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'YAZFLUTT',-online true waterfall, estimate_percent-online null)

    PL/SQL procedure successfully completed.

    SQL >

    SQL > set autotrace on

    SQL >

    SQL > select * from yazflutt;

    SNORM GLEEZLE HALLOWEEN ART

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

    yinko 567 567 pourles!                        15 APRIL 14 567

    yinko 568 568 pourles!                        14 APRIL 14 568

    yinko 569 569 pourles!                        APRIL 13, 14 569

    ...

    9983 pourles yinko 9983!                       4 JULY 88 9983

    9984 yinko 9984 pourles!                       3 JULY 88 9984

    9985 pourles yinko 9985!                       2 JULY 88 9985

    9986 yinko 9986 pourles!                       1 JULY 88 9986

    9987 yinko 9987 pourles!                       30 JUNE 88 9987

    9988 yinko 9988 pourles!                       29 JUNE 88 9988

    SNORM GLEEZLE HALLOWEEN ART

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

    9989 yinko 9989 pourles!                       9989 JUNE 28, 88

    yinko 9990 9990 pourles!                       JUNE 27 88 9990

    9991 yinko 9991 pourles!                       9991 26 JUNE 88

    9992 yinko 9992 pourles!                       25 JUNE 88 9992

    9993 yinko 9993 pourles!                       9993 JUNE 24, 88

    9994 yinko 9994 pourles!                       23 JUNE 88 9994

    9995 pourles yinko 9995!                       9995 22 JUNE 88

    yinko 9996 9996 pourles!                       JUNE 21 88 9996

    9997 yinko 9997 pourles!                       20 JUNE 88 9997

    9998 pourles yinko 9998!                       9998 19 JUNE 88

    yinko 9999 9999 pourles!                       18 JUNE 88 9999

    SNORM GLEEZLE HALLOWEEN ART

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

    10000 pourles 10000 yinko!                      JUNE 17, 88 10000

    10000 selected lines.

    Execution plan

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

    Hash value of plan: 2573332187

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

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

    |   0 | SELECT STATEMENT |          | 10000 |   341K |    10 (10) | 00:00:01 |

    |   1.  TABLE ACCESS FULL | YAZFLUTT | 10000 |   341K |    10 (10) | 00:00:01 |

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

    Statistics

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

    1 recursive calls

    0 db block Gets

    725 consistent gets

    0 physical reads

    0 redo size

    488545 bytes sent via SQL * Net to client

    7877 bytes received via SQL * Net from client

    668 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    10000 rows processed

    SQL >

    SQL > set autotrace off

    SQL >

    Whatever the index in place a ' select * ' makes a full table scan, period.  Unless you can optimize your storage space, memory, or even use version 11.2 laters results cache and there is not a lot you can do.

    David Fitzjarrell

  • Large partition table with the primary key referenced by several child tables

    I tested this procedure and it works perfectly. Although when children tables refer to the key column, after execution of dbms_redefinition.finish_redef_table they all are referring to table exercised. In test I deal forced FK droped on tables children and recreated them. What could be the best way to do this in this scenario?

    Thanks for all comments/opinions!

    Are you sure? You should end up with the original FK constraint (disabled and renamed to have a prefix of $$ TMP) pointing to the staging table (which is of course the famous original table), and allowed a new constraint with the correct name, pointing to the new version of the table. so all you need to do to bring order to the top is to remove the constraint of renamed.

    This running-in of the SCOTT schema clearly indicates:

    create the table deptint in select * from dept where 1 = 2;

    exec dbms_redefinition.start_redef_table (user, 'dept', 'deptint')

    n number of var

    exec dbms_redefinition.copy_table_dependents (user, "dept', 'deptint', DBMS_REDEFINITION.") CONS_ORIG_PARAMS, TRUE, TRUE, TRUE, TRUE,: n)

    Print n

    exec dbms_redefinition.finish_redef_table (user, 'dept', 'deptint')

    Select CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME, user_constraints STATE;

  • Create a view of RDF in Oracle 12 c of tables in an Oracle 11 g Server

    Hello!

    I have a relational database in Oracle 11 g server, but I need to create the view of RDF model in Oracle 12 c in the base tables.

    I created a database connection to connect to the server of Oracle 11 g Oracle 12 c, using the statement:

    CREATE DATABASE LINK myDBLink

    CONNECT to user_test

    IDENTIFIED BY test123

    WITH THE HELP OF '(DESCRIPTION=)

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

    (CONNECT_DATA = (SID = orcl)))';

    The works of the SELECT statement:

    Select * from EMP@myDBLink;

    I also created a SYNONYM:

    CREATE the SYNONYM MY_EMP FOR EMP@myDBLink;

    The SELECT statement with the synonym also works:

    Select * from EMP@MY_EMP;

    Well, to create the view of RDF, I use a sem_apis.create_rdfview_model function. Now, I wrote the statement of the following two ways:

    BEGIN

    () sem_apis.create_rdfview_model

    Model_name = > "test_linked"

    tables = > SYS. ODCIVarchar2List ('MY_EMP', 'MY_DEPT'),

    prefix = > ' http://GrDF/ ',

    Options = > ' COMPLIANCE = you

    );

    END;

    BEGIN

    () sem_apis.create_rdfview_model

    Model_name = > "test_linked"

    tables = > SYS. ODCIVarchar2List('EMP@myDBLink','DEPT@myDBLink'),

    prefix = > ' http://GrDF/ ',

    Options = > ' COMPLIANCE = you

    );

    END;

    And I get the following error:

    ORA-13199: fetchTabIDList: not found in tables:

    ORA-06512: at the 'MDSYS. SDO_RDF_INTERNAL', line 14308

    ORA-06512: at the 'MDSYS. SDO_RDF', line 3616

    ORA-06512: at the 'MDSYS. RDF_APIS', line 1253

    ORA-06512: at line 2


    I use examples of book of the Oracle tables.


    Thank you


    Yenier

    Yenier,

    Could you please try creating a view rather than a synonym? Here is an example:

    SQL >-create dblink

    SQL > create public database link

    2 mylink

    3 connect to

    Scott 4

    5 identified by

    6 Tiger

    using a 7 ':/';

    Database link created.

    SQL >

    SQL >-create view local using queries involving remote database objects

    SQL > create view dblink_scott_EMP in select * from EMP@mylink;

    Created view.

    SQL >

    SQL >-add the primary key (help requests on Direct mapping according to models RDFView to have shorter SubjectMaps)

    SQL > alter view dblink_scott_EMP add constraint pk_EMPNO primary key (EMPNO) disable;

    Altered view.

    SQL >

    SQL > - create model DM - based RDFview

    SQL > exec sem_apis.create_rdfview_model ('dblink_test_rv', sys.odcivarchar2list ('DBLINK_SCOTT_EMP'), "http://dm/");

    PL/SQL procedure successfully completed.

    SQL >

    Thank you

    -Smiled.

  • How to force uniqueness on 2 tables?

    Hello

    I have an e-mail1 column in both tables A and B.

    and I will not allow to insert the e-mail twice in both tables, the email must exists in table A or table B not both.

    Is there an easy way to implement this feature?

    Best regards

    Salim

    Something like that I guess

    SQL> create table a (id integer, email varchar2(100));
    
    Table created.
    
    SQL> alter table a add constraint a_uk unique(email);
    
    Table altered.
    
    SQL> create table b (id integer, email varchar2(100));
    
    Table created.
    
    SQL> alter table b add constraint b_uk unique(email);
    
    Table altered.
    
    SQL> create materialized view log on a with rowid including new values;
    
    Materialized view log created.
    
    SQL> create materialized view log on b with rowid including new values;
    
    Materialized view log created.
    
    SQL> alter materialized view log on b add (email);
    
    Materialized view log altered.
    
    SQL> alter materialized view log on a add (email);
    
    Materialized view log altered.
    
    SQL> create materialized view mv build deferred refresh fast on commit
      2  as
      3  select count(*) cnt
      4    from a join b
      5      on a.email = b.email;
    
    Materialized view created.
    
    SQL> alter materialized view mv add constraint mv_chk check (cnt = 0);
    
    Materialized view altered.
    
    SQL> exec dbms_mview.refresh('MV','C')
    
    PL/SQL procedure successfully completed.
    
    SQL> insert into a values (1, '[email protected]');
    
    1 row created.
    
    SQL> insert into b values (1, '[email protected]');
    
    1 row created.
    
    SQL> commit;
    commit
    *
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-02290: check constraint (V195588.MV_CHK) violated
    
    SQL> rollback;
    
    Rollback complete.
    
    SQL> insert into a values (1, '[email protected]');
    
    1 row created.
    
    SQL> insert into b values (1, '[email protected]');
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select * from a;
    
            ID
    ----------
    EMAIL
    ------------------------------------------------------
             1
    [email protected]
    
    SQL> select * from b;
    
            ID
    ----------
    EMAIL
    ------------------------------------------------------
             1
    [email protected]
    
    SQL> select * from mv;
    
           CNT
    ----------
             0
    
    SQL>
    
  • ORA-39726: operation column add/drag not supported on compressed tables

    Hello

    I have an error of the object.

    {noformat}

    SQL > select table_name, compression from dba_tables where owner = 'USER1' and table_name = "TABLE1_LT";

    TABLE_NAME COMPRESS
    ---------------------- --------
    TABLE1_LT DISABLED

    SQL > exec dbms_wm. DisableVersioning ('user1.table1', force = > true, ignore_last_error = > true);
    Dbms_wm BEGIN. DisableVersioning ('user1.table1', force = > true, ignore_last_error = > true); END;
    *
    ERROR on line 1:
    ORA-20231: table "User1. Table1' failed during
    DisableVersioning. Error:
    ORA-39726: operation column add/drag not supported on compressed tables
    ORA-06512: at "WMSYS.LT", line 9360
    ORA-06512: at line 1


    SQL > select sql_str in the all_wm_vt_errors;
    ALTER TABLE USER1. DROP COLUMN LTLOCK TABLE1_LT

    {noformat}

    How can I check, it's a table really compressed or OWM not in?

    Hello

    This is the right way to determine whether a table enabled version uses compression.  It could be another property table or tablespace that causes the same error will be triggered.  It is difficult to know exactly without the full table DDL.  If the dba_tables query was ACTIVE for this column, the inner workings of the Workspace Manager would have to set as unused column instead of a fall that could have prevented this error.  This behavior has been updated in 12 c to always define the column as unused anyway.  As a on 11.2.0.3, you can use ignore_last_error to jump the abandonment of all columns of metadata (version, nextver, delstatus, ltlock and createtime/retiretime if history is used).  Then when DisableVersioning is complete, you can issue the unused column from the game DDL manually for each of the columns.

    Kind regards

    Ben

  • Tables activated moving version of one tablespace to another - what is table of _LCK?

    Hi all. This is my test script:


    CREATE THE SCHEMA OF THE TABLE. TEST_TABLE

    (

    ID NUMBER NOT NULL, (38)

    DCA_ID DCL_DCAID_CK NUMBER (38) CONSTRAINT NOT NULL)

    TABLESPACE OLD_TBLSPC;

    CREATE A UNIQUE INDEX SCHEMA. TEST_TABLE_PKC MARKET SCHEME. TEST_TABLE

    (ID)

    LOGGING

    TABLESPACE OLD_TBLSPC;

    CHANGE THE SCHEMA OF THE TABLE. TEST_TABLE ADD CONSTRAINT TEST_TABLE_PK PRIMARY KEY (ID) WITH THE HELP OF INDEX SCHEMA. TEST_TABLE_PKC;

    CREATE A UNIQUE INDEX SCHEMA. TEST_TABLE_UK MARKET SCHEME. TEST_TABLE

    (DCA_ID)

    LOGGING

    TABLESPACE OLD_TBLSPC;

    exec dbms_wm.enableversioning('SCHEMA.) TEST_TABLE', 'VIEW_WO_OVERWRITE');

    exec dbms_wm.beginddl('SCHEMA.) TEST_TABLE');

    modify the table schema. TEST_TABLE_LTS move tablespace NEW_TBLSPC;

    exec dbms_wm.commitddl('SCHEMA.) TEST_TABLE');


    The tables and _LT moved to NEW_TBLSPC, but not the table _LCK.

    Select table_name, tablespace_name dba_tables where table_name LIKE '% table_test ';

    TEST_TABLE_LCKOLD_TBLSPC
    TEST_TABLE_AUXNEW_TBLSPC
    TEST_TABLE_LTNEW_TBLSPC

    Is there another method to move the _LCK table?

    Hello

    The _LCK table is only moved to the new tablespace when the created on the top level view of triggers INSTEAD OF are changed.  This only happens when there is a modified column definition, the trigger that is defined by the user or the unique/foreign key constraint.

    Kind regards

    Ben

  • Partitioned table of LOB - àen SECUREFILE?

    Dear administrators,

    My version of DB - 11.1.0.7

    I need to convert storage LOB in BASIC NAVIGATION (and also to enable compression Adv LOB) on a partitioned table (Hash, 64 partitions). Table of the LOB chunk size size - 8 GB, segment - 1.2 to

    I am familiar with dbms_redef for these conversions on non partitioned tables. I know too, redefine a LOB table partitions. But is there a way to achieve BASIC SECUREFILE conversion on a table partitioned using the DBMS_REDEF?

    I have not found much info on this on oracle docs or other sources on the internet. Nobody don't know or don't know of this process? Thanks for your help.

    Post edited by: DBA112

    orclz > create table lobtab store (c2 c1 and number, clob) lob (c2) as partition by hash (c1) partitions 4 basicfile;

    Table created.

    orclz > create table inttab store (c2 c1 and number, clob) lob (c2) as securefile partition by hash (c1) partitions 4;

    Table created.

    orclz > alter table lobtab add constraint primary key lpk (c1);

    Modified table.

    orclz > insert into lobtab values(1,'abc');

    1 line of creation.

    orclz > dbms_redefinition.start_redef_table (user, 'lobtab', 'inttab') exec.

    PL/SQL procedure successfully completed.

    orclz > dbms_redefinition.finish_redef_table (user, 'lobtab', 'inttab') exec.

    PL/SQL procedure successfully completed.

    orclz >

Maybe you are looking for